Configuring I/O fencing in Volume Serving mode
In Volume Serving mode, you must configure a coordinator volume for I/O fencing on the Volume Clients.
See About I/O fencing in a SFVS environment.
Setting up the coordinator volume
This procedure describes how to set up a coordinator volume.
To set up the coordinator volume
-
Create the SANVM domain.
You can use the same domain as the one that the data disk groups use. You do not have to create a special domain for the coordinator volume.
-
Create the Volume Server set in the domain.
You can use the same volume server set as the one used for data disk groups. You do not have to create a special volume server set for the coordinator volume.
-
Put the Volume Server in a Volume Server set.
-
Create a SAN disk group in the Volume Server set.
vxadm -m sfms.example.com diskgroup create sample_cvol_dg Disk1_19 vsset=vsset1 dgtype=san
Where sfms.example.com is the SFMS hostname; sample_cvol_dg is the disk group name; vsset1 is the volume server set's name; and the disk group is of a SAN type.
-
Create a SAN volume in the SAN disk group. Create the coordinator volume in the coordinator disk group. Use the following command:
vxadm -m sfms.example.com -g sample_cvol_dg volume create sample_cvolsample_cvol 10m
Where sfms.example.com is the SFMS hostname; sample_cvol_dg is the disk group name; sample_cvol is the SAN volume, and 10m is the size of the volume.
-
Export the SAN volumes to all volume clients in the cluster with read-write permissions.
vxadm -m sfms.example.com -g sample_cvol_dg volume export sample_cvol sysA.veritas.com exportperms=RDWR
Where sfms.example.com is the SFMS hostname; sample_cvol_dg is the disk group name; sample_cvol is the SAN volume; and sysA is the Volume Client system.
Once you have set up the coordinator volume, you need to initialize it using the /opt/VRTSvcs/vxfen/bin/vxfencvol utility. Attach the SAN volume, and then initialize it with the following commands:
To attach the SAN volume and initialize the volume
-
Attach the coordinator volume on a Volume Client with read-write permissions.
vxadm -m sfms.example.com -g sample_cvol_dg volume attach sample_cvol sysA.example.com access_policy=RDWR io_access=ANY
-
Initialize the coordinator volume.
/opt/VRTSvcs/vxfen/bin/vxfencvol -init -cvol /dev/vx/rdsk/testdom1/sample_cvol_dg/sample_cvol
-
After initialization, unattach the coordinator volume.
vxadm -m sfms.example.com -g sample_cvol_dg volume unattach sample_cvol sysA.example.com.
Editing the vxfenmode file
Before you start to modify the vxfenmode file, you must stop fencing. You then need to modify the vxfenmode file. The file is in /etc/vxfenmode.
To edit the vxfenmode file
The following code is a sample configuration for SANVM in the vxfenmode file:
vxfen_mode=customized
vxfen_mechanism=sanvm
disk_group=sample_cvol_dg
cvol_name=sample_cvol
vs_host=vsA.example.com
sanvm_domain_name=domain1
Where the:
-
disk_group is the name of the coordinator SAN disk group.
-
cvol_name is the name of the coordinator SAN volume.
-
vs_host is the name of the volume server. Symantec recommends that this be the name associated with a virtual IP address residing on the volume server.
-
sanvm_domain_name is the name of the SANVM domain that the coordinator disk group is a part of. This is optional in the Share Out mode.
Editing the main.cf file
Edit the main.cf file to configure VCS for fencing.
To edit the VCS configuration to add the UseFence attribute
-
Save the existing configuration:
# haconf -dump -makero
-
Stop VCS on all nodes.
# hastop -all
-
Make a backup copy of the main.cf file:
# cd /etc/VRTSvcs/conf/config
# cp main.cf main.orig
-
On one node, use vi or another text editor to edit the main.cf file. Modify the list of cluster attributes by adding the attribute, UseFence, and assign it a value of
SCSI3
. For example, with the attribute added this portion of the file resembles:
cluster vcs_cluster2 (
UserNames = { admin = "cDRpdxPmHpzS." }
Administrators = { admin }
CounterInterval = 5
UseFence = SCSI3
)
-
Save and close the file.
-
Verify the syntax of the file /etc/VRTSvcs/conf/config/main.cf:
# hacf -verify .
-
Using rcp, or some other available utility, copy the VCS configuration file to the other nodes. For example, on each node:
# rcp north:/etc/VRTSvcs/conf/config/main.cf
/etc/VRTSvcs/conf/config
-
With the configuration file in place on each system, shut down and then restart each system.
# reboot
Note
To ensure that I/O fencing is shut down properly, use the shutdown
command instead of the reboot
command.