Skip to content

Mounting a shared filesystem

Mounting to an instance

Warning

Only SFS that have been shared with instance can be mounted to this instance, see
Editing share settings

Info

Shared filesystem can obly be attached to the instance in the same region

Info

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]
    
  2. Mount the shared filesystem:

    mount -t nfs -o nconnect=16 nfs.[DC].datacrunch.io:[PSEUDO] /mnt/[SFS_NAME]
    
  3. 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

Info

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]"