Symantec logo

Renaming a disk group

Only one disk group of a given name can exist per system. It is not possible to import or deport a disk group when the target system already has a disk group of the same name. To avoid this problem, VxVM allows you to rename a disk group during import or deport.

To rename a disk group during import, use the following command:

# vxdg [-t] -n newdg import diskgroup

If the -t option is included, the import is temporary and does not persist across reboots. In this case, the stored name of the disk group remains unchanged on its original host, but the disk group is known by the name specified by newdg to the importing host. If the -t option is not used, the name change is permanent.

For example, this command temporarily renames the disk group, mydg, as mytempdg on import:

# vxdg -t -n mytempdg import mydg

To rename a disk group during deport, use the following command:

# vxdg [-h hostname] -n newdg deport diskgroup

When renaming on deport, you can specify the -h hostname option to assign a lock to an alternate host. This ensures that the disk group is automatically imported when the alternate host reboots.

For example, this command renames the disk group, mydg, as myexdg, and deports it to the host, jingo:

# vxdg -h jingo -n myexdg deport mydg

You cannot use this method to rename the boot disk group because it contains volumes that are in use by mounted file systems (such as /). To rename the boot disk group, you must first unmirror and unencapsulate the root disk, and then re-encapsulate and remirror the root disk in a different disk group. This disk group becomes the new boot disk group.

See "Rootability" on page 109.

 To temporarily move the boot disk group, bootdg, from one host to another (for repair work on the root volume, for example) and then move it back

  1. On the original host, identify the disk group ID of the bootdg disk group to be imported with the following command:

    # vxdisk -g bootdg -s list

    This command results in output such as the following:

    dgname: rootdg

    dgid: 774226267.1025.tweety

    In this example, the administrator has chosen to name the boot disk group as rootdg. The ID of this disk group is 774226267.1025.tweety.

    This procedure assumes that all the disks in the boot disk group are accessible by both hosts.

  2. Shut down the original host.
  1. On the importing host, import and rename the rootdg disk group with this command:

# vxdg -tC -n newdg import diskgroup

The -t option indicates a temporary import name, and the -C option clears import locks. The -n option specifies an alternate name for the rootdg being imported so that it does not conflict with the existing rootdg. diskgroup is the disk group ID of the disk group being imported (for example, 774226267.1025.tweety).

If a reboot or crash occurs at this point, the temporarily imported disk group becomes unimported and requires a reimport.

  1. After the necessary work has been done on the imported disk group, deport it back to its original host with this command:

# vxdg -h hostname deport diskgroup

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.