• All machines are centos 6, 64bit

My rpm-build machine ends up with a directory it runs createrepo against.

This is then NFS mounted (read-only) to an rpm repository hosting machine in a /rpmrepo/staging/ subdir. /rpmrepo/staging is an LVM logical volume.

I (not yet, but in future) test the rpms, then snapshot the staging logical volume to a volume mounted at /rpmrepo/production/.

So far so good, except what i'm finding is that the contents of the repodata directories in the before and after differ, as do the timestamps. The rpm file md5 sums seem to match though.

Amungst other things:

diff /rpmrepo/*/inhouse/repodata/repomd.xml 
(stackexchange ate my diff output a little)
 revision 1344287496
 revision 1346188044

The filesizes of other.xml.gz and primary.xml.gz differ slightly also, as do the file dates

-rw-r--r-- 1 root   root   287 Aug 16 13:47 /rpmrepo/production/inhouse/repodata/other.xml.gz
-rw-r--r-- 1 nobody nobody 289 Aug 29 09:07 /rpmrepo/staging/inhouse/repodata/other.xml.gz

But as far as i can tell, nothing has changed, and this is immediately after doing the snapshot.

LV      VG    Attr     LSize  Pool Origin  Data%  Move Log Copy%  Convert
pd_rpms store swi-aos- 10.00g      st_rpms   0.00

I made the snapshot with: lvcreate -L 10G -s -n pd_rpms /dev/store/st_rpms

Any ideas wtf is going on ? I'm totally baffled. I've tried running sync before doing the snapshot, but I don't understand how a copy on write snapshot can differ in such a way.

It looks to me like the timestamp on the staging (before) files are as expected, but the timestamp on files made after are two weeks in the past ??

One thing i'm wondering is if this has something to do with the way i'm doing the snapshotting cycle repeatedly over time. I'm unmounted the pd_rpms snapshot, lvremove'ing it, then doing lvcreate (with the same name as before, pd_rpms), and remounting it back. Could that cause this issue ?

edit: I've also tried mounting the snapshot read-only. Still no change. This machine hosts many rpms repos and they all seem to snapshot just fine except this one (the inhouse repo). On the rpm building machine this is a svn working copy, and hence has a .svn dir in it, but other than that i can see nothing special about it.


An LVM snapshot is not going to include the contents of an NFS export.

  • I've just arrived at a similar conclusion, which makes sense considering lvm is block level. I think what really threw me is that i found the filesystem i mounted the NFS share onto had an old, but similar copy of the data on it beneath the mount point, so when i did the snapshot it looked like it was snapshotting the data. Urgh ! – Sirex Aug 28 '12 at 23:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.