LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 02-14-2008, 10:42 PM   #1
sebstar
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, 02:38 AM   #2
gargamel
Senior Member
 
Registered: May 2003
Distribution: Slackware, SLAX, OpenSuSE
Posts: 1,605

Rep: Reputation: 142Reputation: 142
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

Last edited by gargamel; 02-15-2008 at 02:41 AM.
 
Old 02-16-2008, 12:34 PM   #3
mether
Member
 
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 12:35 PM. Reason: wrong man page reference by mistake.
 
Old 02-16-2008, 03:28 PM   #4
Deleriux
Member
 
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, 05:07 PM   #5
sebstar
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.
 
  


Reply

Tags
lvm


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 11:08 AM
Combining Volumes on LVM Drive in CentOS 5.0 Linux31 Linux - Hardware 2 05-27-2007 08:14 AM
Expanding volumes with LVM in fc3 iaindooley Linux - Software 0 03-23-2007 08:50 PM
LVM and lvextend mirroring smkamene Linux - Software 0 02-26-2005 08:48 PM
Convert LVM volumes to primary partitions? MHouse Linux - Software 0 02-03-2005 10:34 PM


All times are GMT -5. The time now is 03:45 AM.

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