scsi-spin(8)

✨ scsi-spin ✨

okay bestie, welcome to the scsi-spin page from the System Manager's Manual πŸ’– this is the little tool that lets you decide when a SCSI device is awake and when it's napping. no cap.


🌸 NAME 🌸

scsi-spin β€” spin up and down a SCSI device πŸŒ€


πŸŽ€ SYNOPSIS πŸŽ€

scsi-spin [-options...] [device]

πŸ’« DESCRIPTION πŸ’«

so basically, scsi-spin lets you, the user, manually spin up and spin down a SCSI device. that's it, that's the whole vibe. πŸ‘‘

this is lowkey iconic if you've got noisy (or hot πŸ”₯) drives sitting in a machine you barely ever touch. key word: barely. this is not the same as that kernel patch floating around that auto-spins the drive down after some time β€” scsi-spin is completely manual, periodt. and spinning down a drive that's in use, especially the one holding the scsi-spin binary itself, is probably a really bad idea. πŸ˜­πŸ’€

and because the universe loves a safety net, scsi-spin tries to not let you do that: to avoid running into trouble with such cases, it verifies that the device you want to work on is not currently in use by scanning the mounted file system description file for a partition living on it, and it throws an error if that's the case. 🫢


πŸ’… OPTIONS πŸ’…

  • -u, --up β€” spin up device. wakey wakey ⬆️
  • -d, --down β€” spin down device. naptime ⬇️
  • -e, --loej β€” load or eject medium from drive (use along with -u or -d). teamwork makes the dream work 🀝
  • -w, --wait=[n] β€” wait up to n seconds for the spin up/down command to complete. default is to return immediately after the command was sent to the device. either repeat -w n times or set n to define the time to wait before to report a timeout. ⏳
  • -l, --lock β€” prevent removal of medium from device. πŸ”’ hands off
  • -L, --unlock β€” allow removal of medium from device. πŸ”“ go ahead bestie
  • -I, --oldioctl β€” use legacy ioctl interface instead of SG_IO to dialog with device (could not be supported on all platforms). -e and -w are not allowed with this option. πŸ§“ vintage behaviour fr
  • -v, --verbose=[n] β€” verbose mode. either repeat -v or set n accordingly to increase verbosity. 1 is verbose, 2 is debug (dump SCSI commands and Sense buffer). πŸ—£οΈ the way it just tells you everything
  • -f, --force β€” force spinning up/down the device even if it is in use. 😀 no thoughts, just spin
  • -n, --noact β€” do nothing but check if the device is in use. all vibes, zero action πŸ™ˆ
  • -p, --proc β€” use /proc/mounts instead of /etc/mtab to determine if the device is in use or not. πŸ“‚
  • device β€” the device is any name in the filesystem which points to a SCSI block device (sd, scd) or generic SCSI device (sg). See section below. πŸ‘‡

πŸ¦‹ SCSI devices naming convention πŸ¦‹

🌈 Old kernel naming convention

it is typically /dev/sd[a-z] , /dev/scd[0-9]* or /dev/sg[0-9]*.

🧚 scsidev naming convention

it is typically /dev/scsi/s[rdg]h[0-9]*-e????c?i?l? or /dev/scsi/<aliasname>.

⭐ devfs naming convention

it is typically /dev/scsi/host[0-9]/bus[0-9]/target[0-9]/lun[0-9]/disc (same for cd and generic devices) or short name /dev/sd/c[0-9]b[0-9]t[0-9]u[0-9] when devfsd "new compatibility entries" naming scheme is enabled.


πŸ‘€ SEE ALSO πŸ‘€

scsiinfo(8), sg_start(8), sd(4), proc(5),


πŸ’œ AUTHORS πŸ’œ

  • Eric Delaunay <delaunay@debian.org>, 2001
  • Rob Browning <rlb@cs.utexas.edu>, 1998

so yeah, that's the whole page. spin responsibly, don't spin down your own drive, and definitely don't spin down the drive that's literally running the binary you just typed. πŸ’€

this page was serving 03 September 2001 energy** (that's the date stamp on it, fr fr)** β€” and it's part of the System Manager's Manual collection, so you know it's the real deal.** πŸŽ€βœ¨ bye bestie, go forth and spin πŸ’–