Score:0

Trouble with data synchronization and writable per-user subdirectories using EFS

fj flag
HWD

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 avatar
gp flag
Tim
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?
HWD avatar
fj flag
HWD
@Tim yeah, some user directories look okay. Others are empty. I’m worried if I reboot, I’ll loose that user data.
Tim avatar
gp flag
Tim
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.
Score:0
fj flag
HWD

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.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.