Creating and administering disk groups 171

Adding a disk to a disk group

A disk group must have at least one disk associated with it. A new disk group can be created when you use menu item 1 (Add or initialize one or more disks) of the vxdiskadm command to add disks to VxVM control, as described in Adding a disk to VxVM” on page 97. The disks to be added to a disk group must not belong to an existing disk group.

You can also use the vxdiskadd command to create a new disk group:#vxdiskadd c1t0d0

where c1t0d0 in this example is the device name of a disk that is not currently assigned to a disk group. The command dialog is similar to that described for the vxdiskadm command in Adding a disk to VxVM” on page 97.

Disk groups can also be created by using the vxdg init command:#vxdg init diskgroup [cds=onoff] diskname=devicenameFor example, to create a disk group named mktdg on device c1t0d0:#vxdg init mktdg mktdg01=c1t0d0

The disk specified by the device name, c1t0d0, must have been previously initialized with vxdiskadd or vxdiskadm, and must not currently belong to a disk group.

You can use the cds attribute with the vxdg init command to specify whether a new disk group is compatible with the Cross-platform Data Sharing (CDS) feature. In Veritas Volume Manager 4.0 and later releases, newly created disk groups are compatible with CDS by default (equivalent to specifying cds=on). If you want to change this behavior, edit the file /etc/default/vxdg, and set the attribute-value pair cds=off in this file before creating a new disk group.

Alternatively, you can use the following command to set this attribute for a disk group:

#vxdg -g diskgroup set cds=onoff

Adding a disk to a disk group

To add a disk to an existing disk group, use menu item 1 (Add or initialize one or more disks) of the vxdiskadm command. For details of this procedure, see Adding a disk to VxVM” on page 97.

You can also use the vxdiskadd command to add a disk to a disk group, for example:

# vxdiskadd c1t1d0

where c1t1d0 is the device name of a disk that is not currently assigned to a disk group. The command dialog is similar to that described for the vxdiskadm command in Adding a disk to VxVM” on page 97.