Changes between Version 5 and Version 6 of HighlyAvailableNFS


Ignore:
Timestamp:
05/22/11 17:35:03 (3 years ago)
Author:
digimer
Comment:

Fixed the last copy from the old wiki to work on the new Trac syntax.

Legend:

Unmodified
Added
Removed
Modified
  • HighlyAvailableNFS

    v5 v6  
    1 This is a brief configuration overview of how to use [[RGManager|rgmanager]] in an active/passive environment with lock failover support. 
     1[[TOC]] 
    22 
    3 Generally speaking, this only works with single-node file systems supported by rgmanager (e.g. ext3, ext4, reiserfs, jfs, ...).  Your service structure is very critical in order to get locking to fail over correctly and be reclaimed.  This is because rgmanager inherits parameters across parent/child relationships - in this case, the important option is '''nfslock'''. 
     3This is a brief configuration overview of how to use [wiki:RGManager rgmanager] in an active/passive environment with lock failover support. 
     4 
     5Generally speaking, this only works with single-node file systems supported by rgmanager (e.g. ext3, ext4, reiserfs, jfs, ...).  Your service structure is very critical in order to get locking to fail over correctly and have locks be reclaimed. 
     6 
     7Please be aware with the caveats on the [wiki:ClusterNFSLocking] page. 
     8 
     9=== Method 1: Multiple NFS Servers === 
    410 
    511The '''nfslock''' attribute set to '''1''' enables a special set of code which initiates the following operations when a service transitions: 
     
    2228}}} 
    2329 
    24 The other half of the configuration is setting up NFS locally.  You should have 'nfs' and 'nfslock' configured to start at boot, but {{{/etc/exports}}} should not contain any entries for cluster-managed file systems. 
     30The other half of the configuration is setting up NFS locally.  You should have 'nfs' and 'nfslock' configured to '''start at boot''', but {{{/etc/exports}}} should not contain any entries for cluster-managed file systems. 
    2531 
    2632In addition, you must also add the following to {{{/etc/sysconfig/nfs}}}: 
     
    3541 * Every NFS service will affect every other NFS service at '''both startup and shutdown'''.  After an NFS service transitions, new locks for ANY NFS service on the cluster member will be blocked for the entire NFS grace period. 
    3642 * If you only require a single NFS server in a given cluster, it is better to use the nfsserver resource agent. 
     43 
     44=== Method 2: Single NFS Server === 
     45 
     46This is a far more clean approach to NFS server high availability, but restricts the cluster to one NFS instance cluster-wide with rgmanager (it will be possible to avoid this restriction somewhat when using Pacemaker). 
     47 
     48Example service structure: 
     49{{{ 
     50<service nfslock="1" ... > 
     51  <ip ... /> 
     52  <fs ...> 
     53    <nfsserver name="mynfs" ...> 
     54      <nfsclient .../> 
     55      ... 
     56    </nfsexport> 
     57  </fs> 
     58</service> 
     59}}} 
     60 
     61The other half of the configuration is setting up NFS locally.  You should have 'nfs' and 'nfslock' '''disabled''' at boot time and {{{/etc/exports}}} should be empty. 
     62 
     63In addition, you must also add the following to {{{/etc/sysconfig/nfs}}}: 
     64{{{ 
     65STATDARG="-H /usr/share/cluster/nfsserver.sh" 
     66}}}