5.2. Configuring an NFS share
Configure an NFS share for an NFS service failover with the following procedure.
Procedure
On both nodes in the cluster, create the
/nfssharedirectory.# mkdir /nfsshareOn one node in the cluster, perform the following procedure.
Ensure that the logical volume you you created in Configuring an LVM volume with an XFS file system in a Pacemaker cluster is activated, then mount the file system you created on the logical volume on the
/nfssharedirectory.[root@z1 ~]# lvchange -ay my_vg/my_lv [root@z1 ~]# mount /dev/my_vg/my_lv /nfsshareCreate an
exportsdirectory tree on the/nfssharedirectory.[root@z1 ~]# mkdir -p /nfsshare/exports [root@z1 ~]# mkdir -p /nfsshare/exports/export1 [root@z1 ~]# mkdir -p /nfsshare/exports/export2Place files in the
exportsdirectory for the NFS clients to access. For this example, we are creating test files namedclientdatafile1andclientdatafile2.[root@z1 ~]# touch /nfsshare/exports/export1/clientdatafile1 [root@z1 ~]# touch /nfsshare/exports/export2/clientdatafile2Unmount the file system and deactivate the LVM volume group.
[root@z1 ~]# umount /dev/my_vg/my_lv [root@z1 ~]# vgchange -an my_vg