PDA

View Full Version : Confused about tape drive



alanthing
March 23rd, 2007, 07:47 AM
I've been a part-time Linux sysadmin for a few years, but since I've mainly just worked with a few development machines, I haven't worked with SCSI much. We recently purchased a lot of new equipment, one of which is an Exabyte Magnum 1x7 autoloader. It has an LTO3 drive inside. After figuring out that our $50 Sun SCSI cable was bad, it successfully connected to the machine.

ExaByte provides two Linux utilities- ltoTool and libTool. ltoTool interfaces with tape drives...

# ltoTool -S
ltoTool V4.63 -- Copyright (c) 1996-2006, Exabyte Corp.

Scanning your system for tape devices...OK
Device | Address
------------------------+-----------------
HP Ultrium 3-SCSI | /dev/sg1

Done

And libTool interfaces with autochangers...

# libTool -S
libTool V1.79 - (c) 2002-2006 Exabyte Corp.

Scanning your system for media changers...OK
Device | Address
------------------------+-----------------
EXABYTE LTO 1x7 2U | /dev/sg0

With libTool, I can rotate the magazine, load tapes, clean, etc. ltoTool lets me do testing of read/write, diagnostics, toggle hardware compression, etc.

Mtx works for the autoloader too...

# mtx -f /dev/sg0 status
Storage Changer /dev/sg0:1 Drives, 7 Slots ( 0 Import/Export )
Data Transfer Element 0:Full (Unknown Storage Element Loaded):VolumeTag =
Storage Element 1:Empty:VolumeTag=
Storage Element 2:Full :VolumeTag=A00002
Storage Element 3:Full :VolumeTag=A00003
Storage Element 4:Full :VolumeTag=A00004
Storage Element 5:Full :VolumeTag=A00005
Storage Element 6:Full :VolumeTag=A00006
Storage Element 7:Full :VolumeTag=CLNA01

So, I started looking at AMANDA yesterday. Wow, for a new person to this, it's a lot to absorb. I spent hours reading the documentation on this wiki and I think I have a pretty good understanding of it. I can't get it to work though. Part of it may be my confusion of the way the /dev devices are assigned.

The Exabyte autoloader is /dev/sg0 and the HP Ultrium LTO3 tape drive is at /dev/sg1. I've tested the various commands in ltoTool and libTool and they work great. It came time for me to run amtapetype to get information on my tapes, and that's where I got stuck. Using /dev/sg1 as my device didn't do anything. I read the wiki and it looks like I have to use /dev/nst0. I understand that the difference between /dev/st0 and /dev/nst0 is that the latter is no-rewind, but I don't understand why it's not /dev/sg1 (or something like /dev/nsg1). I started the command amtapetype -e 400g -d /dev/nst0 around 10am yesterday. Around 4pm, nothing had happened. mt reports that the device is busy, but my ExaByte programs (and the ExaByte web interface) don't show any action. top shows 0% but amtapetype is near the top. I can't kill amtapetype at all with kill, killall, kill -9, kill -HUP, or anything else that I can think of. So, I rebooted the computer and restarted the autoloader. I rewound and erased the tape.

I figured I may not have waited long enough, since it basically has to write 800gb. So, before I left the office, I started the process again. This time I hooked up the output a log file. At this point, and it's 10:45am the following day, it's been running since 4:21pm yesterday and it's still going. The tape drives don't show they're busy unless I use mt on /dev/nst0 or st0. It's not using any resources via top, and the log file is empty.

First of all, what's with /dev/st0 and nst0? Why doesn't amtapetype work with /dev/sg1? I understand that the autoloader is its own SCSI device, but why does the tape drive have multiple /dev entries? And, why hasn't amtapetype completed? I'm going to let it run all weekend, and if it hasn't finished by Monday, I'm going to just try using one of the amtapetypes from the Wiki. But that doesn't make me to comfortable about it. Maybe I'm missing some fundamental knowledge about SCSI devices, autoloaders, tape drives, and/or AMANDA. Can someone help me out please?

Thanks in advance!
-Alan

paddy
March 23rd, 2007, 04:01 PM
I
First of all, what's with /dev/st0 and nst0? Why doesn't amtapetype work with /dev/sg1? I



sg is generic scsi device, nst0 is non-rewinding scsi tape device. amtapetype reads and writes to the tape device and does not manipulate the changer.



understand that the autoloader is its own SCSI device, but why does the tape drive have multiple /dev entries? And, why hasn't amtapetype completed? I'm going to let it run all weekend, and if it hasn't finished by Monday, I'm going to just try using one of the amtapetypes from the Wiki. But that doesn't make me to comfortable about it. Maybe I'm missing some fundamental knowledge about SCSI devices, autoloaders, tape drives, and/or AMANDA. Can someone help me out please?

Thanks in advance!
-Alan

What is the tape capacity? Any messages in /var/log/messages? You can use tapetype entries from the Amanda wiki (http://wiki.zmanda.com/).

Paddy