summaryrefslogtreecommitdiff
path: root/usr/src/man/man1m/diskinfo.1m
blob: 867592fef9350a4d93aee6964d84a3508a7adb32 (plain)
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
.\"
.\" This file and its contents are supplied under the terms of the
.\" Common Development and Distribution License ("CDDL"), version 1.0.
.\" You may only use this file in accordance with the terms of version
.\" 1.0 of the CDDL.
.\"
.\" A full copy of the text of the CDDL should have accompanied this
.\" source.  A copy of the CDDL is also available via the Internet at
.\" http://www.illumos.org/license/CDDL.
.\"
.\" Copyright 2014 Joyent, Inc.
.\" Copyright 2016 Nexenta Systems, Inc.
.\"
.Dd July 20, 2016
.Dt DISKINFO 1M
.Os
.Sh NAME
.Nm diskinfo
.Nd provide disk device inventory and status
.Sh SYNOPSIS
.Nm
.Op Fl Hp
.Op Fl c Ns | Ns Fl P
.Sh DESCRIPTION
The diskinfo tool provides information about the disk devices in the system.
Because it interacts with the kernel's device management subsystem, this tool
can be used only from the global zone.
If run in any other zone, its output will be incomplete and unreliable.
.Pp
There are three main modes.
The default mode, when neither the
.Fl c
nor
.Fl P
option is specified, provides a basic inventory of the disk devices in the
system.
Each line describes a single device and contains the device's attachment bus or
fabric type, the base name of the device in the
.Pa /dev/dsk
directory, the disk's vendor and product identification strings, the size
.Pq storage capacity
of the device, whether the device is removable, and whether it is solid-state.
.Pp
The
.Fl P
option selects physical mode.
In this mode, each line of output likewise describes one disk device; however,
the fields provided indicate the base name of the device in the
.Pa /dev/dsk
directory, the disk's vendor and product identification strings, the serial number of the
device, whether the device is faulty as diagnosed by
.Xr fmd 1M ,
whether the locate or identification indicator is on for the device
.Pq if one is present ,
and the chassis and bay number containing the disk if known.
.Pp
The
.Fl c
option selects compact mode.
This mode provides all of the information provided by both the default mode and
physical mode in a compact format.
.Pp
See
.Sx OUTPUT FIELDS
below for a detailed description of each column.
.Sh OPTIONS
.Bl -tag -width Ds
.It Fl c
Select compact mode output.
At most one of
.Fl c
and
.Fl P
may be present on the command line.
.It Fl H
Do not print a header.
This provides output suitable for passing into text processing tools.
.It Fl P
Select physical mode output.
At most one of
.Fl P
and
.Fl c
may be present on the command line.
.It Fl p
Parsable output.
When
.Fl p
is selected, the size
.Pq storage capacity
is output in bytes instead of in human-readable units, and the device's location
.Pq if known
is provided as a comma-separated chassis and bay number instead of a
human-readable location.
This option may be used in any output mode and is intended for use by scripts or
other robotic tooling.
.El
.Sh OUTPUT FIELDS
.Bl -tag -width "LOCATION"
.It Sy DISK
The base name of the device node within the
.Pa /dev/dsk
directory.
The names of partitions and/or slices, if any, are derived from this name as
described by
.Xr prtvtoc 1M .
.Pp
This field is available in all output modes.
.It Sy FLRS
A condensed field incorporating the same information as the
.Sy FLT , LOC , RMV ,
and
.Sy SSD
fields.
Each field is condensed to a single character.
If the field is true, the first letter of the field name will appear in its
position in the string; otherwise, the
.Qq Sy -
character will appear instead.
.Pp
This field is available only in compact output mode.
.It Sy FLT
A boolean field indicating whether the device is faulty; specifically, whether
the fault indicator
.Pq if one is present
is active.
.Pp
This field is available only in physical output mode.
.It Sy LOC
A boolean field indicating whether the locate or identify indicator, if any,
associated with the device's bay, is active.
.Pp
This field is available only in physical output mode.
.It Sy LOCATION
The physical chassis and bay name
.Po or chassis and bay numbers, if
.Fl p
is given
.Pc
in which the device is located.
The chassis number is identified in human-readable output within
.Bq square brackets ;
chassis 0 is the host chassis itself.
The bay name, if any, is provided by the enclosure, typically via a SCSI
Enclosure Services processor.
.Pp
This field is available in compact and physical output modes.
.It Sy PID
The product identification string reported by the device.
.Pp
This field is available in all output modes.
.It Sy RMV
A boolean field indicating whether the device is removable.
USB storage devices, most optical drives and changers, and certain other devices
that report themselves as removable will be identified as such.
.Pp
This field is available only in default output mode.
.It Sy SERIAL
The serial number of the device. The entire serial number is reported if the
device and its drivers provide it.
.Pp
This field is available in compact and physical output modes.
.It Sy SIZE
The device's storage capacity.
If the
.Fl p
option is given, this is reported in bytes; otherwise, it is reported in a
human-readable format with units specified.
All units are based on powers of 2 and are expressed in SI standard notation.
.Pp
This field is available in compact and default output modes.
.It Sy SSD
A boolean field indicating whether the device is solid-state.
.Pp
This field is available only in default output mode.
.It Sy TYPE
The transport
.Pq fabric or bus
type by which the storage device is attached to the host, if known.
Typical transports include SCSI and USB.
.Pp
This field is available in compact and default output modes.
.It Sy VID
The vendor identification string reported by the device.
.Pp
This field is available in all output modes.
.El
.Sh SEE ALSO
.Xr fmd 1M ,
.Xr prtvtoc 1M ,
.Xr sd 7D