The vxdg utility manages volume manager disk groups. You can use vxdg to specify that a disk group is cluster-sharable. The -s option to vxdg is provided to initialize or import a disk group as "shared."
If the cluster software has been run to set up the cluster, create a shared disk group with the following command:
vxdg -s init diskgroup [medianame=]accessname |
where diskgroup is the disk group name; medianame is the administrative name chosen for the disk; and accessname is the disk access name (or device name).
Disk groups can be imported as shared using vxdg -s import. If the disk groups were set up before the cluster software was run, you can import the disk groups into the cluster arrangement with the command:
vxdg -s import diskgroup |
where diskgroup is the disk group name or ID. On subsequent cluster restarts, the disk group will automatically be imported as shared. Note that it can be necessary to deport the disk group (using vxdg deport diskgroup) before invoking this command.
A disk group can be converted from shared to private by deporting it through vxdg deport and then importing it with vxdg import diskgroup.
The system cannot tell if a disk is shared. To protect data integrity when dealing with disks that can be accessed by multiple systems, an system administrator must be careful to use the correct designation when adding a disk to a disk group. If an administrator attempts to add a disk that is not physically shared to a shared disk group, the volume manager allows this on the node where the disk is accessible if that node is the only one in the cluster. However, other nodes will not be able to join the cluster. Furthermore, if an administrator attempts to add the same disk to different disk groups on two nodes at the same time, the results are undefined. All configurations should therefore be handled on one node only.
vxdg has a force option (-f) that can be used to force-import a disk group or force-add a disk to a disk group.
The force option (-f) should be used with caution and should be used only if the system administrator is fully aware of the possible consequences.
When a cluster is restarted, CVM can refuse to auto-import a disk group for one of the following reasons:
A disk in that disk group is no longer accessible because of hardware errors on the disk. In this case, you can import the disk group again with the force option as follows:
vxdg -s -f import diskgroup |
Some of the nodes to which disks in the disk group are attached are not currently in the cluster, so the disk group cannot access all of its disks. In this case, a forced import is unsafe and should not be attempted (because it can result in inconsistent mirrors).
If CVM will not add a disk to an existing disk group (because that disk is not attached to the same node(s) as the other disks in the disk group), you can force-add the disk as follows:
vxdg -f adddisk -g diskgroup [medianame=]accessname |
vxdg can also be used to list shared disk groups. The following command displays one line of information for each disk group:
vxdg list
The output from this command is as follows:
NAME STATE ID rootdg enabled 774215886.1025.teal group2 enabled,shared 774575420.1170.teal group1 enabled,shared 774222028.1090.teal |
Shared disk groups are designated with the flag shared.
The following command displays one line of information for each shared disk group:
vxdg -s list |
The output for this command is as follows:
NAME STATE ID group2 enabled,shared 774575420.1170.teal group1 enabled,shared 774222028.1090.teal |
The following command shows information about one specific disk group, including whether it is shared or not:
vxdg list diskgroup |
where diskgroup is the disk group name.
The output for vxdg list group1 on the master (for the disk group group1) is as follows:
Group: group1 dgid: 774222028.1090.teal import-id: 32768.1749 flags: shared copies: nconfig=default nlog=default config: seqno=0.1976 permlen=1456 free=1448 templen=6 loglen=220 config disk c1t0d0s2 copy 1 len=1456 state=clean online config disk c1t1d0s2 copy 1 len=1456 state=clean online log disk c1t0d0s2 copy 1 len=220 log disk c1t1d0s2 copy 1 len=220 |
Note that the flags: field is set to shared. The output for the same command is slightly different on a slave.