I came across a strange behaviour of the st driver with a 2.0.36 kernel (RedHat 5.2)
I do archiving on a Conner DAT SCSI tape drive, using cpio and multiple
files on tape (typically labels + 1 or more backup sets + summary).
So I set blocksize to 0, and wrote my tape through /dev/nst0, but it
seems that when reading from it, the behaviour of some tools is
inconsistent:
using dd or cat positions the tape *after* the filemark, at the beginning of
the next file (which is what I expected), while using cpio and C open/read/close
positions it *before* the file mark at the end of the file.
example, with a 3 backup set tape:
1/ Fatal
cpio -itv </dev/nst0 OK, outputs first BS
cpio -itv </dev/nst0 ERROR, reached end of tape and eject tape ( !!! )
2/ Bizarre
cpio -itv </dev/nst0 OK, outputs first BS
dd if=/dev/nst0 OK, says 0 blocks in, 0 blocks out
cpio -itv </dev/nst0 OK, outputs second BS
dd if=/dev/nst0 OK, says 0 blocks in, 0 blocks out
cpio -itv </dev/nst0 OK, outputs third BS
3/ Normal
dd if=/dev/nst0 of=/dev/null OK, outputs x blocks in and x blocks out
dd if=/dev/nst0 of=/dev/null OK, outputs y blocks in and y blocks out
dd if=/dev/nst0 of=/dev/null OK, outputs z blocks in and z blocks out
Any thoughts ?
François Désarménien
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/