scsidev: SCSI utility for linux
I recently built an external SCSI enclosure, using an old tower. I used 3 SCSI drives, and built a LVM, so I could concatenate the drives together into one large drive, to host my temporary video scratch files. Everything went well, until I rebooted. One of the SCSI drives, I had to assign a lower SCSI ID, since I ran out of jumpers! I only needed on more jumper to give the drive a higher SCSI ID, like 12, so I have it one of my lower ID's that was unused (3). When I rebooted, I forgot about how Linux allocates the SCSI device names, which is basically a first come first serve allocation. /dev/sda would be linked to the lowest SCSI HD ID. If you have a mix of SCSI devices, like scanners, ZIP disks, and even ide-scsi emulation, then things get complicated quickly. Especially if you add and remove the SCSI devices while your system is powered up.
I started reading the SCSI 2.4 HOWTO, to see if there was a better way of taking care of how linux names SCSI devices. I think a lot of these issues are addressed in 2.6, but I have not had time to test out that kernel yet, especially on production equipment. The HOWTO points to a very useful utility which helps overcome the way linux 2.4 names SCSI devices. It basically creates a /dev/scsi directory, and the naming of the SCSI devices stay the same. This way, you can point to those devices in /etc/fstab or you can even create aliases that are easy to remember like /dev/scsi/scsiscanner, /dev/scsi/scsizip, or /dev/dvdburner.
Have a look at this utility, which should probably help a lot of folks out who have SCSI on their system, and have a lot of mixed SCSI devices like I do. It should really simplify SCSI naming, and make things more organized if you need to add and remove any SCSI devices while your system is running:
Got something to add? Send me email.
Increase ad revenue 50-250% with Ezoic
More Articles by Bruce Garlock
© 2011-03-19 Bruce Garlock