Splitting tar output (and hairs):
Jim Kuzdrall
gnhlug at intrel.com
Mon Aug 29 23:24:01 EDT 2005
The reasoning-out-loud below leads to a solution (discovery).
> This syntax did not work?
>
> tar cf - ./ $bkoptions | tee monthly.tar - >/dev/st0
Correct, it did not work. Both tar and dd give "/dev/st0 Cannot
read: Cannot allocate memory. At beginning of tape, quitting now.
Error is not recoverable: exiting now."
I used "dd if=/dev/st0 of=dd-extract.tar ibs=4096 obs=512" to match
how the tape file was made.
However, if I write directly to the tape using tar, everything works
fine.
> I don't know why you are chasing down the directory tree twice...
Ignorance. Since it is writing at 4AM (it isn't that late yet is
it? ... guess not), I had other more pressing priorities for the past
year or so. But, as a dedicated, sensitive, empathetic design
engineer, it brings a tear to the eye to think of that poor hard disk
arm flailing about on that expensive SCSI platter.
> I would have done this instead:
>
> cd /
> tar -cf $bkdir/monthly.tar ./ $bkoptions
> dd if=$bkdir/monthly.tar of=/dev/st0
>
> at worst in restoring you would:
>
> dd if=/dev/st0|(cd $bkdir ; tar xf -)
That approach works as "dd if=/dev/st0 ibs=4096 | (tar -tf -)". dd
needs the block size but tar by itself doesn't. Or maybe...
Eureka! That is it. I wasn't putting "-b 8" with tar. With that,
tar reads the dd tape directly. Like a dummy, I have been using "-b
4096". "b" is the number of 512 blocks.
I think I can get the tee working now.
I am guessing the HP DDS-3 should really nip along with that
blocking factor change.
Thanks for the wake up call.
Jim Kuzdrall
More information about the gnhlug-discuss
mailing list