
Tim Connors wrote:
Personally, I use Ted Tso's trick to taking LVM snapshots and 1) 'e2fsck -fy'ing the snapshot. 2) If it succeeds, tune2fs the original device to reset the counter, if it fails, send an email to the admin to schedule a reboot and tune2fs the device to say it's been mounted a bajillion times.
Hmm, I've been doing (1) but not (2). Thanks for the idea.
But a recent update to lvm and/or kernel no longer seems to properly quiesce the filesystem[1], so I get these:
e2fsck 1.42 (29-Nov-2011) Pass 1: Checking inodes, blocks, and sizes Pass 2: Checking directory structure Pass 3: Checking directory connectivity Pass 4: Checking reference counts Pass 5: Checking group summary information Free blocks count wrong (27450610, counted=27450649). Fix? yes
Free inodes count wrong (19841641, counted=19841642). Fix? yes
(I do a preen with e2fsck -p just to get rid of the /dev/gamow/2012-03-25+04.44.28-root-snapshot: Clearing orphaned inode 1156235 (uid=0, gid=0, mode=0100644, size=161848) warnings that always happened after a snapshot. The inode counts requiring a fix never used to happen though.)
Oh. Why do you think I'm fscking my snapshots in the first place? :P Maybe I'll dig up the exact complains I'm getting from e2fsck and we can compare notes.