Problem
I'm trying to follow article TA103180 - "Storing multiple archives or backups onto a single cartridge tape.", but I'm only able to store a single archive on a tape.
Cause
The I/O control tape device /dev/xct0 incorrectly rewinds the tape, nullifying the use of tape file marks.
Additionally, there is a bug in /bin/tar which rewinds the tape upon opening also nullifying the use of tape file marks.
Solution
Both of these problems have been reported to SCO Engineering.
To correct the I/O control device to stop the rewinding behavior, edit the file /etc/scsi/mkdev.d/qtape1 and change the xctU line from:
M 0+M 0666 - xctUto:M 1+M 0666 - xctUThe system will need to be rebooted before this change will take effect.
Alternatively, edit /etc/default/tape and set the default tape device from:
device=/dev/xct0to:device=/dev/rmt/ntape0There is no need to reboot when making this change.
To workaround the problem with /bin/tar, use either /bin/cpio, or /usr/gnu/bin/tar.
To use cpio to store multiple archives to a single tape as discussed in TA103180, use this syntax:
# tape rewind
# find /test1 | cpio -ocv -O /dev/rmt/ntape0
# tape wfm
# find /test2 | cpio -ocv -O /dev/rmt/ntape0
# tape wfm
# find /test3 | cpio -ocv -O /dev/rmt/ntape0
# tape wfmTo read the contents of the multi-session tape, you would use:
# tape rewind
# cpio -icvt -I /dev/rmt/ntape0
# tape rfm
# cpio -icvt -I /dev/rmt/ntape0
# tape rfm
# cpio -icvt -I /dev/rmt/ntape0The /usr/gnu/bin/tar command uses similar syntax to /bin/tar, however, for further information see `/usr/gnu/bin/tar --help`.
See also
TA103180 - "Storing multiple archives or backups onto a single cartridge tape."