Go to main content

man pages section 8: System Administration Commands

Exit Print View

Updated: Thursday, June 13, 2019
 
 

metadevadm(8)

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 command when the pathname stored in the metadevice state database 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 DAEMON facility at the ERR level by default. See syslog.conf(5) for additional information on changing logging levels.

Use this option anytime. It is most useful in startup scripts and less useful interactively.

–n

Emulate the effect of a command, without making any changes to the system.

–r

Recompute the pathname and disk specifier (including slice) associated with all devices in the metadevice state database if the device supports device IDs. If a device does not support device IDs or the device is not available, then no action is taken for that device.

Use this option when the disk has been moved or readdressed.

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 this option, the command performs its function 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 the metadevice state database. If the device 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. Verbose 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

The following example uses the –n option, which means that the command is emulated, but does not take effect. Note that when the –v option is used with –u, –v has no effect (verbose 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
id12098123lkmklsdjaasdkfjadfjakds

In the following example, metadevadm detects an invalid device name.


# metadevadm -r
Invalid device relocation information detected in SLVM.
Please check status of following disk(s):
c3t0d0

Return Values

The following exit values are returned:

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(5).

Attributes

See attributes(7) for descriptions of the following attributes:

ATTRIBUTE TYPE
ATTRIBUTE VALUE
Availability
storage/svm
Interface Stability
Committed

See Also

md(4D), md.cf(5), md.tab(5), md.tab(5), mddb.cf(5), attributes(7), metasync(8), mdmonitord(8), metaclear(8), metadb(8), metadetach(8), metahs(8), metainit(8), metaoffline(8), metaonline(8), metaparam(8), metarecover(8), metarename(8), metareplace(8), metaset(8), metassist(8), metastat(8), metattach(8)