Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - Server
User Name
Linux - Server This forum is for the discussion of Linux Software used in a server related context.


  Search this Thread
Old 02-14-2008, 11:42 PM   #1
LQ Newbie
Registered: Feb 2005
Location: Montreal
Distribution: RedHat Enterprise 3 & 4, OS X, IRIX 6.5.28, Ubuntu, TOMSRTBT, Knoppix...
Posts: 7

Rep: Reputation: 0
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.
Old 02-15-2008, 03:38 AM   #2
Senior Member
Registered: May 2003
Distribution: Slackware, SLAX, OpenSuSE
Posts: 1,722

Rep: Reputation: 176Reputation: 176
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: (German) (German)


Last edited by gargamel; 02-15-2008 at 03:41 AM.
Old 02-16-2008, 01:34 PM   #3
Registered: Mar 2007
Distribution: RHEL, Fedora, Open Suse
Posts: 151

Rep: Reputation: 31
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.

Last edited by mether; 02-16-2008 at 01:35 PM. Reason: wrong man page reference by mistake.
Old 02-16-2008, 04:28 PM   #4
Registered: Nov 2003
Posts: 89

Rep: Reputation: 16
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.
Old 02-17-2008, 06:07 PM   #5
LQ Newbie
Registered: Feb 2005
Location: Montreal
Distribution: RedHat Enterprise 3 & 4, OS X, IRIX 6.5.28, Ubuntu, TOMSRTBT, Knoppix...
Posts: 7

Original Poster
Rep: Reputation: 0
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.



Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
help with partitioning large volumes with LVM disorderly Linux - Server 0 08-28-2007 12:08 PM
Combining Volumes on LVM Drive in CentOS 5.0 Linux31 Linux - Hardware 2 05-27-2007 09:14 AM
Expanding volumes with LVM in fc3 iaindooley Linux - Software 0 03-23-2007 09:50 PM
LVM and lvextend mirroring smkamene Linux - Software 0 02-26-2005 09:48 PM
Convert LVM volumes to primary partitions? MHouse Linux - Software 0 02-03-2005 11:34 PM > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 07:02 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration