LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   How to check a Python tape drive on Debian? (https://www.linuxquestions.org/questions/linux-hardware-18/how-to-check-a-python-tape-drive-on-debian-299742/)

avantman42 03-09-2005 03:30 PM

How to check a Python tape drive on Debian?
 
I was recently given a Dell PowerEdge 2400 server with a Python tape drive. I've now got Debian 3.0 (Woody) happily running on it, but I can't work out whether or not the tape drive works.

The output of dmesg includes the following:

Code:

scsi : 1 host.
  Vendor: SEAGATE  Model: ST34572W          Rev: 0784
  Type:  Direct-Access                      ANSI SCSI revision: 02
Detected scsi disk sda at scsi0, channel 0, id 0, lun 0
(scsi0:0:0:2) Synchronous at 40.0 Mbyte/sec, offset 8.
  Vendor: NEC      Model: CD-ROM DRIVE:464  Rev: 1.05
  Type:  CD-ROM                            ANSI SCSI revision: 02
Detected scsi CD-ROM sr0 at scsi0, channel 0, id 5, lun 0
(scsi0:0:5:1) Synchronous at 4.0 Mbyte/sec, offset 15.
  Vendor: ARCHIVE  Model: Python 04106-XXX  Rev: 715G
  Type:  Sequential-Access                  ANSI SCSI revision: 02
(scsi0:0:6:1) Synchronous at 10.0 Mbyte/sec, offset 15.
scsi : detected 1 SCSI cdrom 1 SCSI disk total.

The server was sat in a cupboard gathering dust for some time before I got it, so it's entirely possible that the tape drive doesn't work, but I'm hoping it does ;)

I've little experience with tape drives, and absolutely none with tape drives on Linux, so if someone could give me some pointers to work out whether or not the drive works, I'd be very grateful.

Russ

michaelk 03-09-2005 08:14 PM

I will assume the device ID for the tape drive is /dev/st0, /dev/nst0 and the tape utility mt is already installed. Using /dev/st0 the tape will rewind after a command completes. Using /dev/nst0 the tape will not be rewound after a command completes.

for drive status:
mt -f /dev/st0 status

A simple check to write to tape:
tar -cvf /dev/st0 some_file

To read the file from tape.
change to another directory
tar -xvf /dev/st0

The file will be read from tape and created on the other directory.

avantman42 03-10-2005 07:09 AM

Thanks, that's just the sort of information I was looking for. I've done what you suggested, and I think my tape drive isn't working. Here's the output of some commands:

Code:

junction:~# mt -f /dev/st0 status
SCSI 2 tape drive:
File number=0, block number=0, partition=0.
Tape block size 512 bytes. Density code 0x25 (DDS-3).
Soft error count since last status=0
General status bits on (41010000):
 BOT ONLINE IM_REP_EN

I created a small text file named foobar, then tried to write it to the tape:

Code:

junction:~# tar -cvf /dev/st0 foobar
foobar
tar: /dev/st0: Warning: Cannot close: Input/output error

I then changed to a new directory, and tried to read the file back:

Code:

junction:~/test# tar -xvf /dev/st0
tar: /dev/st0: Cannot read: Input/output error
tar: At beginning of tape, quitting now
tar: Error is not recoverable: exiting now

Does this mean that my tape drive doesn't work? Or is it worth me trying something else? The tapes are new, it's just the drive that is old.

Russ

michaelk 03-10-2005 09:16 PM

I haven't used my DLT tape drive in awhile as so decided to check it out. I'm having the same problems as you. I usally only read data from this drive and that seems to work ok.

avantman42 03-14-2005 05:00 PM

I've got my tape drive working now. The fix? I borrowed a cleaning cartridge from work and ran that through it. Now it works fine :)

Thanks for your help, and I hope the same fix works for you

Russ


All times are GMT -5. The time now is 01:11 PM.