1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
|
'\" te
.\" Copyright (c) 2004, Sun Microsystems, Inc. All Rights Reserved
.\" 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.
.\" 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.
.\" 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]
.TH METADEVADM 1M "Mar 26, 2006"
.SH NAME
metadevadm \- update metadevice information
.SH SYNOPSIS
.LP
.nf
\fB/usr/sbin/metadevadm\fR [\fB-h\fR] [\fB-n\fR] [ [\fB-l\fR]\fB-r\fR] [\fB-s\fR \fIsetname\fR]
[\fB-u\fR \fIdisk_specifier\fR] [\fB-v\fR]
.fi
.SH DESCRIPTION
.sp
.LP
The \fBmetadevadm\fR 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.
.sp
.LP
This command requires root privileges.
.SH OPTIONS
.sp
.LP
The following options are supported.
.sp
.ne 2
.na
\fB\fB-h\fR\fR
.ad
.RS 21n
Provide a help display.
.RE
.sp
.ne 2
.na
\fB\fB-l\fR\fR
.ad
.RS 21n
Specify that \fBmetadevadm\fR log to \fBsyslog\fR(3C). \fBmetadevadm\fR logs to
the \fBDAEMON\fR facility at the \fBERR\fR level by default. See
\fBsyslog.conf\fR(4) for additional information on changing logging levels.
.sp
Use this option anytime. It is most useful in startup scripts and less useful
interactively.
.RE
.sp
.ne 2
.na
\fB\fB-n\fR\fR
.ad
.RS 21n
Emulate the effect of a command, without making any changes to the system.
.RE
.sp
.ne 2
.na
\fB\fB-r\fR\fR
.ad
.RS 21n
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.
.sp
Use this option when the disk has been moved or readdressed.
.sp
This option is run automatically at boot time to detect device ID changes and
update the state database.
.RE
.sp
.ne 2
.na
\fB\fB-s\fR \fIsetname\fR\fR
.ad
.RS 21n
Specify the name of the disk set on which \fBmetadevadm\fR 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.
.RE
.sp
.ne 2
.na
\fB\fB-u\fR \fB\fIdisk_specifier\fR\fR\fR
.ad
.RS 21n
Obtain the device ID associated with the \fIdisk_specifier\fR (for example,
\fBc1t2d0\fR) 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.
.RE
.sp
.ne 2
.na
\fB\fB-v\fR\fR
.ad
.RS 21n
Execute in verbose mode. This option has no effect when used with \fB-u\fR.
Verbose is the default.
.RE
.SH EXAMPLES
.LP
\fBExample 1 \fRUpdating Device ID of Disk
.sp
.LP
The following example updates the device \fBc2t3d0\fR:
.sp
.in +2
.nf
# metadevadm -u c2t3d0
Updating SLVM device relocation information for c2t3d0.
Old device reloc information: id19280192391293123012012010012012091398
New device reloc information: id19380192391293123012012010012012091398
.fi
.in -2
.sp
.sp
.LP
The following example is a variation of the preceding, using the full pathname.
.sp
.in +2
.nf
# metadevadm -u /dev/dsk/c2t3d0
.fi
.in -2
.sp
.sp
.LP
The following example uses the \fB-n\fR option, which means that the command is
emulated, but does not take effect. Note that when the \fB-v\fR option is used
with \fB-u\fR, \fB-v\fR has no effect (verbose is the default).
.sp
.in +2
.nf
# metadevadm -u -v -n c2t3d0
Updating SLVM device relocation information for c2t3d0.
Old device reloc information: id19280192391293123012012010012012091398
New device reloc information: id19380192391293123012012010012012091398
.fi
.in -2
.sp
.LP
\fBExample 2 \fRRecomputing Pathnames
.sp
.LP
In the following example, all device names are valid.
.sp
.in +2
.nf
# metadevadm -r
Disk movement detected.
Updating device names in SLVM.
.fi
.in -2
.sp
.sp
.LP
In the following example, once again device names are valid.
.sp
.in +2
.nf
# metadevadm -r -v
Disk movement detected.
Updating device names in SLVM.
c0t0d0s0 changed to c0t0d1s0 from device relocation information
id12098123lkmklsdjaasdkfjadfjakds
.fi
.in -2
.sp
.sp
.LP
In the following example, \fBmetadevadm\fR detects an invalid device name.
.sp
.in +2
.nf
# metadevadm -r
Invalid device relocation information detected in SLVM.
Please check status of following disk(s):
c3t0d0
.fi
.in -2
.sp
.SH RETURN VALUES
.sp
.LP
The following exit values are returned:
.sp
.ne 2
.na
\fB\fB0\fR\fR
.ad
.RS 5n
Command was successful.
.RE
.sp
.ne 2
.na
\fB\fB1\fR\fR
.ad
.RS 5n
\fBmetadevadm\fR encountered an error condition.
.RE
.sp
.ne 2
.na
\fB\fB2\fR\fR
.ad
.RS 5n
An invalid device ID was detected when using the \fB-r\fR option. This is for
use in the \fBrc2.d\fR script. See \fBinit.d\fR(4).
.RE
.SH ATTRIBUTES
.sp
.LP
See \fBattributes\fR(5) for descriptions of the following attributes:
.sp
.sp
.TS
box;
c | c
l | l .
ATTRIBUTE TYPE ATTRIBUTE VALUE
_
Interface Stability Stable
.TE
.SH SEE ALSO
.sp
.LP
\fBmdmonitord\fR(1M), \fBmetaclear\fR(1M), \fBmetadb\fR(1M),
\fBmetadetach\fR(1M), \fBmetahs\fR(1M), \fBmetainit\fR(1M),
\fBmetaoffline\fR(1M), \fBmetaonline\fR(1M), \fBmetaparam\fR(1M),
\fBmetarecover\fR(1M), \fBmetarename\fR(1M), \fBmetareplace\fR(1M),
\fBmetaroot\fR(1M), \fBmetaset\fR(1M), \fBmetassist\fR(1M), \fBmetastat\fR(1M),
\fBmetasync\fR(1M), \fBmetattach\fR(1M), \fBmd.tab\fR(4), \fBmd.cf\fR(4),
\fBmddb.cf\fR(4), \fBmd.tab\fR(4), \fBattributes\fR(5), \fBmd\fR(7D)
.sp
.LP
\fI\fR
|