Mounting a shared filesystem

Mounting to an instance

circle-exclamation
circle-info

Shared filesystems can only be mounted from the same location.

circle-info

Replace:

  • <SFS_NAME> with your mount directory name

  • <PSEUDOPATH> with the filesystem pseudopath (it starts with /)

  • <DC> with the location slug (example: fin-01)

1

Install NFS client tools (Ubuntu)

sudo apt-get update
sudo apt-get install -y nfs-common
2

Create a mount directory

sudo mkdir -p /mnt/<SFS_NAME>
3

Mount the filesystem

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

Where to find the pseudopath

Open the filesystem in the console. Copy the Pseudopath field from the filesystem details.


Mounting to every node in a cluster

circle-info

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

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

Last updated

Was this helpful?