The CNFS solution requires a shared file system such as /locks
that is mounted on all cluster nodes. This file system is not a data file system; it contains the lock state files corresponding to NFS clients holding locks on the CNFS servers.
cfsshare config -p nfs [-n] shared_disk_group shared_volume mount_point
Note: |
If CIFS is already configured on the cluster, then specify the same shared_volume and mount_point for configuration of Clustered NFS. |
The local state tracking directory contains a file for each NFS client that has a transaction with the NFS server. The local state tracking directory is:
For Red Hat Enterprise Linux (RHEL):
/var/lib/nfs/statd/sm
For SUSE Linux Enterprise Server (SLES):
/var/lib/nfs/sm
For RHEL:
This creates a symlink from /var/lib/nfs/statd/sm
to /locks/sm/nodename/sm
on all the cluster nodes. This allows the lock state files for any cluster node to be accessed by other nodes in the cluster, even when the node is down.
For SLES:
This creates a symlink from /var/lib/nfs/sm
to /locks/sm/nodename/sm
on all the cluster nodes. This allows the lock state files for any cluster node to be accessed by other nodes in the cluster, even when the node is down.
The -n option can be used if the user does not want cfsshare to create the symlink to /locks/sm/nodename/sm
. If this option is used, then the user needs to manually create a symlink.
The config option adds this shared file system to VCS configuration; it creates the corresponding CFSMount resource in a special parallel service group called cfsnfssg. This also creates an NFS resource in the cfsnfssg service group. In addition to this, a separate resource of the new type ApplicationNone is created to monitor lockd
and statd
daemons.
If you run the cfsshare config -n option, you need to perform the following procedure:
# mkdir -p /locks/sm/nodename/sm.bak
For RHEL:
On each cluster node, first move the old sm directory and then create a symlink from /locks/sm/nodename/sm to /var/lib/nfs/statd/sm
.
# mv /var/lib/nfs/statd/sm /var/lib/nfs/statd/OLD.sm
# ln -sf /locks/sm/nodename/sm /var/lib/nfs/statd
On each cluster node, first move the old sm.bak directory and then create a symlink from /locks/sm/nodename/sm.bak
to /var/lib/nfs/statd/sm.bak
.
# mv /var/lib/nfs/statd/sm.bak /var/lib/nfs/statd/OLD.sm.bak
# ln -sf /locks/sm/nodename/sm.bak /var/lib/nfs/statd
For SLES:
On each cluster node, first move the old sm directory and then create a symlink from /locks/sm/nodename/sm
to /var/lib/nfs/sm
.
# mv /var/lib/nfs/sm /var/lib/nfs/OLD.sm
# ln -sf /locks/sm/nodename/sm /var/lib/nfs
On each cluster node, first move the old sm.bak directory and then create a symlink from /locks/sm/nodename/sm.bak
to /var/lib/nfs/sm.bak
.
# mv /var/lib/nfs/sm.bak /var/lib/nfs/OLD.sm.bak
# ln -sf /locks/sm/nodename/sm.bak /var/lib/nfs
/locks/sm
appropriately:# chown -R root:root /locks/sm # chmod -R 755 /locks/sm
You can configure both CNFS and CIFS at the same time by running the cfsshare config -p all command.
# cfsshare config -p all -m user -l /var/run \ -c /etc/samba/smb.conf -t /usr lockdg vollocks /locks
See the Common Internet File System chapter for explanation regarding the various CIFS-related options.