Mounting a shared filesystem

Mounting to an instance

Once the SFS has been shared with your instance, you can proceed to mount it.

Replace <SFS_NAME> with the name of the directory you want to mount it to. Replace <PSEUDO> with the filesystem's pseudopath. Where to find pseudopath Replace <DC> with the datacenter location (ex: fin-01)

  1. Create a directory to which you want to mount the SFS:

mkdir -p /mnt/<SFS_NAME>

  1. Mount the shared filesystem:

mount -t nfs -o nconnect=16 nfs.<DC>.datacrunch.io:<PSEUDO> /mnt/<SFS_NAME>

  1. Add filesystem to the /etc/fstab, to have it mount on instance startup:

grep -qxF 'nfs.<DC>.datacrunch.io:/<PSEUDO> /mnt/<SFS_NAME> nfs defaults,nconnect=16 0 0' /etc/fstab || echo 'nfs.<DC>.datacrunch.io:/<PSEUDO> /mnt/<SFS_NAME> nfs defaults,nconnect=16 0 0' | sudo tee -a /etc/fstab

Mounting to every node in a cluster

Replace <SFS_NAME> with the name of the directory you want to mount it to. Replace <PSEUDO> with the filesystem's pseudopath. Where to find pseudopath Replace <DC> with the datacenter location (ex: fin-01)

pdsh -a "sudo mkdir -vp /mnt/<SFS_NAME> && grep -qxF 'nfs.<DC>.datacrunch.io:/<PSEUDO> /mnt/<SFS_NAME> nfs defaults,nconnect=16 0 0' /etc/fstab || echo 'nfs.<DC>.datacrunch.io:/<PSEUDO> /mnt/<SFS_NAME> nfs defaults,nconnect=16 0 0' | sudo tee -a /etc/fstab && sudo mount /mnt/<SFS_NAME>"

Where to find the pseudopath

Last updated

Was this helpful?