Skip to content

Mount an SFS

View as Markdown

Mount an SFS on a node over the Network File System (NFS), and use it like any other folder there. Every node you mount it on sees the same files. Follow the section for your node’s system: Linux or Windows Server.

Run these commands on the node as root, or put sudo in front of each.

On RHEL or CentOS:

yum install nfs-utils

On Ubuntu or Debian, refresh the package list first:

apt update
apt install nfs-common

Create a folder for the SFS, then mount the SFS there:

mkdir -p /mnt/sfs
mount -t nfs -o soft,timeo=600,retrans=2,retry=2 <endpoint>:/data /mnt/sfs

Replace <endpoint> with the SFS’s Endpoint. /mnt/sfs is the folder the SFS appears in, and you can name it anything you like. Use this command rather than the Mount Command on the Info tab: this one has the option values filled in.

  • soft makes the node return an error when the SFS is briefly out of reach, so your programs keep responding.
  • timeo=600 is how long the node waits for a reply, in tenths of a second: 600 is 60 seconds.
  • retrans=2 is how many times the node resends a request before it reports an error.
  • retry=2 is how many minutes the mount command keeps trying to connect.

Run df -h /mnt/sfs. When the SFS is mounted, the first column reads <endpoint>:/data. Everything you save in /mnt/sfs now lives on the SFS. The mount uses NFS version 4.2; SFS also serves version 3: for a client that needs it, add vers=3 to the mount options.

New files on the SFS are owned by root, whichever user on the node creates them. To give a file to another user, change its owner with chown after you create it.

If the mount reports access denied by server, give your node access; see Troubleshooting SFS. If the mount command waits and prints nothing, see Troubleshooting SFS.

A mount lasts until the node restarts. To mount the SFS again at every start, add this line to /etc/fstab on the node:

<endpoint>:/data /mnt/sfs nfs soft,timeo=600,retrans=2,retry=2,_netdev 0 0

The last option in the line tells the node to wait for its network before it mounts the SFS. To try the line now, run mount -a, then check with df -h /mnt/sfs.

To stop using the SFS on this node, leave the /mnt/sfs folder in your terminal and run umount /mnt/sfs. The files stay on the SFS, ready for the next mount. If you added the line to /etc/fstab, remove it too.

In PowerShell as Administrator, install Client for NFS. It is ready as soon as the install finishes.

Install-WindowsFeature NFS-Client

In a Command Prompt, mount the SFS as a drive letter, here Z::

mount -o anon <endpoint>:/data Z:

Replace <endpoint> with the SFS’s Endpoint. Windows confirms that Z: is connected, and the SFS’s files are in Z:\. The drive lasts for the session you signed in with; mount it again in a new session. To unmount it, run umount Z:.

Your SFS is ready to use on this node. To use it from more nodes, give each one access and mount it the same way.