Mount NFS in QCIF

Procedure to mount an allocation to a VM in QCIF

Requirements

  1. Space storage needs to be exported from the server to be able to mount on virtual machines so that you can start using it. The storage can be exported to
    1. Nectar project (so that the storage can be mounted on any member VM in that project) or
    2. a particular VM with specific IP address. If you would like to mount the storage only on a single VM,
      – log into your virtual machine
      – find the IP address by running ‘ip a’ command
      – locate the IP address starting with 10. (which is usually allocated to eth1 interface
      Note: If you cannot find the private IP address starting with 10., rebooting the VM might resolve the issue. If the VM still cannot acquire the private IP address (starting with 10.), run the command ‘dhclient’ and inspect for IP address. Please contact Intersect Helpdesk for help if a private IP is not obtained by the VM.
  2. Request Intersect Helpdesk to export your allocation to your selected Nectar project or the particular VM (IP address)
    You will need to include
    1. allocation number QNNNN
    2. Nectar project name (to mount the store on all VMs) or
    3. the IP address starting with 10. that you obtained on previous steps
  3. After Intersect Helpdesk confirm the export is done, run the following command to identify the correct export path

    showmount -e 10.255.122.28

You will get similar output as follows:

Export list for 10.255.122.28:

/gpfs/general00/pool9000/QNNNN/QNNNN 10.nnn.nnn.nnn/32

Where:

10.nnn.nnn.nnn is the IP address(es) of the virtual machine that can mount the storage

/gpfs/general00/pool9000/QNNNN/QNNNN is the export path that you will need to include in /etc/auto.data as explained below.

Centos (tested on CentOS 7.X):

sudo su –

yum install nfs-utils autofs rpcbind

systemctl enable rpcbind –now

systemctl enable nfs –now

systemctl enable autofs –now

mkdir -p /data/mounts

echo “QNNNN -fstype=nfs,nfsvers=3 10.255.122.28:/gpfs/general00/pool9000/QNNNN/QNNNN” >> /etc/auto.data

[NOTE: replace the green highlighted text by the text obtained in step 3 under Requirements section. ]

echo “/data/mounts /etc/auto.data” >> /etc/auto.master

service autofs restart

Further Steps:

cd /data/mounts/QNNNN    

(if it chances folder, mount was successful**)

ln -s /data/mounts/QNNNN   /data/QNNNN

Ubuntu (tested on Ubuntu 18.04)

sudo su –

apt-get install nfs-common autofs; systemctl enable autofs; systemctl start autofs

mkdir -p /data/mounts

echo “QNNNN -fstype=nfs,nfsvers=3 10.255.122.28:/gpfs/general00/pool9000/QNNNN/QNNNN” >> /etc/auto.data

[NOTE: replace the green highlighted text by the text obtained in step 3 under Requirements section. ]

echo “/data/mounts /etc/auto.data” >> /etc/auto.master

systemctl restart autofs

cd /data/mounts/QNNNN   

(if it chances folder, mount was succesful**)

ln -s /data/mounts/QNNNN   /data/QNNNN


For existing VM (Ubuntu and Centos)

1. You will need the QCIF collection numbers. They start with a Q following by four numbers (QNNNN)

2. Comment all existing lines in /etc/auto.data. 

3. For each line you commented, create a new one as follows:

#SPROD -fstype=nfs,nfsvers=3 ic2-space-fs01.intersect.org.au,ic2-space-fs02.intersect.org.au,ic2-space-fs03.intersect.org.au:/FileSystemPath1


SPROD  -fstype=nfs,nfsvers=3 10.255.122.28:/gpfs/general00/pool9000/QNNNN/QNNNN

4. Restart NFS as follows:

service autofs restart (Centos)

systemctl restart autofs (Ubuntu)

________________________________________________________________________________________

* Centos runs an automatic yum when VM is created, you may need to wait until this is finish

** QCIF export script runs every 5 minutes but usually takes longer, if VM is new, you may need to wait.


Last updated: 01 Jun 2021

Source: https://inter.fyi/sxxOv
Back to Solutions
Your browser is not supported. Please upgrade your browser.