[clue-tech] Linux LVM corruption?

David L. Anselmi anselmi at anselmi.us
Tue Jul 8 20:11:22 MDT 2008


Jim Ockers wrote:
> We haven't noticed a huge pile of problems using our existing disk partitions
> and filesystems going corrupt under these conditions.  However we are 
> wondering if anyone out there has had much experience with LVM and if you've
> ever had an LVM go corrupt.

I can't say "much experience".  But I've run it on 4 machines, including 
one production server for 3+ years.  The guys at Tummy or similar could 
probably give you much more info I think.

And Andrew Hume says that even under optimal conditions disks suck at 
reliability (well, maybe he blames the OS).

http://www.research.att.com/viewPage.cfm?PageID=88

> Please feel free to comment on any of the following questions:
> 
> 1. Is an LVM any more or less likely to become corrupt than just a normal
> partition table?  My inkling is no.

Sure.  Let's assume that the LVM metadata takes more space than a 
partition table and your probability of corruption goes up with size. 
Do their metadata backups help?  I don't know.

Is it anything to worry about?  I doubt it.  If you're not planning on 
measuring reliability to determine if it's good enough then the answer 
is no.  Anecdotally it's just as good as a partition table (i.e., I've 
never had either go bad without the disk dying).

> 2. If we issue a filesystem resize sequence of events/commands and the
> power is lost at a bad moment, how likely is it that the failure would be
> unrecoverable?  I have no idea.

I think you're more worried about resizing the LVM than the ext3 and I 
don't know how atomic the resize is.  But if you're worried about that 
you do a backup first, even if you only have ext3.

> 3. How often does the LVM metadata turn into garbage?  My inkling is not
> very often but I'd like to hear some stories.

Never, in my experience.  Granted that's a small sample but hey.

So what's the disk error rate on this system compared to a "normal" 
system (i.e., in a friendly environment)?  If it's measurably less, what 
have you done to make it acceptable?

And of course all the usual warnings about things that you can do to 
minimize hits on the CF.

Dave


More information about the clue-tech mailing list