Installing NFS on new cluster

From ImageWiki

(Difference between revisions)
Jump to: navigation, search
(nfs1)
Line 57: Line 57:
  /image/data2                      /exports/data2    none    bind  0  0
  /image/data2                      /exports/data2    none    bind  0  0
  /image/data3                      /exports/data3    none    bind  0  0
  /image/data3                      /exports/data3    none    bind  0  0
-
#nfs1-diku-image.science.ku.dk:/data2      /image/data2    nfs4    defaults 0 0
 
-
#nfs1-diku-image.science.ku.dk:/data3      /image/data3    nfs4    defaults 0 0
 
  nfs2-diku-image.science.ku.dk:/data1      /image/data1    nfs4    defaults 0 0
  nfs2-diku-image.science.ku.dk:/data1      /image/data1    nfs4    defaults 0 0
  nfs2-diku-image.science.ku.dk:/users      /home/SCIENCE  nfs4    defaults 0 0
  nfs2-diku-image.science.ku.dk:/users      /home/SCIENCE  nfs4    defaults 0 0

Revision as of 13:37, 26 March 2014

I used these guides for installing NFSv4 [1] and [2].

Contents

NFS File server installation

The storage servers nfs1 and nfs2 acts as NFS file servers. The NFS server software has been installed on these machines.

Here is how the storage and compute servers has been configured.


Create mount points for NFS directories on all servers:

sudo mkdir /image
sudo mkdir /image/data1
sudo mkdir /image/data2
sudo mkdir /image/data3


Configuring firewall

On both nfs1 and nfs2 allow NFS server and client ports open using YaST2:

 /sbin/yast2

Mounting disks locally

nfs2

Create NFSv4 virtual file system:

sudo mkdir /exports
sudo mkdir /exports/users
sudo mkdir /exports/data1
sudo mount --bind /home/SCIENCE /exports/users


In /etc/fstab add

/dev/mapper/vg0-user_1             /home/SCIENCE     xfs   defaults        1 2
/dev/mapper/vg1-user_2             /exports/data1     xfs   defaults        1 2
/home/SCIENCE                      /exports/users    none    bind  0  0
nfs2-diku-image.science.ku.dk:/data1      /image/data1    nfs4    defaults 0 0
nfs1-diku-image.science.ku.dk:/data2      /image/data2    nfs4    defaults 0 0
nfs1-diku-image.science.ku.dk:/data3      /image/data3    nfs4    defaults 0 0


nfs1

Create NFSv4 virtual file system:

sudo mkdir /exports
sudo mkdir /exports/data2
sudo mkdir /exports/data3
sudo mount -t xfs /dev/mapper/vg0-user_1 /image/data2
sudo mount -t xfs /dev/mapper/vg1-user_2 /image/data3
sudo mount --bind /image/data2 /exports/data2
sudo mount --bind /image/data3 /exports/data3


In /etc/fstab add

/dev/mapper/vg0-user_1            /image/data2     xfs   defaults        1 2
/dev/mapper/vg1-user_2            /image/data3     xfs   defaults        1 2
/image/data2                      /exports/data2    none    bind  0  0
/image/data3                      /exports/data3    none    bind  0  0
nfs2-diku-image.science.ku.dk:/data1      /image/data1    nfs4    defaults 0 0
nfs2-diku-image.science.ku.dk:/users      /home/SCIENCE   nfs4    defaults 0 0

Setting up NFS server

Using YaST2 gui tool for the installation:

sudo /sbin/yast2

Select NFSv4 and open the firewall.

Select Network services->NFS server and configure it with (configured in /etc/exports):

On nfs1-diku-image.science.ku.dk:

/exports   *(fsid=0,crossmnt,rw,no_root_squash,sync,no_subtree_check)
/exports/data2    *(rw,no_root_squash,sync,no_subtree_check)
/exports/data3    *(rw,no_root_squash,sync,no_subtree_check)

On nfs2-diku-image.science.ku.dk:

/exports   *(fsid=0,crossmnt,rw,no_root_squash,sync,no_subtree_check)
/exports/users    *(rw,no_root_squash,sync,no_subtree_check)
/exports/data1    *(rw,no_root_squash,sync,no_subtree_check)

Select Network services->NFS client and configure it with (configured in /etc/fstab):

NFS client installation on compute servers

Using YaST2 gui tool for the installation:

sudo /sbin/yast2

Setup the firewall to allow for NFS client ports open.

Select Network services->NFS client and configure it with (configured in /etc/fstab):

nfs2-diku-image.science.ku.dk:/users      /home           nfs4    defaults 0 0
nfs2-diku-image.science.ku.dk:/data1      /image/data1    nfs4    defaults 0 0
nfs1-diku-image.science.ku.dk:/data2      /image/data2    nfs4    defaults 0 0
nfs1-diku-image.science.ku.dk:/data3      /image/data3    nfs4    defaults 0 0
Personal tools