Solaris Volume Manager Administration Guide

Renaming Volumes

Background Information for Renaming Volumes

Solaris Volume Manager enables you to rename most types of volumes at any time, subject to some constraints. You can use either the Enhanced Storage tool within the Solaris Management Console or the command line (the metarename(1M) command) to rename volumes.

Renaming volumes or switching volume names is an administrative convenience for the management of volume names. For example, you could arrange all file system mount points in a desired numeric range. You might rename volumes to maintain a naming scheme for your logical volumes or to allow a transactional volume to use the same name as the name of the underlying volume.

Note –

Transactional volumes are no longer valid in Solaris Volume Manager. You can rename transactional volumes to replace them.

Before you rename a volume, make sure that it is not currently in use. For a file system, make sure that it is not mounted or being used as swap. Other applications that use the raw device, such as a database, should have their own way of stopping access to the data.

Specific considerations for renaming volumes include the following:

Exchanging Volume Names

Using the metarename command with the -x option exchanges the names of volumes that have a parent-child relationship. For more information, see How to Rename a Volume and the metarename(1M) man page. The name of an existing volume is exchanged with one of its subcomponents. For example, this type of exchange can occur between a mirror and one of its submirrors. The metarename -x command can make it easier to mirror or unmirror an existing volume.

Note –

You must use the command line to exchange volume names. This functionality is currently unavailable in the Solaris Volume Manager GUI. However, you can rename a volume with either the command line or the GUI.

Consider the following guidelines when you want to rename a volume:

ProcedureHow to Rename a Volume

Before You Begin

Check the volume name requirements (Volume Names), and Background Information for Renaming Volumes.

  1. Unmount the file system that uses the volume.

    # umount /filesystem
  2. To rename the volume, use one of the following methods:

    • From the Enhanced Storage tool within the Solaris Management Console, open the Volumes. Select the volume you want to rename. Click the right mouse on the icon. Choose the Properties option. Then, follow the onscreen instructions. For more information, see the online help.

    • Use the following form of the metarename command:

      # metarename old-volume-name new-volume-name

      Specifies the name of the existing volume.


      Specifies the new name for the existing volume.

      See the metarename(1M) man page for more information.

  3. Edit the /etc/vfstab file to refer to the new volume name, if necessary.

  4. Remount the file system.

    # mount /filesystem

Example 20–3 Renaming a Volume Used for a File System

In the following example, the volume, d10, is renamed to d100.

# umount /home
# metarename d10 d100
d10: has been renamed to d100
(Edit the /etc/vfstab file so that the file system  references the new volume)
# mount /home

Because d10 contains a mounted file system, the file system must be unmounted before the volume can be renamed. If the volume is used for a file system with an entry in the /etc/vfstab file, the entry must be changed to reference the new volume name.

For example, if the /etc/vfstab file contains the following entry for the file system:

/dev/md/dsk/d10 /dev/md/rdsk/d10 /docs home 2 yes -

Change the entry to read as follows:

/dev/md/dsk/d100 /dev/md/rdsk/d100 /docs home 2 yes -

Then, remount the file system.

If you have an existing mirror or transactional volume, you can use the metarename -x command to remove the mirror or transactional volume and keep data on the underlying volume. For a transactional volume, as long as the master device is a volume ( either a RAID-0, RAID-1, or RAID-5 volume), you can keep data on that volume.