Re: How do I mount SCSI Tape Drive?
On Sat, 21 Aug 1999, Lance Hoffmeyer wrote:
> I finally got my SCSI card to work (interrupt conflicts with
> network card!). Now I need to figure out how to mount the tape
> proc gives me this:
> cat /proc/scsi/scsi
> Attached devices:
> Host: scsi0 Channel: 00 Id: 02 Lun: 00
> Vendor: CONNER Model: CTT8000-S Rev: 1.17
> Type: Sequential-Access ANSI SCSI revision: 02
> How do I mount the tape drive?
Mounting: I don't think you can mount tape drives. I think mounting
implies the existence of a file system. While there is formatting,
there isn't a file system on the tape. I use afio to write my
archive directly to the tape device.
Disclaimer: I can speak only of my Conner 3080 drive, but the
commands don't seem to have much to say about the specific drive, so
should be the same for any scsi drives.
With the Connor 3080 drive I had to use the command
mt -f /dev/st0 erase
to get reliable backups.
For backups, many use tar, dump, and afio. Some will certainly
provide you with favorite scripts.
I don't know about dump, and I don't use tar for critical backups.
As I understand the tar, tar concatenates the files then compresses
the archive, (if you use compression). If you compress then lose any
part of the archive due to tape damage, you lose archive from that
point on. I understand that Gnu tar is better, but I do not know
much about it and I have not used it for serious backups.
Contrast this with afio which compresses before it concatenates to
form the archive. If you lose a part of the archvie, the afio
program will scan forward to find a 'magic number' that signals the
start of the next valid file. All you lose is the damaged file.
Before you start, please read the afio and mt (mag tape) manuals!
Then experiment with backing up and restoring inconsequential files
until you are certain you can rely on what you are doing.
I usually do this without a script, bare-handed, and will describe
how I do it. To do your backups with afio, you need a file list to
find path.to.directory.you.want.backed.up > file.list
Edit file.list, eliminating file you don't want backed up, and
perhaps prepare an include.list and/or exclude.list. The backup:
cat file.list | afio -ovZ -w include.list -W exclude.list /dev/st0
The device, /dev/st0, will rewind the tape when the tape operation
is through. If you want to put a second record at the end of this
one, you will need to use the device
that does not rewind at the end of the backup operation,
or to scroll to the end of some number of backups with the mt
mt -f /dev/nst0 fsf 1
to move the tape forward to the second backup (or use some larger
number if you have several backups on the tape) before you run
afio -ivZ /dev/nst0
which will leave your tape at the end of the record.
mt -f /dev/nst0 rewind
should rewind the tape.
I write myself notes and keep them with the tapes reminding me how I
made the backup and how to reinstall it.
I reinstall with
afio -ibvZ -w include.list -W exclude_List /dev/st0
where i = install, v= verbose, Z compresses with gzip.
I encourage you to read the manual for mt, afio, and experiment with
your tape drive. Then as I said earlier, experiment with backing up
and restoring inconsequential files until you are certain you can
rely on what you are doing.
Then build and modify a rescue floppy or
(see metalab.unc.edu) to include the mt and afio commands. I
acknowledge help many others have given me. Thanks!
David Teague, email@example.com
Debian GNU/Linux Because software support is free, timely,
useful, technically accurate, and friendly.
(I'm hoping this is all of the above!)