[Lustre-discuss] rsync --sparse actually work on RHEL5?

Brian J. Murrell Brian.Murrell at Sun.COM
Fri Oct 23 20:38:38 PDT 2009


I have been experimenting with MDT backup/restore (aka: transplant).

Given that I want to transplant to a new device on the same MDS, I can
use rsync so that the EAs are transplanted in tandem with the files
rather than as an after-thought with getfattr.

Tar requires the more clunky getfattr afterwards because this is RHEL5
and RHEL5's tar doesn't appear to have EA support in it.

But, I seem to be finding that rsync's --sparse option is not quite as
good as tar's.  Witness:

# pwd
/tmp/mdt1_snapshot/ROOT
# rsync --sparse brian/lustre/OFED-1.3.tgz /tmp/mdt1_new/ROOT/brian/lustre/
# ls -ls /tmp/mdt1_{snapshot,new}/ROOT/brian/lustre/OFED-1.3.tgz
12 -rw-r--r-- 1 root root 59918537 Oct 23 23:34 /tmp/mdt1_new/ROOT/brian/lustre/OFED-1.3.tgz
 0 -rw-r--r-- 1 1001 1001 59918537 Mar 27  2008 /tmp/mdt1_snapshot/ROOT/brian/lustre/OFED-1.3.tgz

As you can see, rsync allocated actual disk blocks for the copy of the
file where it's clearly sparse on the source.  Now tar doing the same
operation:

# rm /tmp/mdt1_new/ROOT/brian/lustre/OFED-1.3.tgz
# tar -cSvf - brian/lustre/OFED-1.3.tgz | tar -xSvf - -C /tmp/mdt1_new/ROOT/
brian/lustre/OFED-1.3.tgz
brian/lustre/OFED-1.3.tgz
# ls -ls /tmp/mdt1_{snapshot,new}/ROOT/brian/lustre/OFED-1.3.tgz
0 -rw-r--r-- 1 1001 1001 59918537 Mar 27  2008 /tmp/mdt1_new/ROOT/brian/lustre/OFED-1.3.tgz
0 -rw-r--r-- 1 1001 1001 59918537 Mar 27  2008 /tmp/mdt1_snapshot/ROOT/brian/lustre/OFED-1.3.tgz

Looks much better.  But I'd rather use rsync.  Is this rsync --sparse
issue on RHEL5 known to anyone else?

Is this just some kind of PEBKAC I'm experiencing?

Thanx,
b.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
URL: <http://lists.lustre.org/pipermail/lustre-discuss-lustre.org/attachments/20091023/7685d807/attachment.pgp>


More information about the lustre-discuss mailing list