Tape drives & Linux

Mark Jaffe yellowdog-general@lists.terrasoftsolutions.com
Tue Aug 6 09:11:01 2002


On 8/5/02 20:29, "Brian Mayton" <bmayton@mac.com> wrote:

> I've been given a SCSI tape drive (one that originally came out of an Apple
> server, I haven't opened up the box to figure out exactly what it is, yet, i
> do know it accepts 4gig 120mm tapes and I have a couple of them) and I'd
> like to get it to work with my YDL 2.3 server.  I did some quick searching
> on the internet and got a basic idea of how tape drives work with Linux, but
> haven't really figured it all out yet.
> 
> There has to be a website somewhere that explains how it all works, how to
> copy to the drive and from it, as well as other tape drive functions.  Can
> someone here point out such a site?  Is there a man page that explains it?
> 
> I connected through ssh to my primary server (at a remote location, when I
> go to set it up, I want to know what I'm doing) and tried a few things, man
> st brought up a manual page, and /sbin/insmod st didn't report any errors
> (in otherwords, the st module seems to be installed) which makes sense,
> since it had a big hard drive and it made sense to install everything.
> 
> My test machine (here in front of me now) that I have the tape drive plugged
> into doesn't seem to have st, as man st and /sbin/insmod st don't work.
> What packages do I need to install?
> 
> Again, if someone could point me to a site that explains all of this I would
> greatly appreciate it.
> 
> Thanks,
> Brian Mayton

Basic operations using tape can be accomplished using 'tar' commands. This
utility was initially developed specifically for support of tape drives
(hence the name, "Tape Archive utility") Use man tar to find out all the
commands.

The device to use as output is /dev/st0 usually. The device needs to be
attached and powered on at system startup for the kernel to recognize it is
available, otherwise the device files do not work.

As an example, I recently migrated all my files from an MkLinux Power120 box
to a YDL 2.2 G3/450 using a SCSI DAT. Here's the sequence:

1. From the old system, mounted DAT and issued:
    cd /;tar czpf /dev/st0 /etc /home /usr2
(create an archive on tape of /etc /home and /usr2 directories)
2. Shut down system; remove tape drive.

3. Moved tape drive to new system, issued:
    cd /oldsys;tar xzpf /dev/st0
(extract what is on tape into safe directories, move stuff around later)

I am not aware of any web page that explains all this. I just know it
because I have been working with UNIX for over 20 years!

Mark
==============================================================
Mark Jaffe              | (408) 972-9638 (home)
Chief Wizard            | (408) 807-1530 (cell/page/voicemail)
Computer Wizards        | (425) 795-6421 (FAX)
wizards44@earthlink.net | http://www.c-wizards.com/