There are two ways to use metarename, one with and one without the -x option. The first method (without -x) renames an existing metadevice
to a new name. This makes managing the metadevice namespace easier. The metadevice being renamed cannot be mounted or open, nor can the new name already exist. For example, to rename a metadevice that contains a mounted file system, you would first need to unmount the file system.
With the second way to use metarename, using the -x option, metarename switches (exchanges) the names of an existing layered metadevice and one of its subdevices. (In Solaris Volume Manager terms, a layered metadevice can be either a mirror or
a trans metadevice.) The -x option enables you to switch the metadevice names of a mirror and one of its submirrors, or a trans metadevice and its master device.
metarename -x makes it easier to mirror or unmirror an existing stripe or concatenation, and to create or remove a trans of an existing metadevice.
When used to mirror an existing stripe or concatenatation, you must stop access to the device. For example, if the device contains a mounted file system, you must first unmount the file system before doing the rename.
The metarename -x command can also be used to create a trans metadevice from an existing metadevice, or to untrans the device. This applies only to the master device. A logging device cannot be created or removed with metarename. Before you can
rename a trans device, you must detach the logging device. Then you must stop access to the trans metadevice itself.
You cannot rename or switch metadevices that are in an error state or that have subcomponents in an error state, or metadevices actively using a hot spare replacement.
You can only switch metadevices that have a direct child/parent relationship. You could not, for example, directly exchange a stripe in a mirror that is a master device with the trans metadevice.
You must use the -f flag when switching members of a trans metadevice.
Only metadevices can be switched, not slices.
|