Skip to content

Commit

Permalink
openzfs ontap
Browse files Browse the repository at this point in the history
Signed-off-by: Hanwen <[email protected]>
  • Loading branch information
hanwen-cluster committed May 4, 2022
1 parent 9122ddb commit 89958d7
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions cookbooks/aws-parallelcluster-config/recipes/fsx_mount.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,11 @@
fsx_shared_dir = fsx_shared_dir_array[index]
fsx_dns_name = fsx_dns_name_array[index]
fsx_fs_type = fsx_fs_type_array[index]
fsx_volume_junction_path = fsx_volume_junction_path_array[index]

# Path needs to be fully qualified, for example "shared/temp" becomes "/shared/temp"
fsx_shared_dir = "/#{fsx_shared_dir}" unless fsx_shared_dir.start_with?('/')
fsx_volume_junction_path = "/#{fsx_volume_junction_path}" unless fsx_volume_junction_path.nil? or fsx_volume_junction_path.start_with?('/')

# Create the shared directories
directory fsx_shared_dir do
Expand Down Expand Up @@ -74,19 +77,22 @@
when 'OPENZFS'
# Mount FSx over NFS
mount fsx_shared_dir do
device "#{dns_name}:/fsx"
device "#{dns_name}:#{fsx_volume_junction_path}"
fstype 'nfs'
dump 0
pass 0
options options 'nfsvers=4.2'
action %i(mount enable)
retries 10
retry_delay 6
end
when 'ONTAP'
fsx_volume_junction_path = fsx_volume_junction_path_array[index]
# Mount FSx over NFS
mount fsx_shared_dir do
device "#{dns_name}:/#{fsx_volume_junction_path}"
device "#{dns_name}:#{fsx_volume_junction_path}"
fstype 'nfs'
dump 0
pass 0
action %i(mount enable)
retries 10
retry_delay 6
Expand Down

0 comments on commit 89958d7

Please sign in to comment.