Raw Volumes?

jw schultz jw at pegasys.ws
Thu Oct 16 18:27:49 EST 2003


On Wed, Oct 15, 2003 at 12:49:41PM -0500, King, Daniel wrote:
> Hi, folks.
> 
> As a logical next step, I'm looking for information on synchronization of
> raw volumes - as for Sybase or DB2 raw volumes.  A search on the list
> archive for "raw volumes" reveals much about network and Samba-type raw
> writes.  Is there a better search term or an alternative search string I
> should be using in order to narrow my search?
> 
> I'd not expect that rsync would have such functionality built-in.  I'd be
> delighted if I was wrong, but I don't see this type of option in the man
> page, etc.
> 
> However, I'm quite certain that other list members have experienced similar
> issues.
> 
> Is there such a beast as a raw data duplicator for networks?  As for Sybase
> or DB2 raw volumes?

This comes up periodically.  While the rsync algorithm would
be useful for syncing block devices the rsync utility is ill
equipped for such use.

To sync block devices you need to do so in-place, rsync
creates a temporary file which is then renamed to replace to
existing destination file.

Rsync is designed to walk directories but for device syncing
you want to only sync the specified file pair.

Rsync is not equipped to deal determine the size of a block
device even if you could disable treating it as just a
device node much less cope with a destination that is smaller
than the source.


What you want is something that will stat() the source and
destination files to determine their types, if the files are
devices then do the ioctl() command to get the device size.
Then cope with differences in size or allow the command-line
to override the physical size(s) so long as that size is no
larger than the smaller of the pair.  Finally all IO and
checksums must be done in block-sized units.  Optimally the
utility will be equipped to order the block copying in such a
way that relocated blocks don't get overwritten before they
are copied to their final locations.

As i think about what would be needed i doubt you'd even
want to use the rsync algorithm.  What you want instead is to
use the hash functions to get hashes for nice sized (2^n
byte) blocks. For maximum performance you want to do block
relocation monte before writing just the new blocks.


-- 
________________________________________________________________
	J.W. Schultz            Pegasystems Technologies
	email address:		jw at pegasys.ws

		Remember Cernan and Schmitt



More information about the rsync mailing list