Linux, create an NFS volume on a Linux server
Issue:
If you want to create a large NFS volume on a Linux server that can be mounted to a vSphere ESXi host to be used as a datastore.
Resolution:
In order to create a Linux NFS share you can follow the below example.
1. yum install nfs-utils nfs-utils-lib
2. yum -y install nfs-utils
3. /etc/exports <– view current mount point security permissions (below are for examples only)
/mnt/FAST *(rw,sync,no_root_squash,no_subtree_check)
/mnt/BACKUP *(rw,sync,no_root_squash,no_subtree_check)
/mnt/DATA1 *(rw,sync,no_root_squash,no_subtree_check)
/mnt/DATA2 *(rw,sync,no_root_squash,no_subtree_check)
/mnt/DATA3 *(rw,sync,no_root_squash,no_subtree_check)
/mnt/NRSTORE *(rw,sync,no_root_squash,no_subtree_check)
4. /etc/fstab <– view current mount points
/dev/mapper/vg_labsan-lv_root / ext4 defaults 1 1
UUID=ecce62fb-db329-4af6-a9c9-5d3d46362079 /boot ext4 defaults 1 2
/dev/mapper/vg_labsan-lv_home /home ext4 defaults 1 2
/dev/mapper/vg_labsan-lv_swap swap swap defaults 0 0
tmpfs /dev/shm tmpfs defaults 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
sysfs /sysfs sysfs defaults 0 0
proc /proc proc defaults 0 0
/dev/sdb /mnt/FAST ext4 defaults 1 1
/dev/sdc /mnt/BACKUP ext4 defaults 1 1
/dev/sdd /mnt/DATA1 ext4 defaults 1 1
/dev/sdg /mnt/NR_STORE ext4 defaults 1 1
/dev/sde /mnt/DATA2 ext4 defaults 1 1
/dev/sdf /mnt/DATA3 ext4 defaults 1 1
5. /mnt <– view mount friendly names
BACKUP
DATA1
DATA2
DATA3
FAST <– we will create this one below
NR_STORE
6. Easy example of creating an NFS mount called “FAST”
mkdir FAST
mount /dev/sdb /mnt/FAST/