System Administration Commands metadevadm(1M)
NAME
metadevadm - update metadevice information
SYNOPSIS
/usr/sbin/metadevadm [-h] [-n] [ [-l]-r] [-s setname]
[-u disk_specifier] [-v]
DESCRIPTION
The metadevadm command facilitates the administration of
device ID entries in Solaris Volume Manager. Use this com-
mand when the pathname stored in the metadevice state data-
base no longer correctly addresses the device or when a disk drive has had its device ID changed. This command requires root privileges. OPTIONS The following options are supported.-h Provide a help display.
-l Specify that metadevadm log to
syslog(3C). metadevadm logs to the DAE-
MON facility at the ERR level bydefault. See syslog.conf(4) for addi-
tional information on changing logging levels. Use this option anytime. It is mostuseful in startup scripts and less use-
ful interactively.-n Emulate the effect of a command,
without making any changes to the sys-
tem.-r Recompute the pathname and disk specif-
ier (including slice) associated with all devices in the metadevice state database if the device supports deviceIDs. If a device does not support dev-
ice IDs or the device is not available,then no action is taken for that dev-
ice. Use this option when the disk has been moved or readdressed.SunOS 5.11 Last change: 26 Mar 2006 1
System Administration Commands metadevadm(1M)
This option is run automatically at boot time to detect device ID changes and update the state database.-s setname Specify the name of the disk set on
which metadevadm works. This option
causes the command to perform its administrative function within the specified disk set. Without thisoption, the command performs its func-
tion on devices in the local disk set.-u disk_specifier Obtain the device ID associated with
the disk_specifier (for example,
c1t2d0) of a device and update themetadevice state database. If the dev-
ice ID has not changed this option does nothing. Use this option when a disk drive has had its device ID changed during a firmware upgrade or due to changing the controller of a storage subsystem.-v Execute in verbose mode. This option
has no effect when used with -u. Ver-
bose is the default.EXAMPLES
Example 1 Updating Device ID of Disk The following example updates the device c2t3d0:# metadevadm -u c2t3d0
Updating SLVM device relocation information for c2t3d0. Old device reloc information: id19280192391293123012012010012012091398 New device reloc information: id19380192391293123012012010012012091398 The following example is a variation of the preceding, using the full pathname.# metadevadm -u /dev/dsk/c2t3d0
SunOS 5.11 Last change: 26 Mar 2006 2
System Administration Commands metadevadm(1M)
The following example uses the -n option, which means that
the command is emulated, but does not take effect. Note thatwhen the -v option is used with -u, -v has no effect (ver-
bose is the default).# metadevadm -u -v -n c2t3d0
Updating SLVM device relocation information for c2t3d0. Old device reloc information: id19280192391293123012012010012012091398 New device reloc information: id19380192391293123012012010012012091398 Example 2 Recomputing Pathnames In the following example, all device names are valid.# metadevadm -r
Disk movement detected. Updating device names in SLVM. In the following example, once again device names are valid.# metadevadm -r -v
Disk movement detected. Updating device names in SLVM. c0t0d0s0 changed to c0t0d1s0 from device relocation information id12098123lkmklsdjaasdkfjadfjakdsIn the following example, metadevadm detects an invalid dev-
ice name.# metadevadm -r
Invalid device relocation information detected in SLVM. Please check status of following disk(s): c3t0d0RETURN VALUES
The following exit values are returned:SunOS 5.11 Last change: 26 Mar 2006 3
System Administration Commands metadevadm(1M)
0 Command was successful.1 metadevadm encountered an error condition.
2 An invalid device ID was detected when using the -r
option. This is for use in the rc2.d script. See init.d(4).ATTRIBUTES
See attributes(5) for descriptions of the following attri-
butes:____________________________________________________________
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
|_____________________________|_____________________________|
| Availability | storage/svm ||_____________________________|_____________________________|
| Interface Stability | Committed ||_____________________________|_____________________________|
SEE ALSO
mdmonitord(1M), metaclear(1M), metadb(1M), metadetach(1M), metahs(1M), metainit(1M), metaoffline(1M), metaonline(1M), metaparam(1M), metarecover(1M), metarename(1M), metareplace(1M), metaroot(1M), metaset(1M), metassist(1M), metastat(1M), metasync(1M), metattach(1M), md.tab(4), md.cf(4), mddb.cf(4), md.tab(4), attributes(5), md(7D)SunOS 5.11 Last change: 26 Mar 2006 4