in cookbooks/aws-parallelcluster-environment/resources/lustre/partial/_mount_unmount.rb [107:143]
def initialize(node, resource, index)
@id = resource.fsx_fs_id_array[index]
@type = resource.fsx_fs_type_array[index]
@dns_name = resource.fsx_dns_name_array[index]
@shared_dir = self.class.make_absolute(resource.fsx_shared_dir_array[index])
@volume_junction_path = self.class.make_absolute(resource.fsx_volume_junction_path_array[index])
if @dns_name.blank?
region = node['cluster']['region']
@dns_name = "#{@id}.fsx.#{region}.#{aws_domain_for_fsx(region)}"
end
@mount_name = resource.fsx_mount_name_array[index]
if @type == 'LUSTRE'
@mount_options = %w(defaults _netdev flock user_xattr noatime noauto x-systemd.automount)
@device_name = "#{@dns_name}@tcp:/#{@mount_name}"
@fstype = 'lustre'
elsif @type == 'FILECACHE'
@mount_options = %w(defaults _netdev flock user_xattr noatime noauto x-systemd.automount x-systemd.requires=network.service)
@device_name = "#{@dns_name}@tcp:/#{@mount_name}"
@fstype = 'lustre'
else
@device_name = "#{@dns_name}:#{@volume_junction_path}"
@fstype = 'nfs'
if @type == 'OPENZFS'
@mount_options = %w(nfsvers=4.2)
elsif @type == 'ONTAP'
@mount_options = %w(defaults)
end
end
@can_change_shared_dir_permissions = @type != 'OPENZFS'
end