From: joe@iem.com (Joe Nemeth)
Subject: Re: Convertion from 1/4 to DAT
Date: Mon, 4 Jan 1993 21:01:35 GMT
Organization: IEM, Inc.
X-Newsreader: Tin 1.1 PL4

dan@lamar.ColoState.EDU (Danilo Silva) writes:
: We have some old sets of backup (in 1/4-inch cartridge tapes) that I 
: would like to convert to DDS (DAT) tapes.
: 
: We need to do that for two main reasons: 
: - We need to get rid of the cartridge autochanger.
: - One DAT tape is much smaller and easier to store than sets of 8 
: cartridge tapes.
: 
: Could somebody please give me a light on this problem? Please ...
: THANKS in advance for any hints and have all a great 1993,
: 
: Dan Silva - dan@lamar.colostate.edu
: 
: 			A description follows:
: Hardware (HP9000-835, HP-UX 8.0):
: ========
: 
: FROM:
: ----
: The old backups are store in sets of 8 cartridges. The device used was 
: the HP 35401A ( 1/4-inch Cartridge Autochanger Tape Subsystem).
: 
: TO:
: --
: The new backups will be stored on DDS (DAT) tapes, and the device to 
: be used is a HP 6400-1300s drive 
: (1.3 GByte DAT drive).
: 
: Backup PROCEDURE:
: ================
: 
: The following procedure was used with the cartridges for backup:
: 
: /etc/fbackup -I /usr/adm/fbackupfiles/system.log -0uf - -g 
: /users/root/backups/systemgraph | compress | tcio -oV -S 8 -l 1 
: 
: /dev/rct/c5d0s2
: 
: The retrieval process is the following:
: 
: tcio -i -l 1 -n 8 /dev/rct/c5d0s2 | uncompress | frecover -xf - -i 
: FILENAME(s)
: 
: PROPOSED SOLUTION (which did NOT work):
: =================  ------------------
: 
: Extract the whole compressed backup and re-direct it to the DAT drive 
: (/dev/rmt/0m):
: 
: tcio -i -l 1 -n 8 /dev/rct/c5d0s2 > /dev/rmt/0m
: 
: 

The problem is that on 9T and DDS media, there is some additional
structure to the information that is not present in the stdout image
you are producing and piping through tcio.  The fbackup image consists
of 4 "files" on the DDS tape, delimited by file/set marks.  When you
deliver the output of tcio directly to the DDS drive, you get a single
monolithic file, and frecover can't handle it.

I played with this a little, with a small file set on an HP 340
running HP-UX 8.0, and came up with the following possible workaround:

$ tcio -i -S 8 /dev/rct|/etc/frecover -V volhead -f -
$ cat volhead
...
Index Size:1061
...
$ let "x=(1061+1023)/1024"
$ let "y=3+$x"
$ tcio -i -S 8 /dev/rct|dd of=/dev/rmt/0mn ibs=1k obs=8k skip=0 count=1
$ tcio -i -S 8 /dev/rct|dd of=/dev/rmt/0mn ibs=1k obs=8k skip=1 count=2
$ tcio -i -S 8 /dev/rct|dd of=/dev/rmt/0mn ibs=1k obs=8k skip=3 count=$x
$ tcio -i -S 8 /dev/rct|dd of=/dev/rmt/0mn ibs=1k obs=8k skip=$y

You need to make sure that you use NO-REWIND mode on the DAT drive
(0mn, not 0m), which is part of the minor number for the device file.
Note that some computed values based on the index size (in bytes) are
needed for skipping and counting properly for the "index" file, which
is copied in line 3 above.  Your much larger backup will have a much
larger index than my paltry 1061 bytes.

Omitting the count in line 4 will copy the remainder of the cartridge
tape to the DDS, since tcio doesn't know when to stop.  This means
that you will copy any garbage from the end of the cartridge to the
DDS tape, but this doesn't appear to hurt anything.  If you only have
a small bit of data on the last tape, you may want to specify a count
that is big enough to contain everything on the tape, but small enough
so it doesn't take all day.

I don't know exactly what the header information on second and
subsequent cartridge tapes looks like, so you may have to play a
little with these to find out exactly how you have to split them up:
however, from my reading of the documentation, every fbackup tape in a
set looks like every other tape, so you should be able to use the same
method to copy each of your cartridge tapes.

Note that if you want to somehow splice your multiple 1/4" cartridges
into a single DDS tape, you will have to do a lot more work, since you
will probably need to strip the trailers and headers and worry about
how to splice the data seamlessly, so frecover doesn't get confused.
Unless someone posts a ready-made utility to do the job, I'd recommend
that you just copy tape-for-tape.

Hope this helps a little.

--
Joseph C. Nemeth	joe@iem.com
Newsgroups: comp.sys.hp