LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   LVM mirroring two volumes (https://www.linuxquestions.org/questions/linux-server-73/lvm-mirroring-two-volumes-621232/)

sebstar 02-14-2008 10:42 PM

LVM mirroring two volumes
 
I'm trying to set up a mirror of two LVM volumes so that everything I write, goes to both volumes simultaneously. Anybody know how I can do this? I've done research on LVM but haven't found proper options for this RAID setup.

gargamel 02-15-2008 02:38 AM

I think, you will have to do it the other way round: Set up RAID-1 for the underlying partitions, then put them under the control of LVM. I'm not sure, what happens, if you try to put two LVMs on one RAID-1 device (consisting of two disks, at least). It might work with hardware RAID, though.

But others can certainly provide more reliable advice, I am just delving into this RAID + LVM thing myself, currently, for the first time.

I found these articles useful:
http://www.linuxhomenetworking.com/w..._Software_RAID
http://www.tldp.org/HOWTO/LVM-HOWTO/index.html

http://de.opensuse.org/SW-RAID_und_LVM_(Grundlagen) (German)
http://apropos.wordpress.com/2007/07...-raid-und-lvm/ (German)

gargamel

mether 02-16-2008 12:34 PM

Just for the Technology update, you can also use the feature of LVM mirror in which you don't really need to setup RAID devices. Check lvcreate man pages.

Deleriux 02-16-2008 03:28 PM

The simplest way is to use mdadm to create a raid array and then generate a volume from the array.

The problem here comes in when you want to add more PV's to the volume group. Since adding additional space would require you to buy twice the disks, build a new array with them and then grow your volume group.

You can use the mirroring functionality built into LVM (which is more in the spirit of volume management) but you would need a seperate storage device that is used to maintain a small log.

The LVM mirroring is probably better overall especially if you want to modify the size of the volumes regularly and/or modify the number of mirrors you will be using.

sebstar 02-17-2008 05:07 PM

Thanks for all the suggestions. Since I will not need to grow the filesystem once it's created using mdadm and then LVM might be my best option. I have a file server on a HWRaid device which allready has parity (a 15 drive array with 146 GB SCSI drives) and want to write to another of the same device at the same time so if the first goes down I can use the second one seemlessly.


All times are GMT -5. The time now is 08:34 PM.