Skip to content

Commit de0b4cb

Browse files
committed
Revert change to EFS home mount setup
1 parent c654067 commit de0b4cb

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

recipes/pcs/getting_started/assets/cfn-pcs-lt-efs-fsxl.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,12 @@ Resources:
8787

8888
runcmd:
8989
# Mount EFS filesystem as /home
90+
- mkdir -p /tmp/home
91+
- rsync -a /home/ /tmp/home
9092
- echo "${EfsFilesystemId}:/ /home efs tls,_netdev" >> /etc/fstab
9193
- mount -a -t efs defaults
92-
- if [ "enabled" == "$(sestatus | awk '/^SELinux status:/{print $3}')" ]; then setsebool -P use_nfs_home_dirs 1; fi
94+
- rsync -a --ignore-existing /tmp/home/ /home
95+
- rm -rf /tmp/home/
9396
# If provided, mount FSxL filesystem as /shared
9497
- if [ ! -z "${FSxLustreFilesystemId}" ]; then amazon-linux-extras install -y lustre=latest; mkdir -p /shared; chmod a+rwx /shared; mount -t lustre ${FSxLustreFilesystemId}.fsx.${AWS::Region}.amazonaws.com@tcp:/${FSxLustreFilesystemMountName} /shared; chmod 777 /shared; fi
9598

recipes/pcs/getting_started/assets/pcs-lt-efs-fsxl.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,13 @@ Resources:
7878

7979
runcmd:
8080
# Mount EFS filesystem as /home
81+
- mkdir -p /tmp/home
82+
- rsync -a /home/ /tmp/home
8183
- echo "${EfsFilesystemId}:/ /home efs tls,_netdev" >> /etc/fstab
8284
- mount -a -t efs defaults
8385
- if [ "enabled" == "$(sestatus | awk '/^SELinux status:/{print $3}')" ]; then setsebool -P use_nfs_home_dirs 1; fi
86+
- rsync -a --ignore-existing /tmp/home/ /home
87+
- rm -rf /tmp/home/
8488
# If provided, mount FSxL filesystem as /shared
8589
- if [ ! -z "${FSxLustreFilesystemId}" ]; then amazon-linux-extras install -y lustre=latest; mkdir -p /shared; chmod a+rwx /shared; mount -t lustre ${FSxLustreFilesystemId}.fsx.${AWS::Region}.amazonaws.com@tcp:/${FSxLustreFilesystemMountName} /shared; chmod 777 /shared; fi
8690

0 commit comments

Comments
 (0)