[linux-lvm] Mirrored LV

Georges Giralt georges.giralt at free.fr
Tue Sep 16 19:56:01 UTC 2008

Koen Vermeer a écrit :
> Hi,
> I was thinking of using a mirrored LV as a easier to use alternative to
> a RAID1 PV (with matching VG and LV). I tried to find the information I
> need on how this works and how to set it up, but so far, I failed.
> First, am I right in trying to use LVM in this way? I have two disks,
> and I just want to mirror some LVs.
> Second, I am confused by the apparent need to have this log stored on
> another device. Actually, this doesn't seem true in two ways: There's
> the option of having the log in memory and then the documentation only
> says that the log is 'usually on a separate device'. Does that mean that
> using a mirrored LV makes no sense on a system with two disks? Or should
> I just keep the log in memory in this case? Or can I use another PV on
> one of the disks? Should this be mirrored as well? What happens if I
> loose that data?
>>From what I found when searching for answers, it seems that I'm not the
> only one that's confused... But maybe my searching skills are just
> lacking. Anyway, I appreciate any help and insights!
> Best,
> Koen
I confirm that you have to use 3 disks to mirror a VG with the actual 
version of software.
At home, having enough disk, I use 3 disks to get my VG/LV mirrored and 
it works flawlessly since a couple of years.
At work, we have mirrored the PV using 2 devices and the software RAID 
(md) and build the VG/LV on top of that. It runs flawlessly for 4 years 
I think (have to check the exact installation date...) So choice is yours...
HAve a nice day.
P.S. At home, I do not use the whole PV for my LV.
Each PV is split in two dissymitrical parts : a small 100 M partition 
and the rest of the device. The small partition is used for a software 
RAID (md) to hold the /boot. The rest of the disk as a regular PV used 
to build the mirrored VG/LV. This way, if one disk breaks I still can 
boot onto the remaining  one. Of course, it is a manual boot but easier 
compared to searching a useable rescue CD and the correct kernel 
version. Think about it.

If the only tool you have is a hammer, you tend to see every problem as 
a nail.
                 Abraham Maslow

More information about the linux-lvm mailing list