Subject: Re: Just one file on SCSI Tapes possible?
To: Christoph Kaegi <kgc@zhwin.ch>
From: None <rmcm@compsoft.com.au>
List: netbsd-users
Date: 12/18/2001 09:20:02
I had a similar problem with a Tanberg SLR5, which was fixed by patch
to the kernel quirks table. There is an open PR - 13603

   http://www.NetBSD.org/cgi-bin/query-pr-single.pl?number=3D13603

--=20
Rex McMaster

Christoph Kaegi writes:
 > Fellow NetBSDers
 >=20
 > I recently upgraded a Linux server to a NetBSD 1.5.2 one.
 >=20
 > 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.
 >=20
 > While rewriting the scripts and testing them out, I realized,
 > that it wasn't possible to write more than one file to the=20
 > tape.
 >=20
 > The output of "mt status" always was:
 >=20
 >  -------------------------------------- 8< -------------------------=
-------------
 >  winterthur# mt -f /dev/nrst0 status
 >  SCSI tape drive, residual=3D0
 >  ds=3D3<Mounted>
 >  er=3D0
 >  blocksize: 0 (0, 0, 0, 0)
 >  density: 19 (0, 0, 0, 0)
 >  current file number: 0
 >  current block number: 0
 >  -------------------------------------- 8< -------------------------=
-------------
 >=20
 > When I wrote the first fullsave with:
 >=20
 >  cat /etc/backup.tape.conf | pax -w -vzf /dev/nrst0
 >=20
 > the status was exactly the same.
 >=20
 > If I did:
 >=20
 >  cat $DataFile | pax -w -vf /dev/rst0
 >  /bin/mt -f /dev/nrst0 fsf 1
 >  cat $DataFile | pax -w -vzf /dev/nrst0 -T $TimeSpec
 >=20
 > there was no error.
 > Restoring of the first file proceeded without problems:
 >=20
 >  -------------------------------------- 8< -------------------------=
-------------
 >  Winterthur# pax -vf /dev/nrst0
 >  ...
 >  -rwx------  1 ckagi   wheel      75210 Sep  7  1990 home/ckagi/pcho=
me/tools/nort/mft.exe
 >  -rwx------  1 ckagi   wheel     187344 Jul 17  1990 home/ckagi/pcho=
me/tools/nort/ndd.exe
 >  -rwx------  1 ckagi   wheel     115664 Jul 17  1990 home/ckagi/pcho=
me/tools/nort/sd.exe
 >  -rwx------  1 ckagi   wheel     135652 Jul 17  1990 home/ckagi/pcho=
me/tools/nort/si.exe
 >  -rw-r--r--  1 ckagi   wheel     984958 Nov 28  1998 home/ckagi/pcho=
me/wrd97cnv.exe
 >  drwx------  2 ckagi   wheel          0 Dec  1 23:23 home/ckagi/netl=
ogon
 >  -r-x------  1 ckagi   wheel        577 Dec  1 23:23 home/ckagi/netl=
ogon/startup.bat
 >  -rw-r-----  1 ckagi   wheel          8 Dec  1 20:45 home/ckagi/.his=
tory
 >  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< -------------------------=
-------------
 >=20
 > Then, when I tried to restore the second one:
 >=20
 >  -------------------------------------- 8< -------------------------=
-------------
 >  winterthur# pax -vf /dev/nrst0
 >  pax: End of archive volume 1 reached
 >  pax: Waiting for tape drive close to complete...done.
 >=20
 >  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 devi=
ce.
 >  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< -------------------------=
-------------
 >=20
 > Can it really be, that NetBSD 1.5.2 can't write more than one file
 > to a tape?=20
 >=20
 > I was very surprised that it seems like NetBSD doesn't support writi=
ng
 > more than one file to a tape.
 > Please tell me that I am doing something wrong!
 >=20
 > Btw: The tape shows up in dmesg as follows:
 >=20
 >  -------------------------------------- 8< -------------------------=
-------------
 >  st0 at scsibus0 target 0 lun 0: <HP, C1533A, A612> SCSI2 1/seq=FCnt=
ial removable
 >  st0: density code 19, variable blocks, write-enabled
 >  -------------------------------------- 8< -------------------------=
-------------
 >=20
 > Thanks for any hints in advance
 >=20
 > Christoph
 >=20
 > --=20
 > --------------------------------------------------------------------=
--
 > Christoph Kaegi                                           kgc@zhwin.=
ch
 > --------------------------------------------------------------------=
--
 >=20