in reply to Re: Backup script: how can I force this to report errors?
in thread Backup script: how can I force this to report errors?

Oh, _barf works as expected. If you like I can show you the full code. The difficulty is with (presumably) either mt or with /dev/st0. I'm looking for a perlish way to figure out if there is a tape in the drive.

If you have access to a machine with a tape drive (no idea if this will only apply to SCSI tapes), make sure there is no tape in the drive and try the following:

[root@mag /]# mt -f /dev/st0 stat SCSI 2 tape drive: File number=0, block number=0, partition=0. Tape block size 0 bytes. Density code 0x25 (DDS-3). Soft error count since last status=0 General status bits on (41010000): BOT ONLINE IM_REP_EN [root@mag /]# mt -f /dev/st0 load [root@mag /]# mt -f /dev/st0 seek [root@mag /]# mt -f /dev/st0 fsf [root@mag /]# touch testfile ; tar -cvf /dev/st0 testfile testfile [root@mag /]# tar -tf /dev/st0 tar: This does not look like a tar archive tar: Skipping to next header tar: Error exit delayed from previous errors [root@mag /]#

See, all the seeking, writing, and so on should return errors (or at least warnings) but doesn't.

LAI

__END__