Here's a slightly clearer test (with tar 1.19) to show what's going on: # touch foo # mt rewind # ./tar cf /dev/nst0 foo # mt status | grep '^File' File number=1, block number=0, partition=0. # mt rewind # ./tar cWf /dev/nst0 foo # mt status | grep '^File' File number=0, block number=1, partition=0.
A 'tar cf' leaves the tape on the first block of the next file number. A 'tar cWf' leaves the tape on the last block of the current file number. By design, or a bug? Thanks. Andrew Klaassen --- Andrew Klaassen <[EMAIL PROTECTED]> wrote: > 'tar cWf' leaves the tape in a different position > than > 'tar cf' does. Compare the expected behaviour to > the > unexpected behaviour: > > Expected behaviour: > > # mt -t /dev/nst0 rewind > # tar cvf /dev/nst0 foo > foo > # tar cvf /dev/nst0 bar > bar > # tar cvf /dev/nst0 baz > baz > # mt -t /dev/nst0 asf 0; tar tf /dev/nst0 > foo > # mt -t /dev/nst0 asf 1; tar tf /dev/nst0 > bar > # mt -t /dev/nst0 asf 2; tar tf /dev/nst0 > baz > > Unexpected behaviour: > > # mt -t /dev/nst0 rewind > # tar cvWf /dev/nst0 foo > foo > Verify foo > # tar cvWf /dev/nst0 bar > bar > Verify foo > # tar cvWf /dev/nst0 baz > baz > Verify foo > # mt -t /dev/nst0 asf 0; tar tf /dev/nst0 > foo > # mt -t /dev/nst0 asf 1; tar tf /dev/nst0 > # mt -t /dev/nst0 asf 2; tar tf /dev/nst0 > /dev/nst0: Input/output error > tar: /dev/nst0: Cannot read: Input/output error > tar: At beginning of tape, quitting now > tar: Error is not recoverable: exiting now > > Is this behaviour by design, or is it a bug? > > If it's a bug, is there a fix? > > Thanks. > > Andrew Klaassen > > > > > > ____________________________________________________________________________________ > Looking for last minute shopping deals? > Find them fast with Yahoo! Search. > http://tools.search.yahoo.com/newsearch/category.php?category=shopping > ____________________________________________________________________________________ Looking for last minute shopping deals? Find them fast with Yahoo! Search. http://tools.search.yahoo.com/newsearch/category.php?category=shopping
