Closed srinivle closed 5 years ago
This is the same security group & subnet & VPC is used for the same EC2 instance & EFS volume ::::::
Kindly check and help me out !!!
Also, by the way, how can I identify my efs volume in ec2 instance when it is mounted or do a command of lsblk ???
It worked after thorough checking. Simply executing the command from "Amazon EC2 mount instructions (from local VPC)" from "AWS EFS Console after creation of EFS volume", it will not work. We need to follow the below steps one after another and then only it will work. This is especially for Ubuntu machine !!!
root@ip-192-168-1-134:/# apt-get install git -y Reading package lists... Done Building dependency tree Reading state information... Done git is already the newest version (1:2.7.4-0ubuntu1.6). 0 upgraded, 0 newly installed, 0 to remove and 24 not upgraded. root@ip-192-168-1-134:/# git clone https://github.com/aws/efs-utils Cloning into 'efs-utils'... remote: Enumerating objects: 44, done. remote: Counting objects: 100% (44/44), done. remote: Compressing objects: 100% (23/23), done. remote: Total 235 (delta 13), reused 35 (delta 12), pack-reused 191 Receiving objects: 100% (235/235), 77.75 KiB | 0 bytes/s, done. Resolving deltas: 100% (90/90), done. Checking connectivity... done.
root@ip-192-168-1-134:/# apt-get install make Reading package lists... Done Building dependency tree Reading state information... Done Suggested packages: make-doc The following NEW packages will be installed: make 0 upgraded, 1 newly installed, 0 to remove and 24 not upgraded. Need to get 151 kB of archives. After this operation, 365 kB of additional disk space will be used. Get:1 http://us-east-1.ec2.archive.ubuntu.com/ubuntu xenial/main amd64 make amd64 4.1-6 [151 kB] Fetched 151 kB in 0s (11.5 MB/s) Selecting previously unselected package make. (Reading database ... 77664 files and directories currently installed.) Preparing to unpack .../archives/make_4.1-6_amd64.deb ... Unpacking make (4.1-6) ... Processing triggers for man-db (2.7.5-1) ... Setting up make (4.1-6) ...
root@ip-192-168-1-134:/# apt-get install binutils -y Reading package lists... Done Building dependency tree Reading state information... Done Suggested packages: binutils-doc The following NEW packages will be installed: binutils 0 upgraded, 1 newly installed, 0 to remove and 24 not upgraded. Need to get 2,312 kB of archives. After this operation, 13.7 MB of additional disk space will be used. Get:1 http://us-east-1.ec2.archive.ubuntu.com/ubuntu xenial-updates/main amd64 binutils amd64 2.26.1-1ubuntu1~16.04.8 [2,312 kB] Fetched 2,312 kB in 0s (28.6 MB/s) Selecting previously unselected package binutils. (Reading database ... 77680 files and directories currently installed.) Preparing to unpack .../binutils_2.26.1-1ubuntu1~16.04.8_amd64.deb ... Unpacking binutils (2.26.1-1ubuntu1~16.04.8) ... Processing triggers for libc-bin (2.23-0ubuntu11) ... Processing triggers for man-db (2.7.5-1) ... Setting up binutils (2.26.1-1ubuntu1~16.04.8) ... Processing triggers for libc-bin (2.23-0ubuntu11) ... root@ip-192-168-1-134:/#
root@ip-192-168-1-134:/efs-utils# ./build-deb.sh
stunnel4' (UID 113) ... Adding new group
stunnel4' (GID 116) ...
Adding new user stunnel4' (UID 113) with group
stunnel4' ...
Not creating home directory `/var/run/stunnel4'.
Setting up amazon-efs-utils (1.7) ...
Processing triggers for ureadahead (0.100.0-19.1) ...
Processing triggers for systemd (229-4ubuntu21.21) ...
root@ip-192-168-1-134:/efs-utils# sudo mount -t efs fs-c45bc227:/ efs
mount.nfs4: mount point efs does not exist
root@ip-192-168-1-134:/efs-utils# cd /
root@ip-192-168-1-134:/# sudo mount -t efs fs-c45bc227:/ efs
root@ip-192-168-1-134:/# df -h
Filesystem Size Used Avail Use% Mounted on
udev 488M 0 488M 0% /dev
tmpfs 100M 3.3M 96M 4% /run
/dev/xvda1 7.7G 3.1G 4.7G 40% /
tmpfs 496M 0 496M 0% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 496M 0 496M 0% /sys/fs/cgroup
/dev/loop0 89M 89M 0 100% /snap/core/6964
/dev/loop1 90M 90M 0 100% /snap/core/6818
/dev/loop2 18M 18M 0 100% /snap/amazon-ssm-agent/1335
tmpfs 100M 0 100M 0% /run/user/1000
fs-c45bc227.efs.us-east-1.amazonaws.com:/ 8.0E 0 8.0E 0% /efs
root@ip-192-168-1-134:/#root@ip-192-168-1-134:/# lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT xvda 202:0 0 8G 0 disk └─xvda1 202:1 0 8G 0 part / loop0 7:0 0 88.4M 1 loop /snap/core/6964 loop1 7:1 0 89.4M 1 loop /snap/core/6818 loop2 7:2 0 18M 1 loop /snap/amazon-ssm-agent/1335 root@ip-192-168-1-134:/#
Successfully able to mount the EFS volume to my EC2 instance system. Thank you Sir .
root@ip-192-168-1-134:/# ls -ltr | grep -i efs drwxr-xr-x 2 root root 4096 Jun 8 03:12 efs root@ip-192-168-1-134:/# lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT xvda 202:0 0 8G 0 disk └─xvda1 202:1 0 8G 0 part / loop0 7:0 0 88.4M 1 loop /snap/core/6964 loop1 7:1 0 89.4M 1 loop /snap/core/6818 loop2 7:2 0 18M 1 loop /snap/amazon-ssm-agent/1335 root@ip-192-168-1-134:/# df -h Filesystem Size Used Avail Use% Mounted on udev 488M 0 488M 0% /dev tmpfs 100M 3.3M 96M 4% /run /dev/xvda1 7.7G 3.1G 4.7G 40% / tmpfs 496M 0 496M 0% /dev/shm tmpfs 5.0M 0 5.0M 0% /run/lock tmpfs 496M 0 496M 0% /sys/fs/cgroup /dev/loop0 89M 89M 0 100% /snap/core/6964 /dev/loop1 90M 90M 0 100% /snap/core/6818 /dev/loop2 18M 18M 0 100% /snap/amazon-ssm-agent/1335 tmpfs 100M 0 100M 0% /run/user/1000 root@ip-192-168-1-134:/# mount -t efs fs-c45bc227:/ /efs mount: unknown filesystem type 'efs' root@ip-192-168-1-134:/# mount -t efs fs-c45bc227:/ /mnt/efs mount: mount point /mnt/efs does not exist root@ip-192-168-1-134:/# mount -t efs fs-c45bc227:/ efs mount: unknown filesystem type 'efs' root@ip-192-168-1-134:/#
can you please tell me the solution for this problem
root@ip-192-168-1-134:/# ls -ltr | grep -i efs drwxr-xr-x 2 root root 4096 Jun 8 03:12 efs root@ip-192-168-1-134:/# lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT xvda 202:0 0 8G 0 disk └─xvda1 202:1 0 8G 0 part / loop0 7:0 0 88.4M 1 loop /snap/core/6964 loop1 7:1 0 89.4M 1 loop /snap/core/6818 loop2 7:2 0 18M 1 loop /snap/amazon-ssm-agent/1335 root@ip-192-168-1-134:/# df -h Filesystem Size Used Avail Use% Mounted on udev 488M 0 488M 0% /dev tmpfs 100M 3.3M 96M 4% /run /dev/xvda1 7.7G 3.1G 4.7G 40% / tmpfs 496M 0 496M 0% /dev/shm tmpfs 5.0M 0 5.0M 0% /run/lock tmpfs 496M 0 496M 0% /sys/fs/cgroup /dev/loop0 89M 89M 0 100% /snap/core/6964 /dev/loop1 90M 90M 0 100% /snap/core/6818 /dev/loop2 18M 18M 0 100% /snap/amazon-ssm-agent/1335 tmpfs 100M 0 100M 0% /run/user/1000 root@ip-192-168-1-134:/# mount -t efs fs-c45bc227:/ /efs mount: unknown filesystem type 'efs' root@ip-192-168-1-134:/# mount -t efs fs-c45bc227:/ /mnt/efs mount: mount point /mnt/efs does not exist root@ip-192-168-1-134:/# mount -t efs fs-c45bc227:/ efs mount: unknown filesystem type 'efs' root@ip-192-168-1-134:/#