0

I used this EFS walkthrough to mount my EFS and enable writable per-user subdirectories on my EC2 instance.

According to the documentation, All files and subdirectories the user creates in their home directory are then created on the Amazon EFS file system. But when I look through the user directories in /mnt, they do not all contain the files and subdirectories that are in the corresponding user home directories.

How can I ensure that what's on the EFS is the same as what's in the users' home directory? Because if I unmount and remount the EFS, I will lose data.

Tim
  • 31,888
  • 7
  • 52
  • 78
HWD
  • 111
  • 3
  • When you say "they do not all contain the files and subdirectories" I assume some are working? Is there any pattern? Have you rebooted the instance to flush the disk cache to force writing? – Tim Oct 14 '22 at 19:02
  • @Tim yeah, some user directories look okay. Others are empty. I’m worried if I reboot, I’ll loose that user data. – HWD Oct 15 '22 at 00:12
  • There's no doubt a Linux command to flush the disk cache. Also, I think that tutorial actually replaces the home drives with EFS, it's not sync'd or copied, it's mounted directly in the Linux file system. – Tim Oct 15 '22 at 08:01

1 Answers1

0

I used mount -t nfs4 to see that some EFS directories simply didn't get mounted. I copied the missing content to the proper EFS directory and then re-mounted them. This seems to have solved the issue.

Mounting the directories didn't produce an error the first time around, so I'd recommend double-checking that all directories have been properly mounted.

HWD
  • 111
  • 3