6253 F_GETLK doesn't always return lock owner
[illumos-gate.git] / usr / src / man / man1m / metadevadm.1m
blobfbadf2a877e639f261cd3bdb16e9e0b0774a6557
1 '\" te
2 .\" Copyright (c) 2004, Sun Microsystems, Inc. All Rights Reserved
3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
4 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
5 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
6 .TH METADEVADM 1M "Mar 26, 2006"
7 .SH NAME
8 metadevadm \- update metadevice information
9 .SH SYNOPSIS
10 .LP
11 .nf
12 \fB/usr/sbin/metadevadm\fR [\fB-h\fR] [\fB-n\fR] [ [\fB-l\fR]\fB-r\fR] [\fB-s\fR \fIsetname\fR]
13      [\fB-u\fR \fIdisk_specifier\fR] [\fB-v\fR]
14 .fi
16 .SH DESCRIPTION
17 .sp
18 .LP
19 The \fBmetadevadm\fR command facilitates the administration of device ID
20 entries in Solaris Volume Manager. Use this command when the pathname stored in
21 the metadevice state database no longer correctly addresses the device or when
22 a disk drive has had its device ID changed.
23 .sp
24 .LP
25 This command requires root privileges.
26 .SH OPTIONS
27 .sp
28 .LP
29 The following options are supported.
30 .sp
31 .ne 2
32 .na
33 \fB\fB-h\fR\fR
34 .ad
35 .RS 21n
36 Provide a help display.
37 .RE
39 .sp
40 .ne 2
41 .na
42 \fB\fB-l\fR\fR
43 .ad
44 .RS 21n
45 Specify that \fBmetadevadm\fR log to \fBsyslog\fR(3C). \fBmetadevadm\fR logs to
46 the \fBDAEMON\fR facility at the \fBERR\fR level by default. See
47 \fBsyslog.conf\fR(4) for additional information on changing logging levels.
48 .sp
49 Use this option anytime. It is most useful in startup scripts and less useful
50 interactively.
51 .RE
53 .sp
54 .ne 2
55 .na
56 \fB\fB-n\fR\fR
57 .ad
58 .RS 21n
59 Emulate the effect of a command, without making any changes to the system.
60 .RE
62 .sp
63 .ne 2
64 .na
65 \fB\fB-r\fR\fR
66 .ad
67 .RS 21n
68 Recompute the pathname and disk specifier (including slice) associated with all
69 devices in the metadevice state database if the device supports device IDs. If
70 a device does not support device IDs or the device is not available, then no
71 action is taken for that device.
72 .sp
73 Use this option when the disk has been moved or readdressed.
74 .sp
75 This option is run automatically at boot time to detect device ID changes and
76 update the state database.
77 .RE
79 .sp
80 .ne 2
81 .na
82 \fB\fB-s\fR \fIsetname\fR\fR
83 .ad
84 .RS 21n
85 Specify the name of the disk set on which \fBmetadevadm\fR works. This option
86 causes the command to perform its administrative function within the specified
87 disk set. Without this option, the command performs its function on devices in
88 the local disk set.
89 .RE
91 .sp
92 .ne 2
93 .na
94 \fB\fB-u\fR \fB\fIdisk_specifier\fR\fR\fR
95 .ad
96 .RS 21n
97 Obtain the device ID associated with the \fIdisk_specifier\fR (for example,
98 \fBc1t2d0\fR) of a device and update the metadevice state database. If the
99 device ID has not changed this option does nothing. Use this option when a disk
100 drive has had its device ID changed during a firmware upgrade or due to
101 changing the controller of a storage subsystem.
105 .ne 2
107 \fB\fB-v\fR\fR
109 .RS 21n
110 Execute in verbose mode. This option has no effect when used with \fB-u\fR.
111 Verbose is the default.
114 .SH EXAMPLES
116 \fBExample 1 \fRUpdating Device ID of Disk
119 The following example updates the device \fBc2t3d0\fR:
122 .in +2
124 # metadevadm -u c2t3d0
125 Updating SLVM device relocation information for c2t3d0.
126 Old device reloc information: id19280192391293123012012010012012091398
127 New device reloc information: id19380192391293123012012010012012091398
129 .in -2
134 The following example is a variation of the preceding, using the full pathname.
137 .in +2
139 # metadevadm -u /dev/dsk/c2t3d0
141 .in -2
146 The following example uses the \fB-n\fR option, which means that the command is
147 emulated, but does not take effect. Note that when the \fB-v\fR option is used
148 with \fB-u\fR, \fB-v\fR has no effect (verbose is the default).
151 .in +2
153 # metadevadm -u -v -n c2t3d0
154 Updating SLVM device relocation information for c2t3d0.
155 Old device reloc information: id19280192391293123012012010012012091398
156 New device reloc information: id19380192391293123012012010012012091398
158 .in -2
162 \fBExample 2 \fRRecomputing Pathnames
165 In the following example, all device names are valid.
168 .in +2
170 # metadevadm -r
171 Disk movement detected.
172 Updating device names in SLVM.
174 .in -2
179 In the following example, once again device names are valid.
182 .in +2
184 # metadevadm -r -v
185 Disk movement detected.
186 Updating device names in SLVM.
187 c0t0d0s0 changed to c0t0d1s0 from device relocation information
188 id12098123lkmklsdjaasdkfjadfjakds
190 .in -2
195 In the following example, \fBmetadevadm\fR detects an invalid device name.
198 .in +2
200 # metadevadm -r
201 Invalid device relocation information detected in SLVM.
202 Please check status of following disk(s):
203 c3t0d0
205 .in -2
208 .SH RETURN VALUES
211 The following exit values are returned:
213 .ne 2
215 \fB\fB0\fR\fR
217 .RS 5n
218 Command was successful.
222 .ne 2
224 \fB\fB1\fR\fR
226 .RS 5n
227 \fBmetadevadm\fR encountered an error condition.
231 .ne 2
233 \fB\fB2\fR\fR
235 .RS 5n
236 An invalid device ID was detected when using the \fB-r\fR option. This is for
237 use in the \fBrc2.d\fR script. See \fBinit.d\fR(4).
240 .SH ATTRIBUTES
243 See \fBattributes\fR(5) for descriptions of the following attributes:
248 box;
249 c | c
250 l | l .
251 ATTRIBUTE TYPE  ATTRIBUTE VALUE
253 Interface Stability     Stable
256 .SH SEE ALSO
259 \fBmdmonitord\fR(1M), \fBmetaclear\fR(1M), \fBmetadb\fR(1M),
260 \fBmetadetach\fR(1M), \fBmetahs\fR(1M), \fBmetainit\fR(1M),
261 \fBmetaoffline\fR(1M), \fBmetaonline\fR(1M), \fBmetaparam\fR(1M),
262 \fBmetarecover\fR(1M), \fBmetarename\fR(1M), \fBmetareplace\fR(1M),
263 \fBmetaroot\fR(1M), \fBmetaset\fR(1M), \fBmetassist\fR(1M), \fBmetastat\fR(1M),
264 \fBmetasync\fR(1M), \fBmetattach\fR(1M), \fBmd.tab\fR(4), \fBmd.cf\fR(4),
265 \fBmddb.cf\fR(4), \fBmd.tab\fR(4), \fBattributes\fR(5), \fBmd\fR(7D)
268 \fI\fR