[linux-lvm] Powerfailure and snapshot consistency

Stuart D. Gathman stuart at bmsi.com
Sat Mar 26 04:24:56 UTC 2011


At a production site, there was a power failure, and the UPS battery 
wasn't up to the job.  There was a backup running, but otherwise things 
were quiet.

The production system came up fine, but the test system, which was running 
from a snapshot, had a corrupted filesystem.  The PVs are md raid1.  One 
of the PVs had to resync when power was restored.

My theory about what happened to the test system is this: the origin and 
snapshot were on different PVs.  The origin was writing as part of the 
backup process, and some blocks that were supposed to be copied to the COW 
didn't get copied, but were written to the origin.  This would result in
an inconsistent image for the snapshot.

Assuming my theory is correct, the morals would be:

1) don't run production on a snapshot :-)

2) make sure important LVs do not span multiple PVs (except for LVM
    mirroring) - you could be unhappy in the event of a system crash.

While I can peruse lvdisplay --maps manually, is there a tool that 
highlights LVs that span multiple PVs?

--
 	      Stuart D. Gathman <stuart at bmsi.com>
     Business Management Systems Inc.  Phone: 703 591-0911 Fax: 703 591-6154
"Confutatis maledictis, flammis acribus addictis" - background song for
a Microsoft sponsored "Where do you want to go from here?" commercial.




More information about the linux-lvm mailing list