LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
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 09-09-2009, 05:15 PM   #1
okar
LQ Newbie
 
Registered: Apr 2008
Posts: 16

Rep: Reputation: 0
lvm ontop of raid10 or combine two raid1 via lvm?


hi,
I'm planning to setup a ubuntu file server. I'll be using the 8.04LTS server edition.

the system is probably going to have 4 harddrives.
at the end they shall form an software RAID10 system.

I'd like to use lvm at some point in order to able to make snapshots

as I read through some mdadm and lvm docu/tutorials I could think of two possible setups:

in both cases:
small raid1 of 2 partitions that will form /boot
small raid1 of 2 different partitions as swap space

1.
the rest will form 2 large raid1, which will be combined to a single virtual drive via lvm

2.
make a raid10 out of the rest with mdadm, then make a lvm volume group just consisting of the 1 virtual raid0 device

are there pros/cons for either solution?
is lvm as powerfull as mdadm in striping?
will the first solution produce less overhead?
 
Old 09-10-2009, 01:01 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,414

Rep: Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967
lvm plus raid10? Why? LVM will provide the functional equivalent of the raid0 part of a conventional raid10 instance, but with much more functionality and flexibility. Additionally, LVM can perform mirroring internally, so you can take 4 drives and merge them into one large logical device, with half the total capacity on the drives, with at least 1 spare copy of all data. Sounds like raid10 to be, but with knobs on when you also take 20% of that total capacity for snapshot space too. No Jacket, erm... RAID required.
 
Old 09-11-2009, 09:24 AM   #3
okar
LQ Newbie
 
Registered: Apr 2008
Posts: 16

Original Poster
Rep: Reputation: 0
Quote:
lvm plus raid10? Why?
I've read somewhere that a raid10 performance scales with the number of drives, which ist not the case for lvm:
http://marc.info/?l=linux-raid&m=112484196302440&w=2

the lvm mirroring code is rather new, compared to that of md, isn't it?
is it stable for production use?

Quote:
LVM will provide the functional equivalent of the raid0 part of a conventional raid10 instance, but with much more functionality and flexibility. Additionally, LVM can perform mirroring internally, so you can take 4 drives and merge them into one large logical device, with half the total capacity on the drives, with at least 1 spare copy of all data. Sounds like raid10 to be, but with knobs on when you also take 20% of that total capacity for snapshot space too. No Jacket, erm... RAID required.
does the size of the logical volumne need to be smaller than the available capacity in order to use snapshotting?

does the lvm handle disk failures just as well as a linux software raid?


probably I need to do some benchmarks, when the hardware arrived.
 
Old 09-11-2009, 03:37 PM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,414

Rep: Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967
To be honest I've not used mirroring on LVM so have not had to recover one, but the reference there is clearly about raid 1 + LVM, not raid 10 + LVM, which was mainly what I was replying about, and would really avoid. raid1 + LVM, well fine, do what you're comfortable with there...

In terms of access performance, i *believe* that with the correct stride size on LVM you can write data fast across your disks. Conversely, with a bad choice of stride size you can theoretically reduce your performance.

In terms of snapshot size, yes you need to reserve space. The way it works is that when you trigger a snapshot, all further changes are done to the spare space, with a different version of the inode tree being maintained. Original data, and unchanged data, remains exactly where it is, with an older version of the inode table pointing to the data which constitues the preserved data. When the snapshot space runs out, then the old space has to be used, and at that point the old data has to be reused and the snapshot becomes invalid. Kinda neat, huh?
 
  


Reply


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
Raid1 + LVM on fc6 (some assistance needed) rbanks Linux - Server 1 03-11-2008 01:28 AM
LVM, raid1 and scsi failure Ezplan Linux - Server 1 05-18-2007 02:59 AM
RAID1 LVM disk failure - can't restore ngibsonn Linux - Software 2 03-13-2007 08:49 PM
create a Raid1 Mirrored LVM? Suse 10.2 carl0ski Linux - Hardware 0 12-26-2006 04:23 AM
RAID1+LVM: data keeps getting corrupted Chojin Linux - Software 4 10-22-2006 10:55 AM


All times are GMT -5. The time now is 10:04 PM.

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