Score:0

vsftpd server with EFS mount - root device getting full

cn flag

Another question I couldn't find Google answer for

I have a FTP server with vsftpd, where I mounted AWS EFS drive under /mnt/ all the user directories are under

/mnt/efs/fs1/
             user1/
             user2/
             ...etc

When users upload files, i can see using df -hT command that /dev/root is getting full. Is there a way to mount EFS drive as a separate drive, or under directory that would not blow the /dev/root space up?

I mount the EFS volume using user data

#cloud-config
package_update: true
package_upgrade: true
runcmd:
- yum install -y amazon-efs-utils
- apt-get -y install amazon-efs-utils
- yum install -y nfs-utils
- apt-get -y install nfs-common
- file_system_id_1=fs-efs-id-here
- efs_mount_point_1=/mnt/efs/fs1
- mkdir -p "${efs_mount_point_1}"
- test -f "/sbin/mount.efs" && printf "\n${file_system_id_1}:/ ${efs_mount_point_1} efs tls,_netdev\n" >> /etc/fstab || printf "\n${file_system_id_1}.efs.us-east-1.amazonaws.com:/ ${efs_mount_point_1} nfs4 nfsvers=4.1,rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2,noresvport,_netdev 0 0\n" >> /etc/fstab
- test -f "/sbin/mount.efs" && grep -ozP 'client-info]\nsource' '/etc/amazon/efs/efs-utils.conf'; if [[ $? == 1 ]]; then printf "\n[client-info]\nsource=liw\n" >> /etc/amazon/efs/efs-utils.conf; fi;
- retryCnt=15; waitTime=30; while true; do mount -a -t efs,nfs4 defaults; if [ $? = 0 ] || [ $retryCnt -lt 1 ]; then echo File system mounted successfully; break; fi; echo File system not available, retrying to mount.; ((retryCnt--)); sleep $waitTime; done;

Thank you Igal

David avatar
cn flag
Knowing the version of Ubuntu you are using might help in giving an answer.
igalsc avatar
cn flag
hi @David, yes, you are correct. please see the answer I posted
Score:0
cn flag

So, it looks like because I am using Ubuntu 22.04LTS, the efs-helper packages from AWS are not working. Also, I was missing the security group permissions to mount the EFS. Because of this, the /mnt/efs/fs1 was actually a local to Ubuntu folder.

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.