Removable Storage V
Summary:
- SCSI
- CD-R(OM/W)
- Tape Drives
- All Other SCSI Storage Devices
SCSI
SCSI is regarded as the high-end standard for storage devices. While it isn't necessarily faster than IDE/ATA, it sports features like tagging, queuing and error correction. You can also 'hot swap' SCSI devices, i.e. connect and disconnect devices from the chain during system runtime. In contrast to IDE/ATA, SCSI requires quite an amount of electronics on the devices, which accounts for their higher price (although there certainly is a bit of marketing policy involved here, too).
Compatibility
Compatibility shouldn't be an issue, GNU/Linux supports almost all adapters available today, even the latest Ultra160 SCSI cards. And if you can connect a device to a SCSI bus, chances are it is supported by GNU/Linux, too. Devices include CD-R(OM/W), MODs, Flopticals, Bernoulli, WORM, Jaz, ZIP, ORB, PDs and more.
If you have trouble with GNU/Linux recognizing or working correctly with your SCSI host adapter, you may have to use some boot-prompt arguments to show GNU/Linux the right way.
Make sure you've set up the hardware correctly (cables, IDs, terminators).
Booting
Even if you want to boot from SCSI devices, you do not have to recompile the kernel.
mkinitrd
man mkinitrd
Hardware Detection
SCSI host adapters should be detected and configured automatically. Look for an entry in '/etc/conf.modules' that starts with
alias scsi_hostadapter
A second way to check detection is
dmesg
scsi : 1 host {first SCSI device} {second SCSI device} etc.
Finally you can check the availability of SCSI devices in '/proc/scsi'. This directory includes subdirectories for configured SCSI-host adapters and SCSI hardware (
less /proc/scsi/scsi
Adding SCSI Devices During Runtime
Sometimes you want to access a device that wasn't powered on during boot. Power on the device and issue this command (as 'root'):
echo "scsi add-single-device {host} {channel} {ID} {LUN}" >/proc/scsi/scsi
Example: You have only one SCSI adapter and the device ID is 4:
echo "scsi add-single-device 0 0 4 0" >/proc/scsi/scsi
You can achieve the same more comfortably with the scsiadd programm.
Another - perhaps more 'legal' way - would be unloading and reloading the SCSI driver:
- Unmount all SCSI devices.
- Run
modprobe -r scsi_hostadapter
- Run
modprobe scsi_hostadapter
CD-R(OM/W)
Device files are '/dev/scd0' for the first SCSI CD-R(W), '/dev/scd1' for the second etc.
In pre-LM 7 or if you're not using 'supermount', it might be necessary to issue this command via '/etc/rc.d/rc.local'
modprobe scsi_hostadapter
to be able to mount the drive later (e.g. with
mount /dev/scd0 -t auto /mnt/cd
In some older releases, if your SCSI CD was a burner and you wanted to burn CD's as a normal user, you'd have to perform these steps (as 'root'):
- Add your 'normal' user name to the
cdwriter
- If the burner is the first or only SCSI CD drive in your computer ('dev/sdc0'), also run
chgrp cdwriter /dev/scd0
Tape Drives
SCSI tape drives are accessed via /dev/st0 resp. /dev/nst0 (no rewind). Tapes are usually used unmounted with the
mt
tar
afio
Example:
mt -f /dev/ftape retension
rewinds the tape. Read
man mt
All Other SCSI Storage Devices
They all use '/dev/sda' (first SCSI device) or '/dev/sdb' (second SCSI device) etc. as device files. You can have up to 128 SCSI devices.
Preformatted media come with different partition schemes: Jaz and ZIP disks have their data partition on the fourth primary partition (e.g. '/dev/sda4'), ORB disks on the first logical partition (e.g. '/dev/sda5'). Create mount directories for them in '/mnt' and add appropriate entries to '/etc/fstab' (see the article on mounting partitions).
Use the standard tools to partition and format them (
cfdisk
mke2fs
If you want to boot off these disks, follow the outline given in the Jaz-Drive-~HowTo.
Related Resources:
The FAQ for comp.periphs.scsi
'scsi.txt' in 'linux/Documentation'
CDROM-HOWTO
CD-Writing-HOWTO
Linux - Optical Disk HOWTO
Zip Drive Mini-HOWTO
Jaz Drive HOWTO
Revision / Modified: Sep. 11, 2001
Author: Tom Berger
Legal: This page is covered by the GNU Free Documentation License. Standard disclaimers of warranty apply. Copyright LSTB and Mandrakesoft.
Version 1.4 last modified by AdminWiki on 05/03/2006 at 15:03
Document data
- Lost account?
- Join the community, be part of the Club: it's free!
- Get the PWP Download Subscription!