[lug] LVM and disk failure
Dan Ferris
dan at usrsbin.com
Sun Jan 8 09:39:11 MST 2006
LVM doesn't increase or decrease robustness. It has nothing to do with
robustness.
I can give you a real wold example of what happens when a disk in an LVM
dies..
One of my RAID 5 arrays crashed. It was part of a 3 RAID unit LVM
running JFS. What actually happened was that the filesystem didn't do
anything. But I did get an email from a user at 10 PM that night that
he had files with permissions of ????????? and some files were missing
or file names had changed to garbage. When I got the RAID unit up again
and rebooted, the filesystem fscked and everything was fine. So while
nobody lost data, if that raid unit hadn't come back up the filesystem
would have been so corrupted nothing would have been useful.
If you read the LVM howto, you will see the part about logical extents.
Mine are set up to be 4 megabytes. So if I had an 8 meg file and 2
disks, each disk will have half of the data. The filesystem is the same
way. If you loose a disk, half of the inodes in the superblock will be
gone, and your filesystem will be damaged beyond any repair.
So I guess the lesson is thus:
-Backups
-Backups
-Backups
-Use redundant disks for your physical volumes.
Dan
Daniel Webb wrote:
>Thanks for the info, that clears it up some. What it comes down to, is that
>LVM increases flexibility at the price of robustness in the case of a physical
>volume failing. As a result, you want your physical volumes to be *very*
>unlikely to fail.
>
>Absurdum infinitum: suppose you created a volume group out of 1000 RAID-1
>pairs. Now if you put a logical volume spanning the whole volume group, and
>one RAID pair dies for whatever reason, the whole thing is gone. So if N is
>the number of physical volumes in your volume group, you should plan for them
>to be N times less likely to fail to get the same chance of overall failure as
>a single disk.
>
>Also, if you can use the 1000 disks without LVM (maybe you have 1000 files
>that just fit each disk), it would be smarter not to use LVM.
>
>But back to part of my original question that wasn't answered: it seems a bit
>silly to me that a filesystem is utterly destroyed if you cut it in half;
>after all, half of it is still there on the second disk. A reasonable request
>in the name of robustness is that the parts that weren't destroyed should be
>recoverable without a huge amount of trouble. Is that too much to ask? I
>don't really know that much about filesystems, so maybe there are reasons this
>is impossible. And yes, I have seen plenty on recovering ext2 filesystem from
>the Google searching to try to answer these questions, it isn't pretty.
>
>_______________________________________________
>Web Page: http://lug.boulder.co.us
>Mailing List: http://lists.lug.boulder.co.us/mailman/listinfo/lug
>Join us on IRC: lug.boulder.co.us port=6667 channel=#colug
>
>
>
>
More information about the LUG
mailing list