Symantec logo

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:

  1. 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.

  2. 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.

  3. 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

  1. 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
  2. Initialize the coordinator volume.
    /opt/VRTSvcs/vxfen/bin/vxfencvol -init -cvol /dev/vx/rdsk/vol_server/sample_cvol_dg/sample_cvol
  3. 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:

 To edit the VCS configuration to add the UseFence attribute

  1. Save the existing configuration:

    # haconf -dump -makero

  2. Stop VCS on all nodes.

    # hastop -all

  3. Make a backup copy of the main.cf file:

    # cd /etc/VRTSvcs/conf/config

    # cp main.cf main.orig

  4. 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

    )

  5. Save and close the file.
  6. Verify the syntax of the file /etc/VRTSvcs/conf/config/main.cf:

    # hacf -verify .

  7. 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

  8. 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.