Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
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.
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.
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.
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.