scsi-config(8)
๐ NAME ๐
okay so bestie, welcome to scsi-config, from the Scsiinfo User's Guide, section 8 of the manual ๐ โ it queries information from a scsi device with a nice user interface. that's the whole vibe. periodt. โจ
๐ฆ SYNOPSIS ๐ฆ
scsi-config [device]
๐ DESCRIPTION ๐
scsi-config queries info from an scsi target through a nice Tcl/Tk graphical user interface. iconic behavior honestly. ๐ซถ If you don't hand it a device to query, it just goes ahead and calculates a list of available devices for you and prompts you with them โ no cap, it does the homework for you. ๐โโ๏ธ
Because it's a GUI, most things kinda explain themselves, which is lowkey the whole point. Basically scsi-config shows you a list of buttons for certain mode pages that you can press. The buttons you're actually able to press, plus the text windows with white backgrounds โ those are the ones you can modify, and your modifications get sent right back to the device. slay. โจ
In the main window there's a button that tells the device to save its data into some non volatile memory (if it even supports that, key word if ๐). Heads up though: this instructs the device to save the Read-Write Error Recovery Page, the Disconnect-Reconnect Page, the Format Device Page, the Caching Page, and the Control Mode Page into its NVRAM. Usually saving even a single one of those should write them all to the NVRAMโฆ but you never know. ๐
You can query the current values, the factory default values, and the values sitting in the NVRAM (which may not be the current parameters, mind you) straight from the device. ๐ฅ
not all combinations of button toggles or values are valid, bestie. in general you just try to set them and see which values the drive actually accepts. scsi-config rereads the device configuration immediately, s.t. you see which values where accepted. main character energy: instant feedback. ๐
Also โ and this is important โ some disk drives are notched, and those have an active notch (shown in the main window) to which all your settings apply (at least the ones from notched pages, which are also marked in slate gray). You can pick the active notch that your settings apply to (and that the values refer to) over in the Notch Page. ๐ธ
For those devices that don't have an NVRAM (generally removable media devices), and also just as a kind of backup, you can save the current settings to a file. The file will actually be a /bin/sh script that makes the necessary scsiinfo(8) calls to set the saved parameters whenever you execute it. obsessed. ๐
There's also a lovely Overview button that queries a bunch of details about the disk geometry and draws them in a nice picture. This looks esp. nice for drives with many notches โ that is, different regions on the disk with different tracks per sector settings. It's also super useful for notched drives, because you can immediately select the mode pages for each notch. ๐
โจ SOME USAGE GUIDELINES โจ
1. General Warning โ ๏ธ
Generally, do not modify settings you don't understand. It's useful to know the SCSI-II specs mentioned below. Some settings may render the device unusable or even damage it. ๐ญ Usually a power cycle resets the state (that is, if you do not save the weird settings in the NVRAM). Some settings affecting the assignment of logical sectors will render the disk unusable until the next low level format. yeah. no pressure. ๐
2. On Write Caching ๐ง
As an old warning, this also means you should not generally switch the write cache on. At least on those drives where you even have a choice at all. Reasons are twofold:
- a) It is a priori unclear when the drive will actually perform the writes. This is a bad thing when you're thinking about shutting down your machine. On the other hand, it seems sensible to assume that the drive will immediately write its cache to disk when it is idle (after all file systems are unmounted), and due to the size of the on-disk cache this will usually only need a few seconds after the shutdown โ but the drive lamp will usually not glow, as it is mostly connected to the host adapter (if you have a lamp at all) and it is not participating. ๐
There is a SCSI command to flush the caches. Linux could call it prior to shutting down, spinning a disk down. Due to my knowledge this is not yet done though. ๐
- b) As the writes are performed asynchronously, errors are reported asynchronously too. The disk might return an error at some simple read instruction related to a write which was acknowledged OK several transactions ago. This generally confuses things and makes interpreting errors very difficult. Some devices are known/said to not report write errors in this mode of operation at all. ๐
Just imagine that at the point where a file system is unmounted, or a new removable media is detected, it could tell: Oops, BTW, there was some write error ago although I told you it was OK already. the audacity fr fr ๐ญ
Thus, when you run a disk in write cache mode, keep it in mind when weird error messages occur and give the disk time to flush its buffers at shutdown. Generally it would be good if you knew more vendor specific details on how the disk operates in the write cache mode. ๐ซถ
3. Reassigning Bad Blocks Automatically ๐ธ
One of the nice features of SCSI disks is that they allow you to remap bad blocks automatically as they are detected, with no user intervention. However โ plot twist โ you actually have to enable this feature! It turned out you can not generally assume a disk is in this mode. To enable this mode or check the settings, proceed as follows:
- a) Go to the Read-Write Error Recovery Page. The AWRE (Automatic Write Reallocation Enable) and ARRE (Automatic Read Reallocation Enable) buttons enable the automatic reallocation. โ
In the same window, you can select the maximal retries performed. EER allows the disk to do some Early Error Recovery, which is fast (but might misdetect or miscorrect data). A selected DCR button (Disable CoRrection Codes) disallows the disk from using any error correction codes at all โ thus the drive will have to retry until it performs an error free read. ๐ฎโ๐จ
Usually a sector will be reallocated after even a single read retry, or the given number of failed write retries. When the sector cannot be recovered, it is reallocated, but the data is lost and an error is signalled. ๐
The other buttons there apply to error reporting as well. TB Transmits the bad Block together with the error. RC Reads Continuous, that is, it does not pause a read operation while retrying or using error code calculations to recover a bad block (thus it may return bad data). PER lets the disk report even recovered errors (Post ERror). DTE (Disable Transfer on Error) even breaks a running data transmission when an error is detected. ๐ฅ
- b) Even when the reallocation is enabled, the disk must actually have some reserved areas where it can remap the bad blocks. The Format Page controls this. Either a given number of Alternate Sectors Per LUN is set aside for the whole disk, or a given number of tracks is defined to be a zone and, for each zone, a number of sectors or tracks is put aside. These alternate data areas are where bad sectors get remapped. ๐ฆ
Note that this page is very likely to apply only to the current notch on a notched disk device. ๐
If there are no, or not many, alternate sectors reserved on your disk, you must change these settings. ๐ค
I found that those disks which allow you to modify these settings are very often set to no reserved sectors at all by the vendors, as this increases the disk's capacity. For the sake of stability, you should really modify these settings. bestie please. ๐ฅบ
If you decide to modify the number of alternate sectors, you must:
- Save the parameters to the NVRAM of the disk.
- Low-level format the disk drive (and not erase the NVRAM during this operation).
โฆto make the changes be effective. โจ
- c) Esp. when you set the disk to not report recovered errors (or when it's in a write cache mode or something), and just as a general guideline, keep an eye on the grown defects list, where the disk will report all the remappings which took place as your disk ages. ๐
The old adventurers guide line applies: Save (Backup) Early, Save (Backup) Often. Find the right time to replace your disk, avoiding too much work recovering your data. ๐
๐ BUGS ๐
scsi-config could be enhanced by making better use of Tcl/Tk. I learned much about it during my work on tk_scsiformat(8) and their would be much room for fixes and enhances. On the other hand, it fulfils its purpose as it is quite nicely already. ๐๐
As scsi-config makes heavy use of scsiinfo(8), all its bugs (esp. on defect reading) apply. ๐ญ
๐ FILES ๐
/usr/lib/scsi/cache/usr/lib/scsi/control/usr/lib/scsi/disconnect/usr/lib/scsi/error/usr/lib/scsi/format/usr/lib/scsi/generic/usr/lib/scsi/inquiry/usr/lib/scsi/notch/usr/lib/scsi/overview/usr/lib/scsi/peripheral/usr/lib/scsi/rigid/usr/lib/scsi/save-changes/usr/lib/scsi/save-file/usr/lib/scsi/tworands/usr/lib/scsi/verifyโ (Tcl/Tk subroutines used by scsi-config). ๐ง/dev/sd*/dev/sg*/dev/scd*/dev/st*/dev/nst*/dev/rmt*/dev/nrmt*
๐ SEE ALSO ๐
scsiinfo(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
๐ AUTHORS ๐
- Eric Youngdale.
- Michael Weller
<eowmob@exp-math.uni-essen.de>, Versions 1.5 & 1.7
and that's the whole thing, bestie!! ๐ this page is brought to you by scsiinfo 1.7, dated 24 August 1997 โ yes it's vintage, no we are not gatekeeping it, and honestly? it ate. ๐โจ๐ฆ take care of your disks, back up early, back up often, and stay iconic. ๐ ๐ซถ
๐ฆ 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