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__

In reply to Re^2: Backup script: how can I force this to report errors? by LAI
in thread Backup script: how can I force this to report errors? by LAI

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.