[ale] problems with ssh to tape

Greg Freemyer greg.freemyer at gmail.com
Mon Mar 30 18:13:18 EDT 2009


2009/3/30 Björn Gustafsson <bg-ale at bjorng.net>:
> Used to be that using shell redirect to a tape was unreliable and slow
> at best, and failed at worst.  The message you get indicates to me
> that it may be using the entire backup set size as the inferred
> blocksize on the tape device.
>
> I'd try piping to dd(1) (with an appropriate block size for the tape
> device) rather than a simple redirect.  For example:
>
> ssh $mach "tar -cf - $BackupThis" | dd  bs=20b  of=/dev/nst0

Those are some small blocks ;)

But I agree, tapes are very block size dependent.  When you run tar
locally, it figures out it is talking to tape and sets the block size
automatically.  With ssh in the middle it gets confused and messes up
the block size.

It has been a while, but I think tar defaults to 10K blocks.  (20 * 512 bytes).

So test locally with:

tar ... | dd bs=10K of=/dev/nst0
mt rewind
tar -tv /dev/nst0

until you verify what bs to pass to dd.

Once you have it working, try the ssh piped to dd method.

Greg



More information about the Ale mailing list