sync of ordinary files from lvm snapshot fails with --sparse, 3.2.2pre2

Scott Mcdermott scott at smemsh.net
Mon Jul 6 04:59:19 UTC 2020


Getting some puzzling errors doing the following backup procedure on a
root filesystem that's on LVM, when using sparse flag:

lvcreate --snapshot --name baksnap --size 3G /dev/vg0/root
mount -o ro /dev/vg0/baksnap /var/tmp/snapmnt
rsync -izaHx \
    --delete --delete-excluded --delete-after \
    --partial --inplace --sparse \
    --numeric-ids --bwlimit=640k --rsh=ssh \
    /var/tmp/snapmnt \
    bakhost:/path/to/backups/root/

This is causing the following errors:

.d..t...... etc/lvm/archive/
<f+++++++++ etc/lvm/archive/vg0_01748-450988166.vg
<f+++++++++ etc/lvm/archive/vg0_01749-1953687750.vg
.d..t...... etc/lvm/backup/
<f..t...... etc/lvm/backup/vg0
<f..t...... root/.bash_history
<f..t...... etc/lvm/backup/vg0
ERROR: etc/lvm/backup/vg0 failed verification -- update retained.
<f..t...... root/.bash_history
ERROR: root/.bash_history failed verification -- update retained.
rsync error: some files/attrs were not transferred (see previous
errors) (code 23) at main.c(1287) [sender=3.2.2pre2]

It repeats the above as many times as I run it.  Simply removing the
"--sparse" flag makes the error go away.

This makes no sense to me in the first place, because I'm mounting the
snapshot readonly, so how can it change during the copy (presumably
this is why it fails verification)? And in the second place, I don't
see how sparse flag would affect anything at all.  I'm using --sparse
--inplace because I have large VM images on this filesystem, and
transfers are sometimes interrupted.  However these are only very
small text files showing the error (and again, they are in a readonly
mount...)

I'm using Linux kernel 4.17.8 on this system, glibc 2.27, x86_64 arch.
I built 3.2.2pre2 with the following flags: --disable-ipv6
--disable-openssl --disable-xxhash --disable-zstd --disable-lz4

Capabilities:
    64-bit files, 64-bit inums, 64-bit timestamps, 64-bit long ints,
    socketpairs, hardlinks, symlinks, no IPv6, atimes, batchfiles, inplace,
    append, ACLs, xattrs, optional protect-args, iconv, symtimes, prealloc
Checksum list:
    md5 md4 none
Compress list:
    zlibx zlib none

Not sure what is the issue here.  I was excited to learn about
--sparse --inplace support, but it doesn't seem usable in what seems
like an ordinary case.  any ideas what I could be doing wrong? Thanks.

-- 
Scott



More information about the rsync mailing list