Veritas Volume Manager 5.0 Administrator's Guide (September 2006)

175Creating and administering disk groups
Moving disks between disk groups
Here hostname is the name of the system whose rootdg is being returned (the
system name can be confirmed with the command
uname -n).
This command removes the imported disk group from the importing host and returns
locks to its original host. The original host can then automatically import its boot disk
group at the next reboot.
Moving disks between disk groups
To move a disk between disk groups, remove the disk from one disk group and add it to
the other. For example, to move the physical disk c0t3d0 (attached with the disk name
salesdg04) from disk group salesdg and add it to disk group mktdg, use the
following commands:
# vxdg -g salesdg rmdisk salesdg04
# vxdg -g mktdg adddisk mktdg02=c0t3d0
Caution: This procedure does not save the configurations nor data on the disks.
You can also move a disk by using the
vxdiskadm command. Select item 3 (Remove
a disk) from the main menu, and then select item 1 (Add or initialize a
disk).
See “Moving objects between disk groups” on page 193 for an alternative and preferred
method of moving disks between disk groups. This method preserves VxVM objects, such
as volumes, that are configured on the disks.
Moving disk groups between systems
An important feature of disk groups is that they can be moved between systems. If all
disks in a disk group are moved from one system to another, then the disk group can be
used by the second system. You do not have to re-specify the configuration.
To move a disk group between systems
1 On the first system, stop all volumes in the disk group, then deport (disable local
access to) the disk group with the following command:
# vxdg deport diskgroup
2 Move all the disks to the second system and perform the steps necessary (system-
dependent) for the second system and VxVM to recognize the new disks.
This can require a reboot, in which case the vxconfigd daemon is restarted and
recognizes the new disks. If you do not reboot, use the command
vxdctl enable to
restart the vxconfigd program so VxVM also recognizes the disks.