Previous  |  Next  >  
Product: Volume Manager Guides   
Manual: Volume Manager 4.1 Administrator's Guide   

Removing a Disk from a Disk Group


Note   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. Alternatively, you can destroy the disk group as described in Destroying a Disk Group.

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

You can remove a disk on which some subdisks 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 2 (Remove a disk) from the main menu.

If the disk is used by some subdisks, this message is displayed:


VxVM ERROR V-5-2-369 The following volumes currently use part of disk mydg02:
home usrvol
Subdisks must be moved from mydg02 before it can be removed.
Move subdisks to other disks? [y,n,q,?] (default: n) 

If you choose y, then all subdisks are moved off the disk, if possible. Some subdisks may not be movable. The most common reasons why a subdisk may not be movable are as follows:

  • There is not enough space on the remaining disks.
  • Plexes or striped subdisks cannot be allocated on different disks from existing plexes or striped subdisks in the volume.

If vxdiskadm cannot move some subdisks, you may need to remove some plexes from some disks to free more space before proceeding with the disk removal operation.

 ^ Return to Top Previous  |  Next  >  
Product: Volume Manager Guides  
Manual: Volume Manager 4.1 Administrator's Guide  
VERITAS Software Corporation
www.veritas.com