NFS Storage in the Joyent Public Cloud

Modified: 05 Jan 2015 18:04 UTC

If you plan to run your SmartMachine or VM in a production environment, you should consider a storage solution that utilizes Network File System storage (NFS). Joyent hosts NFS storage that you can use as part of your backup strategy.

To setup NFS space, you must contact Joyent Support to setup a mount and whitelist your IP's. You can request a subnet Virtual LAN (VLAN) of private IP's that Joyent will whitelist.  This allows customers to provision a dataset that is on the VLAN and have access to the NFS mount.

Joyent recommends that you only use NFS space for archiving data. Avoid hosting your production files off of an NFS store.

In this topic: 

The way you add systems to an NFS mount varies depending on the environment.

SmartOS

To add SmartMachines to an NFS mount:

  1. Ensure NFS is enabled through SMF:
    svcadm enable rpc/bind nfs/client nfs/status nfs/nlockmgr
    
  2. Create a mount point:
    mkdir /shared
  3. Create an entry in /etc/vfstab:
    10.10.10.10:/vol/<UUID> - /shared nfs - yes -
  4. Mount the share:
    mount /shared
  5. Verify filesystem is mounted:
    gdf -h
  6. Test the mount by accessing a file in the share.

Debian Flavored Linux (Ubuntu)

To add Debian flavored Linux VMs to an NFS mount:

  1. Ensure the NFS package is installed:
    apt-get update
    apt-get install nfs-common
  2. Create a mount point:
    mkdir /shared
  3. Create an entry in /etc/fstab:
    10.10.10.10:/vol/<UUID> /shared nfs rw,users
  4. Mount the share:
    mount /shared
  5. Verify the filesystem is mounted:
    df -h
  6. Test the mount by accessing a file in the share.

RedHat Flavored Linux (CentOS, Fedora)

To add RedHat flavored Linux VMs to an NFS mount:

  1. Ensure the NFS package is installed:
    yum install nfs-utils nfs-utils-lib
  2. Create a mount point:
    mkdir /shared
  3. Create an entry in /etc/fstab:
    10.10.10.10:/vol/<UUID> /shared nfs rw,users,nolock
  4. Mount the share:
    mount /shared
  5. Verify filesystem is mounted:
    df -h
  6. Test the mount by accessing a file in the share.
If you want the mount to be available on reboot you will have to enable netfs:
chkconfig --level 345 netfs on
chkconfig --level 345 nfs on