SCSIINFO(8) - Linux man page online | Administration and privileged commands
Query information from a scsi device.
23 August 1997
scsiinfo(8) Scsiinfo User's Guide scsiinfo(8)
scsiinfo 1.7 23 August 1997 scsiinfo(8)
NAMEscsiinfo - query information from a scsi device
SYNOPSISscsiinfo [-options...] [device]
DESCRIPTIONscsiinfo queries information from an scsi target. This means generally using the INQUIRY scsi command or reading out SCSI-II mode pages (the number of the mode pages and corre‐ sponding 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 -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.
OPTIONSInformation available from most SCSI devices (includes SCSI-I) -i display all information from the INQUIRY scsi command. -s displays the unit serial number using the INQUIRY scsi command. -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 BUGS section. -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. scsiinfo supports all SCSI-II specified defect for‐ mats: -Flogical logical blocks. Use of this format is discouraged as the assignment of logi‐ cal blocks varies according to format parameters and status of the defect list, hence is no unique specification of defects. -Fphysical physical blocks. Return defect as cylinder, head, physical sector triples. -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. SCSI-II mode pages -C displays information from Control Mode Page. (Page 0Ah, section 184.108.40.206) -D displays information from Disconnect-Reconnect Page. (Page 02h, section 220.127.116.11) -p displays information from Peripheral Device Page. (Page 09h, section 18.104.22.168) -c displays information from Caching Page. (Page 08h, section 22.214.171.124) -f displays information from Format Device Page. (Page 03h, section 126.96.36.199) -n displays information from Notch and Partition Page. (Page 0Ch, section 188.8.131.52) A huge scsi disk might be divided into several notches. These are regions of logi‐ cal 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. -e displays information from Error Recovery page. (Page 01h, section 184.108.40.206) -g displays information from Rigid Disk Drive Geometry Page. (Page 04h, section 220.127.116.11) -V displays information from Verify Error Recovery Page. (Page 07h, section 18.104.22.168) Select mode page set By default the current settings are queried from the devices. You can however specify one of these: -M displays manufacturer defaults instead of current values. -S displays defaults saved in NVRAM instead of current values. -m displays modifiable fields instead of current values (All bits set in modifiable fields). Miscellaneous -v Show scsiinfo version. -vv Dump sense buffer in case of error. -a All of the above (expect listing defects). -l List scsi devices known to the system. -L List mode pages pages supported by this scsiinfo version and target (notched pages and active notch are also returned). -X displays output suitable for the X-based interface. Instead of nice explanations, just the bare values are written to stdout. -R Replace parameters. Use with -X and specify the values to set on the command line in the order and format as -X uses to report them. (Expert use only, definitely use the Tcl/Tk interface scsi-config(8)tomodifysettings.) Use this in conjunction with -S to modify the NVRAM settings. -X and -R can be used only with one of the display page options. -m and -M cannot be used with -R. You may use -M, -S with -L though it will make no difference. As a special goodie when using -LXR then a /bin/sh script is written to stdout that will restore the current set‐ tings of the target when executed. You can use one of -M, -S with -LXR to save the corre‐ sponding values.
BUGSRestrictions of the SCSI_IOCTL_SEND_COMMAND 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 /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.
FILES/dev/sd* /dev/sg* /dev/scd* /dev/st* /dev/nst* /dev/rmt* /dev/nrmt*
SEE ALSOscsi-config(8), scsiformat(8), tk_scsiformat(8), fdisk(8), sd(4), Draft proposed American National Standard for information systems SMALL COMPUTER SYSTEM INTERFACE - 2 (SCSI-2) MARCH 9, 1990
AUTHORSEric Youngdale. Michael Weller <@exp-math.uni-essen.de>, Versions 1.5 & 1.7
|This manual||Reference||Other manuals|
|scsiinfo(8)||referred by||scsi-config(8) | scsi-spin(8) | scsiformat(8) | tk_scsiformat(8)|
|refer to||fdisk(8) | ioctl(2) | scsi-config(8) | scsiformat(8) | sd(4) | tk_scsiformat(8)|