G.P.Gilfoyle, August 30, 1999
The University of Richmond Physics Department maintains an array of computers for the research activities of the faculty and students in the Department. The array consists of Sun workstations and Intel-based PC's running the Linux operating system. To archive data from the array, one of the machines, psc1, has a digital audio tape (DAT) drive and a compact disk (CD) writer. This document is a short description of the use of these devices.
DAT Drive
The DAT drive is a SCSI device located in the lowest expansion slot on the front, right-hand-side of psc1. The software device name is /dev/st0.
mt -f /dev/st0 status |
Gives the status of the DAT drive. |
mt -f /dev/st0 eod | Positions the tape at the end of valid data. |
mt -f /dev/st0 rewind | Rewinds the tape. |
mt -f /dev/st0 offline | Rewinds and unloads the tape. The button on the front panel of the drive does the same thing. |
tar -tvf /dev/st0 |
Lists the files on the tape. |
tar -cvf /dev/st0 courses/ | Writes all the data in the `courses' directory to the tape. |
tar -xvf /dev/st0 $PATH/filename | Extracts $PATH/filename from the tape. |
CD-Writer
The CD-writer is an IDE device located in the top expansion slot on the front, right-hand-side of psc1. The software device name is /mnt/cdrom.
modprobe -r ide-cd
Note the need for the `-r' option to remove this module from the kernel.
modprobe ide-scsi
mkisofs -r -o my_image directory_being_archived
cdrecord -v speed=2 dev=1,0,0 -data my_image
This usually takes awhile, but cdrecord prints out a running total of the amount of data that has been written. I've also tried speed=4 and it worked fine.
modprobe -r ide-scsi
You will now be able to read the CD in the usual manner. Even though you removed the module for reading CD's (ide-cd, see Step 4), the ide-cd module will be reloaded into the kernel when you mount the cdrom.
Useful Commands for CD-Writing
To see what modules have been installed in the kernel use the lsmod command whose output looks like the following
Module Size Used by ide-scsi 7072 0 eepro100 12272 2 (autoclean)
where the ide-scsi module has been installed for cd writing. The eepro100 module is always there on psc1 because it is the driver for the ethernet controller.
The command
cdrecord -scanbus
shows the peripheral devices that can use the SCSI protocol. This will include any SCSI devices themselves or a IDE CD writer that uses SCSI emulation. If the ide-scsi module is installed in the kernel (see Step 5 in the previous section), then the output is the following.
Cdrecord release 1.8a24 Copyright (C) 1995-1999 Jörg Schilling scsibus0: 0) 'SEAGATE ' 'ST118202LW ' '0005' Disk 1) 'SEAGATE ' 'ST118202LW ' '0005' Disk 2) 'SEAGATE ' 'DAT 04106-XXX' '7270' Removable Tape 3) * 4) * 5) * 6) * 7) * scsibus1: 100) 'Memorex ' 'CRW-1622 ' 'D3.9' Removable CD-ROM 101) * 102) * 103) * 104) * 105) * 106) * 107) *If the ide-scsi module is NOT installed in the kernel the output is only for the devices on scsibus0 and nothing is printed out for scsibus1.
When Disaster Strikes.
Currently, the default kernel on psc1 is NOT the one that has cd-writing enabled. This is because of the problems with the automounter that I hope to fix in the future. To use the cd-writing kernel reboot psc1 and at the Lilo prompt enter
LILO: linux1
and follow the instructions above. To get back to the default kernel, just reboot and don't enter anything.