Before you can remove the last disk from a disk group, you must disable the disk group.
See "Disabling a disk group" on page 217.
As an alternative to disabling the disk group, you can destroy the disk group.
See "Destroying a disk group" on page 217.
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.
-k option allows you to remove the disk even if subdisks are present. For more information, see the
vxdg(1M) manual page.
Once the disk has been removed from its disk group, you can (optionally) remove it from VxVM control completely, as follows:
For example, to remove the disk
sdc from VxVM control, use this command:
You can remove a disk on which some subdisks of volumes are defined. For example, you can consolidate all the volumes onto one disk. If you use
vxdiskadm to remove a disk, you can choose to move volumes off that disk. To do this, run
vxdiskadm and select item
Remove a disk) from the main menu.
If the disk is used by some volumes, this message is displayed:
VxVM ERROR V-5-2-369 The following volumes currently use part of disk mydg02:
Volumes must be moved from mydg02 before it can be removed.
Move volumes to other disks? [y,n,q,?] (default: n)
If you choose
y, then all volumes are moved off the disk, if possible. Some volumes may not be movable. The most common reasons why a volume may not be movable are as follows:
vxdiskadm cannot move some volumes, you may need to remove some plexes from some disks to free more space before proceeding with the disk removal operation.