[root@cltest1]/root# chnfsdom Current local domain: N/A [root@cltest1]/root# chnfsdom cltestnfs [root@cltest1]/root# chnfsdom Current local domain: cltestnfs [root@cltest1]/root#
[root@cltest2]/root# smitty cl_mkfs +--------------------------------------------------------------------------+ | Select the Volume Group to hold the new File System | | | | Move cursor to desired item and press Enter. | | | | #Volume Group Resource Group Node List | | RG1vg cltestRG1app_group cltest1,cltest2 | | RG2vg cltestRG2app_group cltest1,cltest2 | | | | F1=Help F2=Refresh F3=Cancel | | F8=Image F10=Exit Enter=Do | | /=Find n=Find Next | +--------------------------------------------------------------------------+ +--------------------------------------------------------------------------+ | Select the type of File System to be Added | | | | Move cursor to desired item and press Enter. | | | | Enhanced Journaled File System | | Standard Journaled File System | | Compressed Journaled File System | | Large File Enabled Journaled File System | | | | F1=Help F2=Refresh F3=Cancel | | F8=Image F10=Exit Enter=Do | | /=Find n=Find Next | +--------------------------------------------------------------------------+ Add an Enhanced Journaled File System Type or select values in entry fields. Press Enter AFTER making all desired changes. [Entry Fields] Resource Group cltestRG2app_group * Node Names cltest1,cltest2 Volume group name RG2vg SIZE of file system Unit Size M + * Number of units [100] # * MOUNT POINT [/RG2/source_nfs] / PERMISSIONS read/write + Mount OPTIONS [] + Block Size (bytes) 4096 + Inline Log? no + Inline Log size (MBytes) [] # Logical Volume for Log + Extended Attribute Format Version 1 + Enable Quota Management? no + [root@cltest2]/root# lsvg -l RG2vg RG2vg: LV NAME TYPE LPs PPs PVs LV STATE MOUNT POINT RG2testlv jfs2 11 11 1 open/syncd /RG2 loglv02 jfs2log 1 1 1 open/syncd N/A tsmRG2lv jfs2 1 1 1 open/syncd /tsm/RG2 fslv01 jfs2 8 8 1 open/syncd /RG2man imperva2lv jfs2 2 2 1 open/syncd /opt/RG2db/imperva loglv03 jfslog 1 1 1 closed/syncd N/A lv02 jfs2 1 1 1 open/syncd /RG2/source_nfs lv03 jfs2 1 1 1 open/syncd /RG2/stable_nfs [root@cltest2]/root# mkdir /mnt/shared_nfs [root@cltest1]/root# mkdir /mnt/shared_nfs
[root@cltest2]/root# smitty cm_change_resources_for_a_rg_select +--------------------------------------------------------------------------+ | Change/Show Resources and Attributes for a Resource Group | | | | Move cursor to desired item and press Enter. | | | | cltestRG1app_group | | cltestRG2app_group | | | | F1=Help F2=Refresh F3=Cancel | | F8=Image F10=Exit Enter=Do | | /=Find n=Find Next | +--------------------------------------------------------------------------+ Change/Show All Resources and Attributes for a Custom Resource Group Type or select values in entry fields. Press Enter AFTER making all desired changes. [Entry Fields] Resource Group Name cltestRG2app_group Inter-site Management Policy ignore Participating Nodes from Primary Site cltest2 Participating Nodes from Secondary Site cltest1 Startup Policy Online On Home Node Only Fallover Policy Fallover To Next Priority Node In The List Fallback Policy Never Fallback Service IP Labels/Addresses [cltestRG2] + Application Servers [cltestRG2app] + Volume Groups [RG2vg ] + Use forced varyon of volume groups, if necessary false + Automatically Import Volume Groups false + Filesystems (empty is ALL for VGs specified) [ ] + Filesystems Consistency Check fsck + Filesystems Recovery Method sequential + Filesystems mounted before IP configured true + Filesystems/Directories to Export (NFSv2/3) [] + + Filesystems/Directories to Export (NFSv4) [/RG2/source_nfs] + Stable Storage Path (NFSv4) [/RG2/stable_nfs] + Filesystems/Directories to NFS Mount [/mnt/shared_nfs;/RG2/source_nfs] Network For NFS Mount [] + Tape Resources [] + Raw Disk PVIDs [] + Fast Connect Services [] + Communication Links [] + Primary Workload Manager Class [] + Secondary Workload Manager Class [] + Miscellaneous Data [] WPAR Name [] +
If you want to specify special options for NFS-exporting in HACMP, you can create a /usr/es/sbin/cluster/etc/exports
file. This file has the same format as the regular AIX /etc/exports file.
Note: Using this alternate exports file is optional. HACMP checks the /usr/es/sbin/cluster/etc/exports
file when NFS-exporting a file system or directory. If there is an entry for the file system or directory in this file, HACMP uses the options listed. If the file system or directory for NFS-export is not listed in the file; or, if the alternate file does not exist, the file system or directory is NFS-exported with the default option of root access for all cluster nodes.
[root@cltest2]/root# smitty cm_ver_and_sync.select HACMP Verification and Synchronization (Active Cluster Nodes Exist) Type or select values in entry fields. Press Enter AFTER making all desired changes. [Entry Fields] * Verify changes only? [No] + * Logging [Standard] + [root@cltest2]/root# mount | grep nfs /dev/lv02 /RG2/source_nfs jfs2 Oct 11 10:17 rw,log=/dev/loglv02 /dev/lv03 /RG2/stable_nfs jfs2 Oct 11 10:19 rw,log=/dev/loglv02 cltestRG2 /RG2/source_nfs /mnt/shared_nfs nfs4 Oct 11 10:49 vers=4,hard,intr [root@cltest1]/root# mount | grep nfs cltestRG2 /RG2/source_nfs /mnt/shared_nfs nfs4 Oct 11 10:49 vers=4,hard,intr
[root@cltest2]/root# cat /etc/motd > /mnt/shared_nfs/file-from-cltest2 [root@cltest1]/root# cat /mnt/shared_nfs/file-from-cltest2 ******************************************************************************* * * * IT IS AN OFFENSE TO CONTINUE WITHOUT PROPER AUTHORIZATION. * * * * This system is for the use of authorized users only. Individuals using * * this computer system without authority, or in excess of their authority, * * are subject to having all of their activities on this system monitored and * * recorded by system personnel. In the course of monitoring individuals * * improperly using this system, or in the course of system maintenance, the * * activities of authorized users may also be monitored. Anyone using this * * system expressly consents to such monitoring and is advised that if such * * monitoring reveals possible evidence of criminal activity, system * * personnel may provide the evidence of such monitoring to law enforcement * * officials. * * * ******************************************************************************* [root@cltest1]/root# date > /mnt/shared_nfs/file-from-cltest2 [root@cltest2]/root# cat /mnt/shared_nfs/file-from-cltest2 Tue Oct 11 10:53:50 GMT+02:00 2011
[root@cltest2]/root# while [ 0 ] # do # date +%s >> /mnt/shared_nfs/moving_resource # sleep 1 # done [root@cltest1]/root# smitty cl_resgrp_move_node.select +--------------------------------------------------------------------------+ | Select a Destination Node | | | | Move cursor to desired item and press Enter. | | | | # *Denotes Originally Configured Highest Priority Node | | cltest1 | | | | F1=Help F2=Refresh F3=Cancel | | F8=Image F10=Exit Enter=Do | F1=Help | /=Find n=Find Next | F9=Shell +--------------------------------------------------------------------------+ Move Resource Group(s) to Another Node Type or select values in entry fields. Press Enter AFTER making all desired changes. [Entry Fields] Resource Group(s) to be Moved cltestRG2app_group Destination Node cltest1 [root@cltest1]/root# clstat -o clstat - HACMP Cluster Status Monitor ------------------------------------- Cluster: cltestcluster (1235217180) Tue Oct 11 11:20:00 2011 State: UP Nodes: 2 SubState: STABLE Node: cltest1 State: UP Interface: cltest1 (3) Address: 172.19.28.17 State: UP Interface: cltest1_hdisk2_01 (1) Address: 0.0.0.0 State: UP Interface: cltest1_hdisk1_01 (2) Address: 0.0.0.0 State: UP Interface: cltestRG1 (3) Address: 172.19.28.19 State: UP Interface: cltestRG2 (3) Address: 172.19.28.20 State: UP Resource Group: cltestRG1app_group State: On line Resource Group: cltestRG2app_group State: On line Node: cltest2 State: UP Interface: cltest2 (3) Address: 172.19.28.18 State: UP Interface: cltest2_hdisk2_01 (1) Address: 0.0.0.0 State: UP Interface: cltest2_hdisk1_01 (2) Address: 0.0.0.0 State: UP
The move of the resource blocks the nfs more or less 150 seconds
[root@cltest1]/mnt/shared_nfs# echo $(($(tail -n 1 moving_resource) - $(head -n 1 moving_resource))) 298 [root@cltest1]/mnt/shared_nfs# wc -l moving_resource 136 moving_resource
[root@cltest1]/root# exportfs -v /RG2/source_nfs -vers=4,root=cltestRG1:cltestRG2:cltest1:cltest2,hasrv=cltestRG2 [root@cltest1]/root# mkdir /mnt/shared_nfs/clients [root@cltest1]/root# chmod 777 /mnt/shared_nfs/clients [root@labotest]/root# mount -o vers=4 cltestRG2:/RG2/source_nfs /mnt/cltest [root@labotest]/root# while [ 0 ] # do # date +%s >> /mnt/cltest/clients/file-from-labotest # sleep 1 # done [root@cltest1]/root# smitty cl_resgrp_move_node.select [root@labotest]/mnt/cltest/clients# echo $(($(tail -n 1 file-from-labotest) - $(head -n 1 file-from-labotest) )) 223 [root@labotest]/mnt/cltest/clients# wc -l file-from-labotest 63 file-from-labotest [root@labotest]/mnt/cltest/clients#
The move of the resource blocks the nfs more or less 150 seconds