[linux-lvm] Fun and games with mirroring

Brassow Jonathan jbrassow at redhat.com
Tue May 22 19:24:15 UTC 2012


On May 22, 2012, at 11:40 AM, Vic wrote:

>> 
>> Ideally you'd want the initramfs scripts to carry out the same actions
>> as the defined mirror repair policy during startup (or to invoke
>> lvconvert --repair to do the same).
> 
> Well, we can call it Somebody Else's Problem, or perhaps LVM should be
> able to use a broken mirror - that's how every other mirror system works,
> and is generally the very reason for having a mirror at all. I consider
> this to be a bug within LVM.

LVM requires that for an LV to be activated while there are missing PVs, the '--partial' flag must be used.  If the script running vgchange does not include '--partial', your mirror won't be activated.

There are also 2 different ways of doing mirroring in LVM now also.  You can choose the 'mirror' segment type or the 'raid1' segment type.  The 'raid1' segment type is a newer offering, but leverages the MD RAID1 personality.  The critical difference between the two is that 'raid1' can operate while there is a faulty device present and the 'mirror' segment type must have something intervene and remove/replace the failed device before it will allow I/O.

It seems to me that the solution might be to attempt to activate the volume group without the partial flag first.  Failing that, activate any 'raid1' LV with a --partial flag and repair and activate any 'mirror' LVs.

 brassow
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/linux-lvm/attachments/20120522/d5bebc3f/attachment.htm>


More information about the linux-lvm mailing list