xref: /illumos-gate/usr/src/man/man8/diskinfo.8 (revision ddb365bfc9e868ad24ccdcb0dc91af18b10df082)
1.\"
2.\" This file and its contents are supplied under the terms of the
3.\" Common Development and Distribution License ("CDDL"), version 1.0.
4.\" You may only use this file in accordance with the terms of version
5.\" 1.0 of the CDDL.
6.\"
7.\" A full copy of the text of the CDDL should have accompanied this
8.\" source.  A copy of the CDDL is also available via the Internet at
9.\" http://www.illumos.org/license/CDDL.
10.\"
11.\" Copyright 2014 Joyent, Inc.
12.\" Copyright 2016 Nexenta Systems, Inc.
13.\"
14.Dd July 20, 2016
15.Dt DISKINFO 8
16.Os
17.Sh NAME
18.Nm diskinfo
19.Nd provide disk device inventory and status
20.Sh SYNOPSIS
21.Nm
22.Op Fl Hp
23.Op Fl c Ns | Ns Fl P
24.Sh DESCRIPTION
25The diskinfo tool provides information about the disk devices in the system.
26Because it interacts with the kernel's device management subsystem, this tool
27can be used only from the global zone.
28If run in any other zone, its output will be incomplete and unreliable.
29.Pp
30There are three main modes.
31The default mode, when neither the
32.Fl c
33nor
34.Fl P
35option is specified, provides a basic inventory of the disk devices in the
36system.
37Each line describes a single device and contains the device's attachment bus or
38fabric type, the base name of the device in the
39.Pa /dev/dsk
40directory, the disk's vendor and product identification strings, the size
41.Pq storage capacity
42of the device, whether the device is removable, and whether it is solid-state.
43.Pp
44The
45.Fl P
46option selects physical mode.
47In this mode, each line of output likewise describes one disk device; however,
48the fields provided indicate the base name of the device in the
49.Pa /dev/dsk
50directory, the disk's vendor and product identification strings, the serial
51number of the device, whether the device is faulty as diagnosed by
52.Xr fmd 8 ,
53whether the locate or identification indicator is on for the device
54.Pq if one is present ,
55and the chassis and bay number containing the disk if known.
56.Pp
57The
58.Fl c
59option selects compact mode.
60This mode provides all of the information provided by both the default mode and
61physical mode in a compact format.
62.Pp
63See
64.Sx OUTPUT FIELDS
65below for a detailed description of each column.
66.Sh OPTIONS
67.Bl -tag -width Ds
68.It Fl c
69Select compact mode output.
70At most one of
71.Fl c
72and
73.Fl P
74may be present on the command line.
75.It Fl H
76Do not print a header.
77This provides output suitable for passing into text processing tools.
78.It Fl P
79Select physical mode output.
80At most one of
81.Fl P
82and
83.Fl c
84may be present on the command line.
85.It Fl p
86Parsable output.
87When
88.Fl p
89is selected, the size
90.Pq storage capacity
91is output in bytes instead of in human-readable units, and the device's location
92.Pq if known
93is provided as a comma-separated chassis and bay number instead of a
94human-readable location.
95This option may be used in any output mode and is intended for use by scripts or
96other robotic tooling.
97.El
98.Sh OUTPUT FIELDS
99.Bl -tag -width "LOCATION"
100.It Sy DISK
101The base name of the device node within the
102.Pa /dev/dsk
103directory.
104The names of partitions and/or slices, if any, are derived from this name as
105described by
106.Xr prtvtoc 8 .
107.Pp
108This field is available in all output modes.
109.It Sy FLRS
110A condensed field incorporating the same information as the
111.Sy FLT , LOC , RMV ,
112and
113.Sy SSD
114fields.
115Each field is condensed to a single character.
116If the field is true, the first letter of the field name will appear in its
117position in the string; otherwise, the
118.Qq Sy -
119character will appear instead.
120.Pp
121This field is available only in compact output mode.
122.It Sy FLT
123A boolean field indicating whether the device is faulty; specifically, whether
124the fault indicator
125.Pq if one is present
126is active.
127.Pp
128This field is available only in physical output mode.
129.It Sy LOC
130A boolean field indicating whether the locate or identify indicator, if any,
131associated with the device's bay, is active.
132.Pp
133This field is available only in physical output mode.
134.It Sy LOCATION
135The physical chassis and bay name
136.Po or chassis and bay numbers, if
137.Fl p
138is given
139.Pc
140in which the device is located.
141The chassis number is identified in human-readable output within
142.Bq square brackets ;
143chassis 0 is the host chassis itself.
144The bay name, if any, is provided by the enclosure, typically via a SCSI
145Enclosure Services processor.
146.Pp
147This field is available in compact and physical output modes.
148.It Sy PID
149The product identification string reported by the device.
150.Pp
151This field is available in all output modes.
152.It Sy RMV
153A boolean field indicating whether the device is removable.
154USB storage devices, most optical drives and changers, and certain other devices
155that report themselves as removable will be identified as such.
156.Pp
157This field is available only in default output mode.
158.It Sy SERIAL
159The serial number of the device.
160The entire serial number is reported if the device and its drivers provide it.
161.Pp
162This field is available in compact and physical output modes.
163.It Sy SIZE
164The device's storage capacity.
165If the
166.Fl p
167option is given, this is reported in bytes; otherwise, it is reported in a
168human-readable format with units specified.
169All units are based on powers of 2 and are expressed in SI standard notation.
170.Pp
171This field is available in compact and default output modes.
172.It Sy SSD
173A boolean field indicating whether the device is solid-state.
174.Pp
175This field is available only in default output mode.
176.It Sy TYPE
177The transport
178.Pq fabric or bus
179type by which the storage device is attached to the host, if known.
180Typical transports include SCSI and USB.
181.Pp
182This field is available in compact and default output modes.
183.It Sy VID
184The vendor identification string reported by the device.
185.Pp
186This field is available in all output modes.
187.El
188.Sh SEE ALSO
189.Xr sd 4D ,
190.Xr fmd 8 ,
191.Xr prtvtoc 8
192