fsck of LVM snapshot - different behaviour in 12.04
Ryan Tandy
rtandy at sd63.bc.ca
Tue May 15 17:43:42 UTC 2012
Hi list,
[I sent this a few days ago but it doesn't seem to have come through;
apologies if you're reading it for a second time.]
I'd like to (ab)use LVM snapshots for a periodic online fsck in the
background. The essence of the script is something like this:
lvcreate -s -L $snapsize vg0/srv
e2fsck -p /dev/vg0/lvol0 # discard orphaned inodes
e2fsck -fy /dev/vg0/lvol0
lvremove -f vg0/lvol0
On Lucid, this seems to work well. On Precise, I get some false
positives almost every time I run it: wrong free blocks/inodes count,
and/or bitmap differences. The filesystem is actually OK; none of these
minor inconsistencies show up during a boot-time fsck.
My understanding is that ext4 is wired up with LVM to do a sync and
clean up these inconsistencies at the time a snapshot is made, and
certainly on Lucid it seems OK. Can anyone tell me if the behaviour has
changed, or if I'm doing something wrong?
So far I've reproduced this on my workstation and laptop (one SATA drive
each) and on one scratch server (Dell CERC RAID, five SATA drives). All
of this is on bare metal and local storage.
I searched around a bit but the only thread I found is [1] which doesn't
seem relevant -- I can't reproduce his error.
[1] https://lkml.org/lkml/2012/1/5/76
--
Ryan Tandy - Programmer/Analyst rtandy at sd63.bc.ca
School District 63 (Saanich) +1 250 652 7385
More information about the ubuntu-server
mailing list