[Gllug] DD Ext3 Move

Christian Smith csmith at micromuse.com
Tue Mar 7 14:52:30 UTC 2006


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.

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 don't know if this is how gtar works, but it's a good bet that it is.

>
>Dan.
>

Christian

-- 
    /"\
    \ /    ASCII RIBBON CAMPAIGN - AGAINST HTML MAIL
     X                           - AGAINST MS ATTACHMENTS
    / \
-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug




More information about the GLLUG mailing list