Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm trying to set a backup to tape of a machine using flexbackup. However any attempt to write to the tape drive (via either flexbackup or just tar) results in "/dev/st0: Input/output error"

The machine seems to recognise the drive (HP Storageworks Ultrium 448) and that there's a tape in it and "mt status" seems to work... "mt -f /dev/st0 rewind" or "erase" throw no errors...

root@stor001:/# mt status
SCSI 2 tape drive:
File number=0, block number=0, partition=0.
Tape block size 0 bytes. Density code 0x42 (LTO-2).
Soft error count since last status=0
General status bits on (41010000):
 BOT ONLINE IM_REP_EN

root@stor001:/# cat /proc/scsi/scsi
Attached devices:
Host: scsi0 Channel: 00 Id: 00 Lun: 00
  Vendor: HL-DT-ST Model: DVDRAM GSA-4084N Rev: KS02
  Type:   CD-ROM                           ANSI  SCSI revision: 05
Host: scsi2 Channel: 00 Id: 03 Lun: 00
  Vendor: HP       Model: Ultrium 2-SCSI   Rev: S65D
  Type:   Sequential-Access                ANSI  SCSI revision: 03

"tell" does however

root@stor001:/# mt -f /dev/st0 tell
/dev/st0: Input/output error

Based on a forum post I found, I tried:

root@stor001:/# dd if=/dev/zero of=/dev/nst0 bs=1024 count=10
10+0 records in
10+0 records out
10240 bytes (10 kB) copied, 5.0815 s, 2.0 kB/s

which gave the person on the forum an error but seems to work for me.

If anyone has any suggestions, I'm all ears...

share|improve this question
add comment

1 Answer

up vote 0 down vote accepted

1) first are you sure to use the correct version of mt ?

# mt --version

should return "mt-st" name of binary.

If you only get "mt", then download the mt-st package.

# apt-get install mt-st

2) "tell" is only available since SCSI-2, so try this once after each load of tape.

# mt -f /dev/nst0 stsetoptions scsi2logical

then try again the "tell"

3) just a remark : use "/dev/nst0" instead of "/dev/st0", or the drive is rewinded after each operation...

share|improve this answer
    
It was the 'scsi2logical' option, I was missing. I don't think it ever turned up in my extensive googling. I've also switched to nst0. Thanks for the help! –  Dan D Apr 27 '10 at 10:11
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.