scsiinfo(8)
β¨ scsiinfo(8) β¨
okay bestie, listen up β this is the Scsiinfo User's Guide, and it's genuinely one of those little tools that just works. π
πΈ NAME πΈ
scsiinfo β query information from a scsi device
π¦ SYNOPSIS π¦
scsiinfo [-options...] [device]
π DESCRIPTION π
So basically scsiinfo queries information from an scsi target. Most of the time that means hitting the INQUIRY scsi command, or reading out SCSI-II mode pages (the page numbers and their matching SCSI-II sections are all listed below, don't worry). It also lets you modify some of these settings on the scsi device β if the device is even willing to support that. π
Other than -v and -l, you have to specify exactly one scsi device to work on. And you're not limited, bestie β you can pass any linux scsi device: disk, tape, cdrom, generic scsi.
Some scsi devices (typically non-removable disks) will let you store your modifications in some non-volatile memory. Heads up though: some of these settings β like the ones 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. π So like, be careful, okay?
β¨ OPTIONS β¨
π Information available from most SCSI devices (includes SCSI-I)
-iβ display all the information from theINQUIRYscsi command.-sβ displays the unit serial number using theINQUIRYscsi command.-dβ display factory and grown defect lists (typically for disks only).
ngl this one's got a limit: it's currently only possible to return defect information up to 4096 bytes. Longer defect lists are truncated. See the BUGS section. π
-farg β 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.scsiinfosupports all SCSI-II specified defect formats:-Flogicalβ logical blocks. Use of this format is discouraged, because the assignment of logical blocks varies according to format parameters and status of the defect list, hence it's 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. (Page0Ah, section7.3.3.1)-Dβ displays information from Disconnect-Reconnect Page. (Page02h, section7.3.3.2)-pβ displays information from Peripheral Device Page. (Page09h, section7.3.3.3)-cβ displays information from Caching Page. (Page08h, section8.3.3.1)-fβ displays information from Format Device Page. (Page03h, section8.3.3.3)-nβ displays information from Notch and Partition Page. (Page0Ch, section8.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.
-eβ displays information from Error Recovery page. (Page01h, section8.3.3.6)-gβ displays information from Rigid Disk Drive Geometry Page. (Page04h, section8.3.3.7)-Vβ displays information from Verify Error Recovery Page. (Page07h, section8.3.3.8)
π§ Select mode page set π§
By default the current settings are queried from the devices. But you can also 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β Showscsiinfoversion.-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 thisscsiinfoversion 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 tostdout.-Rβ Replace parameters. Use with-Xand specify the values to set on the command line in the order and format as-Xuses to report them. (Expert use only, definitely use the Tcl/Tk interfacescsi-config(8)to modify settings.)
Use this in conjunction with -S to modify the NVRAM settings.
-Xand-Rcan be used only with one of the display page options.-mand-Mcannot 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 settings of the target when executed. You can use one of -M, -S with -LXR to save the corresponding values. π₯
π BUGS π
Restrictions 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. π no cap.
π FILES π
/dev/sd*/dev/sg*/dev/scd*/dev/st*/dev/nst*/dev/rmt*/dev/nrmt*
π SEE ALSO π
Also, the whole vibe source material:
Draft proposed American National Standard for information systems
SMALL COMPUTER SYSTEM INTERFACE - 2 (SCSI-2)
MARCH 9, 1990
π«Ά AUTHORS π«Ά
- Eric Youngdale.
- Michael Weller
<eowmob@exp-math.uni-essen.de>, Versions 1.5 & 1.7
and that's the whole thing bestie β¨ this is scsiinfo version 1.7, dated 23 August 1997, and it literally ate π
go query some scsi devices, you got this π¦π
π¦ where this page comes from
- debian bookworm: scsitools 0.12-4
- debian trixie: scsitools 0.12-6
- ubuntu jammy: scsitools 0.12-3ubuntu1
- ubuntu noble: scsitools 0.12-4ubuntu1
- ubuntu questing: scsitools 0.13
- ubuntu resolute: scsitools 0.15
- ubuntu stonking: scsitools 0.15
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms