Ubuntu HPC NFS client on compute nodes

From Notes_Wiki
Revision as of 05:05, 25 February 2023 by Saurabh (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Home > Ubuntu > HPC setup with openpbs and openmpi > NFS client on compute nodes

Configure NFS client on compute node

  1. Install NFS client packages on compute node
    apt install -y nfs-common
  2. Create mount directory
    mkdir /export
  3. Validate that master NFS exports are visible via:
    showmount -e master
    #OR showmount -e master-ib
  4. Mount master node /export directory in compute node via '/etc/fstab' using:
    <master-node-name>:/export /export nfs defaults,nofail,soft,bg 0 0
    In case of infiband use <master-node-name> as <master-ib> etc. so that NFS is mounted via Infiband network.
    Note use of nofail fstab option to ensure that compute node can boot even when the master NFS mount fails.. Also soft and bg NFS mount option to mount in background and retry without blocking.
    There is also option of adding async option while mounting. In that case the performance would improve at cost of consistency. Based on requirement / purpose of HPC, we can choose async appropriately.
  5. Mount the NFS path
    mount -a


Comparing fstab based mounting with /etc/auto.* mounting

Since we are using nofail and soft options using /etc/fstab is not disadvantageous compared to using /etc/auto.* files. However, if still there is need to mount using /etc/auto.* instead of fstab refer:

Master /etc/auto.master map

In this file we have mount file and map mapping such as:

/home  /etc/auto.home


Mounting home folders using /etc/auto.home

Create '/etc/auto.home' with contents similar to::

/home/opt/abcd   <master-ib>:/export/home/abcd/
pqrs             <master-ib>:/export/pqrs
*                <master-ib>:/export/home/&

The above has following implication:

  • /home/opt/abcd will get mounted from /export/home/abcd. Here we have given absolute path to be mounted under parent /home folder which was mentioned in /etc/master for auto mounting
  • /home/pqrs will get mounted from /export/pqrs. Here we have given path relative to /home mentioned in /etc/auto.master.
  • /home/<any-sub-folder> will get mounted from /export/home/<same-sub-folder-name>. Here we are able to substitute any sub-folder without corresponding sub-folder from server.

Mount options

We can also give options to be used while mounting. In case of /etc/auto.master options are at end such as:

/home  /etc/auto.home   async

In case of /etc/auto.home etc. map files the options are between mount point and external server NFS path such as:

/home/abcd   async    <nfs-server>:/opt/abcd

Refer:


Home > Ubuntu > HPC setup with openpbs and openmpi > NFS client on compute nodes