[Gllug] DD Ext3 Move

Daniel P. Berrange dan at berrange.com
Tue Mar 7 15:06:49 UTC 2006


On Tue, Mar 07, 2006 at 02:52:30PM +0000, Christian Smith wrote:
> On Wed, 1 Mar 2006, Daniel P. Berrange wrote:
> 
> >On Wed, Mar 01, 2006 at 08:41:37PM +0000, Nix wrote:
> >> On Tue, 28 Feb 2006, Bruce Richardson gibbered uncontrollably:
> >> > On Wed, Feb 08, 2006 at 05:37:57PM +0000, Nix wrote:
> >> >>
> >> >> I used to move filesystems around via a pair of tars to and from stdout
> >> >> connected via ssh, but for my most recent major move I just used `cp
> >> >> -av' as root.
> >> >
> >> > Does that preserve hard links properly?  Doesn't always matter,
> >> > sometimes really does.
> >>
> >> Yes, it does. (It doesn't preserve sparseness perfectly but that's
> >> impossible to do reliably in any case. It tries as well as it can.)
> >
> >Impossible with current support in the Linux kernel, but I'm told that
> >Solaris has an ioctl() command which lets an app query the sparse regions
> >within a file.
> 
> 
> Not impossible.

Ok, s/impossible/practical/.

> The app has to read the file in order to write it back out. While in
> memory, just scan the current block, and if it's all zeros, simply don't
> write it and seek to the next block. The benefits being less data written,
> the possibility of making sparse a previously non-sparse file, and no need
> for special system calls or ioctls.

I've seen multiple TB sparse files on 64-bit systems. Reading several
terrabytes of data to determine where the zeros are is crazy. Of course
the app creating the multi-TB sparse file is pretty crazy too, but since
the kernel knows the allocation pattern it ought not to be too difficult
to let userspace know too, to avoid having to byte scan.

Dan.
-- 
|=-            GPG key: http://www.berrange.com/~dan/gpgkey.txt       -=|
|=-       Perl modules: http://search.cpan.org/~danberr/              -=|
|=-           Projects: http://freshmeat.net/~danielpb/               -=|
|=-   berrange at redhat.com  -  Daniel Berrange  -  dan at berrange.com    -=|
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 196 bytes
Desc: Digital signature
URL: <http://mailman.lug.org.uk/pipermail/gllug/attachments/20060307/5ce4248a/attachment.pgp>
-------------- next part --------------
-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug


More information about the GLLUG mailing list