Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Note: If you don’t know how to create an NFS volume or want to learn more about the NFS offering in Spinup please see How do I use the Spinup NFS storage offering?

Procedure

  • The first time you will need to download and run this script to install amazon-efs-utils on your server. This is required to easily mount an NFS volume with encryption. The script will install all required pre-requisites depending on your specific Linux distro. Wait until it finishes running:

    Code Block
    curl https://raw.githubusercontent.com/YaleSpinup/utils-storage/master/amazon-efs-utils/install_efs_utils.sh -o install_efs_utils.sh
    chmod 755 install_efs_utils.sh
    sudo ./install_efs_utils.sh
  • You can run the script again to confirm amazon-efs-utils is installed, e.g.

    Code Block
    $ sudo ./install_efs_utils.sh
    Detected OS: CentOS Linux 7 (Core)
    amazon-efs-utils already installed
    stunnel already installed
    stunnel 5.57 on x86_64-pc-linux-gnu platform
    No need to patch stunnel, version 5.57 already installed
  • If you run into issues or errors when running the script, you can contact spinup@yale.edu for support

  • Determine the File System id of your NFS volume (from the Spinup web interface) - in this case it’s fs-d08e6d24 - you’ll need that to mount the volume

    Image Added

  • Mount the volume using the file system id - in this case we’ll mount it on /mnt - make sure you use the tls option to enable encryption

    Code Block
    sudo mount -t efs -o tls fs-d08e6d24:/ /mnt
  • Confirm that you see the volume, e.g.

    Code Block
    $ df -h /mnt
    Filesystem      Size  Used Avail Use% Mounted on
    127.0.0.1:/     8.0E     0  8.0E   0% /mnt
  • Keep in mind the size of the volume is unlimited, so you can store any amount of data on it and you will only be charged based on your average usage

  • To mount the volume persistently so it shows up after a reboot, add an entry to your /etc/fstab file (make sure you replace fs-d08e6d24 with your id and /mnt with your mount point):

    Code Block
    echo 'fs-d08e6d24:/ /mnt efs _netdev,noresvport,tls 0 0' | sudo tee -a /etc/fstab
  • Test that the fstab works:

    Code Block
    $ sudo mount -fav
    /                        : ignored
    /mnt                     : successfully mounted
    $ df -h /mnt
    Filesystem      Size  Used Avail Use% Mounted on
    127.0.0.1:/     8.0E     0  8.0E   0% /mnt
  • If you see any errors above or the volume is not mounted properly, you will need to edit your /etc/fstab and fix any issues before rebooting your server! Errors in your fstab file may render your server unusable after a reboot.