Veritas Volume Manager 4.1 Administrator's Guide (HP-UX 11i v3, February 2007)

Adding a Disk to a Disk Group
138 VERITAS Volume Manager Administrators Guide
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 77.
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 77.
Removing a Disk from a Disk Group
Note Before you can remove the last disk from a disk group, you must disable the disk
group as described in “Disabling a Disk Group” on page 168. Alternatively, you can
destroy the disk group as described in Destroying a Disk Group” on page 168.
A disk that contains no subdisks can be removed from its disk group with this command:
# vxdg [-g diskgroup] rmdisk diskname
For example, to remove mydg02 from the disk group, mydg, use this command:
# vxdg -g mydg rmdisk mydg02
If the disk has subdisks on it when you try to remove it, the following error message is
displayed:
VxVM vxdg ERROR V-5-1-552 Disk diskname is used by one or more
subdisks
Use -k to remove device assignment.
Using the -k option allows you to remove the disk even if subdisks are present. For more
information, see the vxdg(1M) manual page.
Caution Use of the -k option to vxdg can result in data loss.
Once the disk has been removed from its disk group, you can (optionally) remove it from
VxVM control completely, as follows:
# vxdiskunsetup devicename
For example, to remove c1t0d0 from VxVM control, use these commands:
# vxdiskunsetup c1t0d0