Configuring I/O fencing in the Share Out mode
In Share Out mode, Volume Client systems use I/O fencing with coordinator volumes as described above. Volume Server systems, however, use I/O fencing with coordinator disks.
Note
You cannot use coordinator volume and coordinator disks together for I/O fencing on the same system or in the same cluster.
See Setting up I/O fencing.
See About I/O fencing in a SFVS environment.
Creating coordinator volumes
The following steps are to be executed on a volume server system:
-
Create a SAN disk group.
vxdg -o dgtype=san init sample_cvol_dg newdg01=Disk_1
Where sample_cvol_dg is the disk group name; and the disk group is of a SAN type.
-
Create the coordinator volume in the coordinator disk group. Use the following command:
vxassist -g sample_cvol_dg make sample_cvol 10m
Where 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 -g sample_cvol_dg volume export sample_cvol vcssysA.veritas.com exportperms=RDWR
Where vcssysA.veritas.com is a Volume Client system that the SAN volume sample_cvol is being exported to.
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 -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/vol_server/sample_cvol_dg/sample_cvol
-
After initialization, unattach the coordinator volume.
vxadm -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=example_cvol_dg
cvol_name=example_cvol
vs_host=vol_server.example.com
Where the:
-
disk_group is the name of the SAN disk group that you want to use when configuring I/O fencing for a SANVM environment.
-
cvol_name is the name of the coordinator SAN volume.
-
vs_host is the name of the volume server.
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.