Edition 3
1801 Varsity Drive
Raleigh, NC 27606-2072 USA
Phone: +1 919 754 3700
Phone: 888 733 4281
Fax: +1 919 754 3701
| Software | Description |
|---|---|
|
RHEL5
|
refers to RHEL5 and higher
|
|
GFS
|
refers to GFS for RHEL5 and higher
|
Documentation-cluster.
Bugzilla component: Documentation-cluster Book identifier: Cluster_Config_Example_NFS_GFS(EN)-5 (2011-07-21T15:20)
Mono-spaced Bold
To see the contents of the filemy_next_bestselling_novelin your current working directory, enter thecat my_next_bestselling_novelcommand at the shell prompt and press Enter to execute the command.
Press Enter to execute the command.Press Ctrl+Alt+F2 to switch to the first virtual terminal. Press Ctrl+Alt+F1 to return to your X-Windows session.
mono-spaced bold. For example:
File-related classes includefilesystemfor file systems,filefor files, anddirfor directories. Each class has its own associated set of permissions.
Choose → → from the main menu bar to launch Mouse Preferences. In the Buttons tab, click the Left-handed mouse check box and click to switch the primary mouse button from the left to the right (making the mouse suitable for use in the left hand).To insert a special character into a gedit file, choose → → from the main menu bar. Next, choose → from the Character Map menu bar, type the name of the character in the Search field and click . The character you sought will be highlighted in the Character Table. Double-click this highlighted character to place it in the Text to copy field and then click the button. Now switch back to your document and choose → from the gedit menu bar.
Mono-spaced Bold Italic or Proportional Bold Italic
To connect to a remote machine using ssh, typesshat a shell prompt. If the remote machine isusername@domain.nameexample.comand your username on that machine is john, typessh john@example.com.Themount -o remountcommand remounts the named file system. For example, to remount thefile-system/homefile system, the command ismount -o remount /home.To see the version of a currently installed package, use therpm -qcommand. It will return a result as follows:package.package-version-release
Publican is a DocBook publishing system.
mono-spaced roman and presented thus:
books Desktop documentation drafts mss photos stuff svn books_tests Desktop1 downloads images notes scripts svgs
mono-spaced roman but add syntax highlighting as follows:
package org.jboss.book.jca.ex1; import javax.naming.InitialContext; public class ExClient { public static void main(String args[]) throws Exception { InitialContext iniCtx = new InitialContext(); Object ref = iniCtx.lookup("EchoBean"); EchoHome home = (EchoHome) ref; Echo echo = home.create(); System.out.println("Created Echo"); System.out.println("Echo.echo('Hello') = " + echo.echo("Hello")); } }

| Component | Name | Comment |
|---|---|---|
| cluster | nfsclust | five-node cluster |
| cluster node | clusternode1.example.com | node in cluster nfsclust configured with a fencing device of nfs-apc |
| cluster node | clusternode2.example.com | node in cluster nfsclust configured with a fencing device of nfs-apc |
| cluster node | clusternode3.example.com | node in cluster nfsclust configured with a fencing device of nfs-apc |
| cluster node | clusternode4.example.com | node in cluster nfsclust configured with a fencing device of nfs-apc |
| cluster node | clusternode5.example.com | node in cluster nfsclust configured with a fencing device of nfs-apc |
| LVM volume | /dev/myvg/myvol | The LVM device on which the GFS file system is created |
| GFS file system |
The GFS file system to export by means of NFS, built on LVM volume /dev/myvg/myvol, mounted at /mnt/gfs, and shared among the members of cluster nfsclust
| |
| IP address | 10.15.86.96 | The IP address for the NFS service |
| NFS Client | nfsclient1.example.com | System that will access the NFS service |
| NFS Client | nfsclient2.example.com | System that will access the NFS service |
| NFS Client | nfsclient3.example.com | System that will access the NFS service |
| NFS Client | nfsclient4.example.com | System that will access the NFS service |
| NFS Client | nfsclient5.example.com | System that will access the NFS service |
nfssvc.
| Resource Type | Resource Name | Description |
|---|---|---|
| IP Address | 10.15.86.96 | The IP address for the NFS service |
| GFS | mygfs | The GFS file system that will be exported through the NFS service |
| NFS Export | mynfs | |
| NFS Client | nfsclient1 |
The NFS client system nfsclient1.example.com
|
| NFS Client | nfsclient2 |
The NFS client system nfsclient2.example.com
|
| NFS Client | nfsclient3 |
The NFS client system nfsclient3.example.com
|
| NFS Client | nfsclient4 |
The NFS client system nfsclient4.example.com
|
| NFS Client | nfsclient5 |
The NFS client system nfsclient5.example.com
|
nfssvc. Table 3.2, “Parameters to Configure for NFS Cluster Service nfssvc” summarizes the resource configuration of nfssvc. The names of the resources are those that you assign when you define them, as noted in Table 3.1, “Cluster Resources to Configure”
| Resource | Name | Comment |
|---|---|---|
| IP Address Resource | ||
| GFS Resource | mygfs | |
| NFS Export Resource | mynfs | NFS Export resource mynfs is a child of GFS resource mygfs. |
| NFS Client Resource | nfsclient1 | NFS Client resource nfsclient1 is a child of NFS Export resource mynfs. |
| NFS Client Resource | nfsclient2 | NFS Client resource nfsclient2 is a child of NFS Export resource mynfs. |
| NFS Client Resource | nfsclient3 | NFS Client resource nfsclient3 is a child of NFS Export resource mynfs. |
| NFS Client Resource | nfsclient4 | NFS Client resource nfsclient4 is a child of NFS Export resource mynfs. |
| NFS Client Resource | nfsclient5 | NFS Client resource nfsclient5 is a child of NFS Export resource mynfs. |
nfsclust.
nfsclust (below the menu), click . This causes the display of menu items for resource configuration: and .
nfsclust.
nfsclust, click the drop-down box under and select
mygfs to cluster nfsclust.
nfsclust, click the drop-down box under and select
mygfs.
/mnt/gfs. This is the path to which the GFS file system is mounted.
/dev/myvg/myvol. The is the LVM logical volume on which the GFS file system was is created.
rw (read-write) and localflocks option.
mynfs to cluster nfsclust.
nfsclust, click the drop-down box under and select
mynfs.
nfsclust. The procedure for configuring the first two clients only is laid out explicitly.
nfsclient1 to cluster nfsclust.
nfsclust, click the drop-down box under and select
nfsclient1.
nfsclient1.example.com. This is the first NFS client system.
rw (read-write) in this field. For more information, refer to the General Options section of the exports(5) man page.
nfsclient2 to cluster nfsclust.
nfsclust, click the drop-down box under and select
nfsclient2.
nfsclient2.example.com. This is the second NFS client system.
nfsclient3, nfsclient4, and nfsclient5 as the names of the resources and using nfsclient3.example.com, nfsclient4.example.com, and nfsclient5.example.com as the targets.
nfsclust.
nfsclust (below the menu), click . This causes the display of menu items for service configuration: and .
nfssvc.
nfssvc.
nfsclust, click . Clicking causes the display of two drop-down boxes: and .
nfssvc.
nfsclust, click .
nfsclust, below the display, click . This causes the display of two drop-down boxes: and .
nfsclust, below the display, click . This causes the display of two drop-down boxes: and .
nfsclust cluster is currently empty, populate the file system with test data.
Luci server, select Nodes from the menu for nfsclust. This displays the nodes in nfsclust and indicates which node is running the nfssvc service.
nfssvc service is running, select .
nfssvc service should now be running in a different node.
netconsole and kdump services on a system. You may find it useful to implement and test these tools before a system goes into production, to help in troubleshooting down the line.
clustat(8) command. This command runs a utility that displays the status of the cluster. It shows membership information, quorum view, and the state of all configured user services.
clustat(8) command.
[root@clusternode4 ~]# clustat
Cluster Status for nfsclust @ Wed Dec 3 12:37:22 2008
Member Status: Quorate
Member Name ID Status
------ ---- ---- ------
clusternode5.example.com 1 Online, rgmanager
clusternode4.example.com 2 Online, Local, rgmanager
clusternode3.example.com 3 Online, rgmanager
clusternode2.example.com 4 Online, rgmanager
clusternode1.example.com 5 Online, rgmanager
Service Name Owner (Last) State
------- --- ----- ------ -----
service:nfssvc clusternode2.example.com starting
clusternode4 is the local node since it is the host from which the command was run. If rgmanager did not appear in the Status category, it could indicate that cluster services are not running on the node.
group_tool(8) command. This command provides information that you may find helpful in debugging your system. The following example shows the output of the group_tool(8) command.
[root@clusternode1 ~]# group_tool
type level name id state
fence 0 default 00010005 none
[1 2 3 4 5]
dlm 1 clvmd 00020005 none
[1 2 3 4 5]
dlm 1 rgmanager 00030005 none
[3 4 5]
dlm 1 mygfs 007f0005 none
[5]
gfs 2 mygfs 007e0005 none
[5]
none. The numbers in the brackets are the node ID numbers of the cluster nodes in the group. The clustat shows which node IDs are associated with which nodes. If you do not see a node number in the group, it is not a member of that group. For example, if a node ID is not in dlm/rgmanager group, it is not using the rgmanager dlm lock space (and probably is not running rgmanager).
cman_tool nodes -f command This command provides information about the cluster nodes that you may want to look at. The following example shows the output of the cman_tool nodes -f command.
[root@clusternode1 ~]# cman_tool nodes -f
Node Sts Inc Joined Name
1 M 752 2008-10-27 11:17:15 clusternode5.example.com
2 M 752 2008-10-27 11:17:15 clusternode4.example.com
3 M 760 2008-12-03 11:28:44 clusternode3.example.com
4 M 756 2008-12-03 11:28:26 clusternode2.example.com
5 M 744 2008-10-27 11:17:15 clusternode1.example.com
Sts heading indicates the status of a node. A status of M indicates the node is a member of the cluster. A status of X indicates that the node is dead. The Inc heading indicating the incarnation number of a node, which is for debugging purposes only.
cluster.conf is identical in each node of the cluster. If you configure your system with Conga, as in the example provided in this document, these files should be identical, but one of the files may have accidentally been deleted or altered.
cluster.conf is not bounded to the correct interface / NIC (sometimes the ip.sh script does not perform as expected).
showmount -e command on the node running the cluster service. If it shows up the right 5 exports, check your firewall configuration for all necessary ports for using NFS.
enforcing mode on your system, check your /var/log/audit.log file for any relevant messages. If you are using NFS to serve home directories, check whether the correct SELinux boolean value for nfs_home_dirs has been set to 1; this is required if you want to use NFS-based home directories on a client that is running SELinux. If you do not set this value on, you can mount the directories as root but cannot use them as home directories for your users.
/var/log/messages file for error messages from the NFS daemon.
<?xml version="1.0"?>
<cluster alias="nfsclust" config_version="1" name="nfsclust">
<fence_daemon post_fail_delay="0" post_join_delay="3"/>
<clusternodes>
<clusternode name="clusternode1.example.com" nodeid="1" votes="1">
<fence>
<method name="apc-nfs">
<device name="apc1" switch="3" port="1"/>
</method>
</fence>
</clusternode>
<clusternode name="clusternode2.example.com" nodeid="2" votes="1">
<fence>
<method name="apc-nfs">
<device name="apc1" switch="3" port="2"/>
</method>
</fence>
</clusternode>
<clusternode name="clusternode3.example.com" nodeid="3" votes="1">
<fence>
<method name="apc-nfs">
<device name="apc1" switch="3" port="3"/>
</method>
</fence>
</clusternode>
<clusternode name="clusternode4.example.com" nodeid="4" votes="1">
<fence>
<method name="apc-nfs">
<device name="apc1" switch="3" port="4"/>
</method>
</fence>
</clusternode>
<clusternode name="clusternode5.example.com" nodeid="5" votes="1">
<fence>
<method name="apc-nfs">
<device name="apc1" switch="3" port="5"/>
</method>
</fence>
</clusternode>
</clusternodes>
<cman/>
<fencedevices>
<fencedevice name="apc1" agent="fence_apc" ipaddr="link-apc" login="apc"
passwd="apc"/>
</fencedevices>
<rm/>
</cluster>
<?xml version="1.0"?>
<cluster alias="nfsclust" config_version="10" name="nfsclust">
<fence_daemon clean_start="0" post_fail_delay="0" post_join_delay="3"/>
<clusternodes>
<clusternode name="clusternode1.example.com" nodeid="1" votes="1">
<fence>
<method name="apc-nfs">
<device name="apc1" switch="3" port="1"/>
</method>
</fence>
</clusternode>
<clusternode name="clusternode2.example.com" nodeid="2" votes="1">
<fence>
<method name="apc-nfs">
<device name="apc1" switch="3" port="2"/>
</method>
</fence>
</clusternode>
<clusternode name="clusternode3.example.com" nodeid="3" votes="1">
<fence>
<method name="apc-nfs">
<device name="apc1" switch="3" port="3"/>
</method>
</fence>
</clusternode>
<clusternode name="clusternode4.example.com" nodeid="4" votes="1">
<fence>
<method name="apc-nfs">
<device name="apc1" switch="3" port="4"/>
</method>
</fence>
</clusternode>
<clusternode name="clusternode5.example.com" nodeid="5" votes="1">
<fence>
<method name="apc-nfs">
<device name="apc1" switch="3" port="5"/>
</method>
</fence>
</clusternode>
</clusternodes>
<cman/>
<fencedevices>
<fencedevice name="apc1" agent="fence_apc" ipaddr="link-apc" login="apc"
passwd="apc"/>
</fencedevices>
<rm>
<failoverdomains/>
<resources>
<ip address="10.15.86.96" monitor_link="1"/>
<clusterfs device="/dev/myvg/myvol" force_unmount="0"
fsid="39669" fstype="gfs" mountpoint="/mnt/gfs"
name="mygfs" options="rw,localflocks"/>
<nfsexport name="mynfs"/>
<nfsclient allow_recover="1" name="nfsclient1" options="rw"
target="nfsclient1.example.com"/>
<nfsclient allow_recover="1" name="nfsclient2" options="rw"
target="nfsclient2.example.com"/>
<nfsclient allow_recover="1" name="nfsclient3" options="rw"
target="nfsclient3.example.com"/>
<nfsclient allow_recover="1" name="nfsclient4" options="rw"
target="nfsclient4.example.com"/>
<nfsclient allow_recover="1" name="nfsclient5" options="rw"
target="nfsclient5.example.com"/>
</resources>
<service autostart="1" exclusive="0" name="nfssvc" recovery="relocate">
<ip ref="10.15.86.96"/>
<clusterfs ref="mygfs">
<nfsexport ref="mynfs">
<nfsclient ref="nfsclient1"/>
<nfsclient ref="nfsclient2"/>
<nfsclient ref="nfsclient3"/>
<nfsclient ref="nfsclient4"/>
<nfsclient ref="nfsclient5"/>
</nfsexport>
</clusterfs>
</service>
</rm>
</cluster>
localflocks option. The intended effect of this is to allow the NFS server to manage locks on the GFS or GFS2 filesystem without the extra overhead of passing through the GFS and GFS2 locking layers.
localflocks mount option and when it may be required, see the Global File System and Global File System 2 manuals.
localflocks option.
fsck command when failing the NFS server from one node to another.
fsid= NFS option is mandatory for NFS exports of GFS/GFS2.
service nfs restart. After this you can safely migrate your NFS services back to server 1.
| Revision History | ||||||
|---|---|---|---|---|---|---|
| Revision 1.0-2 | Thu Jul 21 2011 | |||||
| ||||||
| Revision 1.0-1 | Tue Aug 3 2010 | |||||
| ||||||
| Revision 1.0 | Thu Jan 29 2009 | |||||
| ||||||