I am currently working to get a NFS mounted onto an older Bitnami Linux 14.xx distro. This AMI uses ubuntu, to get NFS to work correctly I will first need to update this distro to the compatible version which is Ubuntu 16.04; digging around online I found these instructions:
sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade
##This is only needed if the update manager core isn't insalled
sudo apt-get install update-manager-core
##to start final update to 16.04 run the following
sudo do-release-upgrade
#after a lengthy upgrade process I use the following command and received
bitnami@ip:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04.7 LTS
Release: 16.04
Codename: xenial
Next we need to install the NFS program; there are two separate programs for Ubuntu vs Linux AWS AMI, the two install instructions are:
###Ubuntu
$ sudo apt-get -y install nfs-common
###Linux AMI 2
$ sudo yum -y install nfs-utils
Next part is ABSOLUTLEY EXTREMELY IMPORTANT: When you want to make an EFS drive, you need to mount it to a EXISTING folder. Because of this issue I spent 2 hours trying to troubleshoot security groups and network connections.
#create the folder
Mkdir efs
#Mount the EFS to this existing folder and its location exactly
sudo mount -t nfs4 -o nfsvers=4.1,rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2,noresvport ****.amazonaws.com:/ efs
###The above efs and '/ efs' portion of the second command need to match.
Security groups will need to be configured as such:
- An Instance security group that allows outgoing connections to the NFS port 2049 and the destination needs to be the EFS security group.
- An EFS security group will need to accept connections from port 2049 and the origin needs to be the Instance security group.
After this is completed, I am going to save a standard AMI image and continue migrating the data files to folders inside this network drive.