1

i would like to confirm that efs is mounted on my ec2 instance but do not know the command.

i did mount my EFS to the directory ''/data''

i think the correct command would be

df -h

Filesystem      Size  Used Avail Use% Mounted on
udev            996M   12K  996M   1% /dev
tmpfs           201M  356K  200M   1% /run
/dev/xvda1      7.8G  2.2G  5.3G  29% /
none            4.0K     0  4.0K   0% /sys/fs/cgroup
none            5.0M     0  5.0M   0% /run/lock
none           1001M     0 1001M   0% /run/shm
none            100M     0  100M   0% /run/user

but i am no sure.

user1709076
  • 125
  • 1
  • 6

2 Answers2

3

To mount an EFS (nfs) volume on Amazon AWS do

sudo mount -t nfs4 -o nfsvers=4.1,rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2 volumeID.efs.zone.amazonaws.com:/ /your/mountpoint

You could also add an "automount" option on /etc/fstab , so it is persistend after a reboot (add it as last line)

volumeID.efs.zone.amazonaws.com:/ /your/mountpoint nfs4 nfsvers=4.1,rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2 0 0

Please note that you shoud have installed nfs-utils (if running under centos or rhel like) or nfs-common (debian and ubuntu like)

Federico Galli
  • 908
  • 6
  • 16
1

ok, i did find that when the efs is mounted correctly, you do see a response with the command for df -h like

fs-xxxxxxxx.efs.us-east-1.amazonaws.com:/  8.0E     0  8.0E   0% /data

also needed to make sure that the EFS security group allowed 'entry' from my ec2's security group

user1709076
  • 125
  • 1
  • 6