File: scsiinfo.8

package info (click to toggle)
scsitools 0.12-2.2
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 1,196 kB
  • ctags: 820
  • sloc: ansic: 6,043; tcl: 2,144; sh: 920; makefile: 131
file content (260 lines) | stat: -rw-r--r-- 6,417 bytes parent folder | download | duplicates (9)
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
.TH scsiinfo 8 "23 August 1997" "scsiinfo 1.7" "Scsiinfo User's Guide"
.SH NAME
scsiinfo \- query information from a scsi device
.SH SYNOPSIS
.BI "scsiinfo [-" "options..." "] [" device ]
.SH DESCRIPTION
.B scsiinfo
queries information from an scsi target. This means generally using the
.B INQUIRY
scsi command or reading out SCSI-II mode pages (the number of the mode pages and corresponding
sections of the SCSI-II sections is given below). It allows also to modify some of these
settings on the scsi device (if it supports it).

Except for the
.BR -v " and " -l 
options you must specify exactly one scsi device to work on. You may specify any linux
scsi device disk, tape, cdrom, generic scsi.

Some scsi devices (typically non removable disks) will allow to store your modifications
in some non volatile memory. Some of these settings (for example those dealing with the
layout of logical blocks and sectors set aside as replacements for erroneous blocks) might
render the disk unusable until a low level format.

.SH OPTIONS
.SS Information available from most SCSI devices (includes SCSI-I)
.TP
.B -i
display all information from the
.B INQUIRY
scsi command.
.TP
.B -s
displays the unit serial number using the
.B INQUIRY
scsi command.
.TP
.B -d
display factory and grown defect lists (typically for disks only).

It is currently only possible to return defect information up to 4096 bytes. Longer
defect lists are truncated. See the
.B BUGS
section.
.TP
.BI -f " arg"
specify the format in which to return the defect information. The target
may decide to fail reporting defect information in unsupported formats or decide to
return data in a different format.
.B scsiinfo
supports all SCSI-II specified defect formats:
.RS
.TP
.B -Flogical
logical blocks. Use of this format is discouraged as the assignment of logical blocks
varies according to format parameters and status of the defect list, hence is no
unique specification of defects.
.TP
.B -Fphysical
physical blocks. Return defect as cylinder, head, physical sector triples.
.TP
.B -Findex
defect bytes from index.  Return defect as cylinder, head, byte offset from index. The
SCSI-II standard is not very clear on this to me. It is unclear to me if there is a single
bad byte, this offset away from the index hole on the disk (this is only figuratively,
there won't be a hole as used to be on 5 1/4" floppy disks), or if all bytes from the
index to this position are considered to be bad.
.RE

.SS SCSI-II mode pages
.TP
.B -C
displays information from Control Mode Page.
(Page
.BR 0Ah , 
section
.BR 7.3.3.1 )
.TP
.B -D
displays information from Disconnect-Reconnect Page.
(Page
.BR 02h , 
section
.BR 7.3.3.2 )
.TP
.B -p
displays information from Peripheral Device Page.
(Page
.BR 09h , 
section
.BR 7.3.3.3 )
.TP
.B -c
displays information from Caching Page.
(Page
.BR 08h , 
section
.BR 8.3.3.1 )
.TP
.B -f
displays information from Format Device Page.
(Page
.BR 03h , 
section
.BR 8.3.3.3 )
.TP
.B -n
displays information from Notch and Partition Page.
(Page
.BR 0Ch , 
section
.BR 8.3.3.5 )

A huge scsi disk might be divided into several notches. These are regions of logical blocks or
cylinders on the disk. Each such notch might have different values for the other mode pages.

Typically a modern disk will have several notches and have more sectors per track on the
inner tracks/notches on the disk and more sectors per track on the outer (longer) tracks for
optimal capacity. Also different amounts of reserved backup sectors may be available in the
notches depending on their capacity.
.TP
.B -e
displays information from Error Recovery page.
(Page
.BR 01h , 
section
.BR 8.3.3.6 )
.TP
.B -g
displays information from Rigid Disk Drive Geometry Page.
(Page
.BR 04h , 
section
.BR 8.3.3.7 )
.TP
.B -V
displays information from Verify Error Recovery Page.
(Page
.BR 07h , 
section
.BR 8.3.3.8 )

.SS Select mode page set
By default the current settings are queried from the devices. You can however
specify one of these:

.TP
.B -M   
displays manufacturer defaults instead of current values.
.TP
.B -S   
displays defaults saved in NVRAM instead of current values.
.TP
.B -m
displays modifiable fields instead of current values (All bits set in modifiable fields).

.SS Miscellaneous
.TP
.B -v
Show
.B scsiinfo
version.
.TP
.B -vv
Dump sense buffer in case of error.
.TP
.B -a
All of the above (expect listing defects).
.TP
.B -l
List scsi devices known to the system.
.TP
.B -L
List mode pages pages supported by this
.B scsiinfo
version and target (notched pages and active notch are also returned).
.TP
.B -X
displays output suitable for the X-based interface. Instead of nice explanations, just the
bare values are written to stdout.
.TP
.B -R
Replace parameters. Use with
.B -X
and specify the values to set on the command line in the order and format as
.B -X
uses to report them. (Expert use only, definitely use the Tcl/Tk interface
.BR scsi-config (8) to modify settings.)

Use this in conjunction with
.B -S
to modify the NVRAM settings.

.PP
.BR -X " and " -R
can be used only with one of the display page options.

.BR -m " and " -M
cannot be used with
.BR -R .

You may use
.BR -M ", " -S " with " -L
though it will make no difference. As a special goodie when using
.B -LXR
then a
.I /bin/sh
script is written
to stdout that will restore the current settings of the target when
executed. You can use one of
.BR -M ", " -S " with " -LXR
to save the corresponding values.
.SH BUGS
Restrictions of the
.B SCSI_IOCTL_SEND_COMMAND
.BR ioctl (2)
call make it impossible to send or receive more than 4096 bytes of arguments. This could be avoided by using the proper
generic scsi device
.I /dev/sg*
instead, at least where the kernel is compiled to support it. Most of the time this is not needed
though and thus I'm myself to lazy to do it. It will basically just truncate the vendor
specified primary defect lists. Thus I'm too lazy to fix it.

.SH FILES
.I /dev/sd*
.br
.I /dev/sg*
.br
.I /dev/scd*
.br
.I /dev/st*
.br
.I /dev/nst*
.br
.I /dev/rmt*
.br
.I /dev/nrmt*

.SH SEE ALSO
.BR scsi-config (8),
.BR scsiformat (8),
.BR tk_scsiformat (8),
.BR fdisk (8),
.BR sd (4),

.B Draft proposed
.br
.B American National Standard
.br
.B for information systems

.B SMALL COMPUTER SYSTEM INTERFACE - 2
.br
.B (SCSI-2)

.B MARCH 9, 1990

.SH AUTHORS
Eric Youngdale.
.br
Michael Weller <eowmob@exp-math.uni-essen.de>, Versions 1.5 & 1.7