bug-fileutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

new skip/seek options - BYTES not BLOCKS


From: Chris Sylvain
Subject: new skip/seek options - BYTES not BLOCKS
Date: Wed, 18 Oct 2000 16:02:32 -0400 (EDT)

Although I'll venture you've gotten requests for this sort of modification
before, there previously may not have been a good reason to implement it.

I submit for your consideration a patch (and tests) for 'dd' which will add
two new options which when used permit large bs= values at the same time as
small (less than one block) skip=/seek= values.

The rationale for having the new bskip=/bseek= options where the input skip
and/or output seek is measured in BYTES instead of BLOCKS (ibs or obs,
respectively) is to permit a performance-determined large bs= value to be in
use (128k, for example) but at the same time permit the input bskip= value
to be 4k.  Later, when the data transfer is to be accomplished in the reverse
direction, a large bs= value can be used along with a bseek= value of 4k.

The particular application for these options is for backup and restoration
of a large (>8GB) production database where the datafiles are stored on raw
devices (aka raw partitions).  The raw devices each have a logical volume
control block (LVCB) of 1k at the beginning (byte offset 0) of the partition,
and the datafiles themselves do not start until byte offset 4k.

The largest possible bs= value (that permits the preservation of the LVCB)
for an un-modified 'dd' is therefore only 4k (bs=4k, skip=1/seek=1).

The data transfer performance using 4k blocks is not good enough for our
purposes (using 512-byte blocks, for instance, the transfer takes more than
36 hours).  However, with 128k blocks, the data transfer performance is quite
acceptable (transfer done in generally quite a bit less than 3 hours).

The modified 'dd' has been successfully built and tested on an AIX 4.3 and
on a Redhat 6.1 (kernel 2.2.14-12) systems (gcc-2.95.1 and egcs-2.91.66,
respectively).


 - christopher sylvain, systems and database administrator
   University of Maryland Medical System
   Baltimore, MD  21201
   tel. 410-328-1020


Attachment: dd.cdiff
Description: dd.cdiff

Attachment: ddtests.tar.gz
Description: ddtests.tar.gz


reply via email to

[Prev in Thread] Current Thread [Next in Thread]