Subject: Just one file on SCSI Tapes possible?
To: None <netbsd-users@netbsd.org>
From: Christoph Kaegi <kgc@zhwin.ch>
List: netbsd-users
Date: 12/17/2001 12:04:35
Fellow NetBSDers
I recently upgraded a Linux server to a NetBSD 1.5.2 one.
There is a HP1533A DDS-2 DAT tape drive in this machine. I
used to do a full save at the beginning of the tape and then,
three days later, an incremental one behind the fullsave.
While rewriting the scripts and testing them out, I realized,
that it wasn't possible to write more than one file to the
tape.
The output of "mt status" always was:
-------------------------------------- 8< --------------------------------------
winterthur# mt -f /dev/nrst0 status
SCSI tape drive, residual=0
ds=3<Mounted>
er=0
blocksize: 0 (0, 0, 0, 0)
density: 19 (0, 0, 0, 0)
current file number: 0
current block number: 0
-------------------------------------- 8< --------------------------------------
When I wrote the first fullsave with:
cat /etc/backup.tape.conf | pax -w -vzf /dev/nrst0
the status was exactly the same.
If I did:
cat $DataFile | pax -w -vf /dev/rst0
/bin/mt -f /dev/nrst0 fsf 1
cat $DataFile | pax -w -vzf /dev/nrst0 -T $TimeSpec
there was no error.
Restoring of the first file proceeded without problems:
-------------------------------------- 8< --------------------------------------
Winterthur# pax -vf /dev/nrst0
...
-rwx------ 1 ckagi wheel 75210 Sep 7 1990 home/ckagi/pchome/tools/nort/mft.exe
-rwx------ 1 ckagi wheel 187344 Jul 17 1990 home/ckagi/pchome/tools/nort/ndd.exe
-rwx------ 1 ckagi wheel 115664 Jul 17 1990 home/ckagi/pchome/tools/nort/sd.exe
-rwx------ 1 ckagi wheel 135652 Jul 17 1990 home/ckagi/pchome/tools/nort/si.exe
-rw-r--r-- 1 ckagi wheel 984958 Nov 28 1998 home/ckagi/pchome/wrd97cnv.exe
drwx------ 2 ckagi wheel 0 Dec 1 23:23 home/ckagi/netlogon
-r-x------ 1 ckagi wheel 577 Dec 1 23:23 home/ckagi/netlogon/startup.bat
-rw-r----- 1 ckagi wheel 8 Dec 1 20:45 home/ckagi/.history
pax: Waiting for tape drive close to complete...done.
pax: ustar vol 1, 1514 files, 57395200 bytes read, 0 bytes written in 128 secs (448400 bytes/sec)
-------------------------------------- 8< --------------------------------------
Then, when I tried to restore the second one:
-------------------------------------- 8< --------------------------------------
winterthur# pax -vf /dev/nrst0
pax: End of archive volume 1 reached
pax: Waiting for tape drive close to complete...done.
ATTENTION! pax archive volume change required.
/dev/nrst0 ready for archive tape volume: 1
Load the NEXT TAPE on the tape drive
Type "y" to continue, "." to quit pax, or "s" to switch to new device.
If you cannot change storage media, type "s"
Is the device ready and online? > y
pax: Cannot identify format. Searching...
pax: Cpio file name length 11826 is out of range
pax: Invalid header, starting valid header search.
pax: Cpio file name length 36580 is out of range
pax: Cpio file name length 42814 is out of range
pax: Cpio file name length 8285 is out of range
pax: Cpio file name in header is corrupted
pax: Cpio file name length 9126 is out of range
pax: Cpio file name length 64276 is out of range
pax: Cpio file name length 16617 is out of range
pax: Cpio file name length 60960 is out of range
pax: Cpio file name length 55739 is out of range
pax: Cpio file name length 51102 is out of range
pax: Cpio file name length 41396 is out of range
pax: Cpio file name length 33945 is out of range
pax: Cpio file name length 47186 is out of range
pax: Cpio file name length 6065 is out of range
-------------------------------------- 8< --------------------------------------
Can it really be, that NetBSD 1.5.2 can't write more than one file
to a tape?
I was very surprised that it seems like NetBSD doesn't support writing
more than one file to a tape.
Please tell me that I am doing something wrong!
Btw: The tape shows up in dmesg as follows:
-------------------------------------- 8< --------------------------------------
st0 at scsibus0 target 0 lun 0: <HP, C1533A, A612> SCSI2 1/seqüntial removable
st0: density code 19, variable blocks, write-enabled
-------------------------------------- 8< --------------------------------------
Thanks for any hints in advance
Christoph
--
----------------------------------------------------------------------
Christoph Kaegi kgc@zhwin.ch
----------------------------------------------------------------------