How do you reblock a 32b tape to 512b block tape using dd command?

How do you reblock a 32b tape to 512b block tape using dd command?

Post by jkeric » Sun, 17 Aug 2003 08:01:07


I wrote a script to copy storagetrek tape drive to a sony tape drive.
The command I used was:

dd if=/dev/rmt/tsp1d1nr of=/dev/rmt/tsp2d1nr bs=262144

How every I didn't set the /dev/rmt/tsp2d1nr tape drive to the 512
block size
(mt -f /dev/rmt/tsp2d1nr setblksz 262144) before starting up the dd
command.

Instead the new sony tapes were formatted by the drive and the block
size defaulted to "variable". I later found out some months later
that the sony tapes were blocked at 16384 (block 32) instead of the
expected 262144 (512 block). I thought that all I had to do was
recopy these tapes and reblock up the tar files back into 512 blocks.

mt -f /dev/rmt/tsp1d1nr setblksz 16384
mt -f /dev/rmt/tsp2d1nr setblksz 262144
dd if=/dev/rmt/tsp1d1nr of=/dev/rmt/tsp2d1nr ibs=16384 obs=262144
4+0 in records
0+0 out records

As you can see it didn't work. I tried all day trying to reblock the
tape to 512 but nothing is working. Does anyone know how to do this
with out untarring the tape to disk and then tar it back to tape?
 
 
 

How do you reblock a 32b tape to 512b block tape using dd command?

Post by jkeric » Tue, 19 Aug 2003 03:59:46


The input and output tape recommended blocking size is
512(512*512=262144 bytes) where each block is 512 bytes. These are
BIG tapes and the dd command works find if you set the tape drive to
setblksz 262144. 16283/512=32 blocks.