Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

Solaris Volume Manager Administration Guide
Previous Next

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:

  • You can rename any volume except the following:

    • Soft partitions

    • Volumes on which soft partitions are directly built

    • Volumes that are being used as log devices

    • Hot spare pools

  • You can rename volumes within a disk set. However, you cannot rename volumes to move them from one disk set to another disk set.

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:

  • You cannot rename a volume that is currently in use. This restriction includes volumes that are used as mounted file systems, as swap, or as active storage for applications or databases. Thus, before you use the metarename command, stop all access to the volume that is being renamed. For example, unmount a mounted file system.

  • You cannot exchange volumes in a failed state.

  • You cannot exchange volumes that are using a hot spare replacement.

  • An exchange can only take place between volumes with a direct parent-child relationship.

  • You cannot exchange (or rename) a log device. The workaround is to detach the log device and attach another log device of the desired name.

  • Only volumes can be exchanged. You cannot exchange slices or hot spares.

How 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
      old-volume-name

      Specifies the name of the existing volume.

      new-volume-name

      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.

Previous Next

 
 
  Published under the terms fo the Public Documentation License Version 1.01. Design by Interspire