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
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.
11 .\" Copyright 2014 Joyent, Inc.
12 .\" Copyright 2016 Nexenta Systems, Inc.
19 .Nd provide disk device inventory and status
25 The diskinfo tool provides information about the disk devices in the system.
26 Because it interacts with the kernel's device management subsystem, this tool
27 can be used only from the global zone.
28 If run in any other zone, its output will be incomplete and unreliable.
30 There are three main modes.
31 The default mode, when neither the
35 option is specified, provides a basic inventory of the disk devices in the
37 Each line describes a single device and contains the device's attachment bus or
38 fabric type, the base name of the device in the
40 directory, the disk's vendor and product identification strings, the size
42 of the device, whether the device is removable, and whether it is solid-state.
46 option selects physical mode.
47 In this mode, each line of output likewise describes one disk device; however,
48 the fields provided indicate the base name of the device in the
50 directory, the disk's vendor and product identification strings, the serial
51 number of the device, whether the device is faulty as diagnosed by
53 whether the locate or identification indicator is on for the device
54 .Pq if one is present ,
55 and the chassis and bay number containing the disk if known.
59 option selects compact mode.
60 This mode provides all of the information provided by both the default mode and
61 physical mode in a compact format.
65 below for a detailed description of each column.
69 Select compact mode output.
74 may be present on the command line.
76 Do not print a header.
77 This provides output suitable for passing into text processing tools.
79 Select physical mode output.
84 may be present on the command line.
91 is output in bytes instead of in human-readable units, and the device's location
93 is provided as a comma-separated chassis and bay number instead of a
94 human-readable location.
95 This option may be used in any output mode and is intended for use by scripts or
96 other robotic tooling.
99 .Bl -tag -width "LOCATION"
101 The base name of the device node within the
104 The names of partitions and/or slices, if any, are derived from this name as
108 This field is available in all output modes.
110 A condensed field incorporating the same information as the
111 .Sy FLT , LOC , RMV ,
115 Each field is condensed to a single character.
116 If the field is true, the first letter of the field name will appear in its
117 position in the string; otherwise, the
119 character will appear instead.
121 This field is available only in compact output mode.
123 A boolean field indicating whether the device is faulty; specifically, whether
125 .Pq if one is present
128 This field is available only in physical output mode.
130 A boolean field indicating whether the locate or identify indicator, if any,
131 associated with the device's bay, is active.
133 This field is available only in physical output mode.
135 The physical chassis and bay name
136 .Po or chassis and bay numbers, if
140 in which the device is located.
141 The chassis number is identified in human-readable output within
142 .Bq square brackets ;
143 chassis 0 is the host chassis itself.
144 The bay name, if any, is provided by the enclosure, typically via a SCSI
145 Enclosure Services processor.
147 This field is available in compact and physical output modes.
149 The product identification string reported by the device.
151 This field is available in all output modes.
153 A boolean field indicating whether the device is removable.
154 USB storage devices, most optical drives and changers, and certain other devices
155 that report themselves as removable will be identified as such.
157 This field is available only in default output mode.
159 The serial number of the device.
160 The entire serial number is reported if the device and its drivers provide it.
162 This field is available in compact and physical output modes.
164 The device's storage capacity.
167 option is given, this is reported in bytes; otherwise, it is reported in a
168 human-readable format with units specified.
169 All units are based on powers of 2 and are expressed in SI standard notation.
171 This field is available in compact and default output modes.
173 A boolean field indicating whether the device is solid-state.
175 This field is available only in default output mode.
179 type by which the storage device is attached to the host, if known.
180 Typical transports include SCSI and USB.
182 This field is available in compact and default output modes.
184 The vendor identification string reported by the device.
186 This field is available in all output modes.