FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Gentoo > Gentoo User

 
 
LinkBack Thread Tools
 
Old 11-29-2011, 03:10 AM
Michael Mol
 
Default dmraid, mdraid, lvm, btrfs, what?

I've got four 750GB drives in addition to the installed system drive.


I'd like to aggregate them and split them into a few volumes. My first inclination would be to raid them and drop lvm on top.* I know lvm well enough, but I don't remember md that well.


Since I don't recall md well, and this isn't urgent, I figure I can look at the options.


The obvious ones appear tobe mdraid, dmraid and btrfs. I'm not sure I'm interested in btrfs until it's got a fsck that will repair errors, but I'm looking forward to it once it's ready.


Any options I missed? What are the advantages and disadvantages?


ZZ
 
Old 11-29-2011, 06:07 AM
Florian Philipp
 
Default dmraid, mdraid, lvm, btrfs, what?

Am 29.11.2011 05:10, schrieb Michael Mol:
> I've got four 750GB drives in addition to the installed system drive.
>
> I'd like to aggregate them and split them into a few volumes. My first
> inclination would be to raid them and drop lvm on top. I know lvm well
> enough, but I don't remember md that well.
>
> Since I don't recall md well, and this isn't urgent, I figure I can look
> at the options.
>
> The obvious ones appear tobe mdraid, dmraid and btrfs. I'm not sure I'm
> interested in btrfs until it's got a fsck that will repair errors, but
> I'm looking forward to it once it's ready.
>
> Any options I missed? What are the advantages and disadvantages?
>
> ZZ
>

Sounds good so far. Of course, you only need mdraid OR dmraid (md
recommended). What kind of RAID level do you want to use, 10 or 5? You
can also split it: Use a smaller RAID 10 for performance-critical
partitions like /usr and the more space-efficient RAID 5 for bulk like
videos. You can handle this with one LVM volume group consisting of two
physical volumes. Then you can decide on a per-logical-volume basis
where it should allocate space and also migrate LVs between the two PVs.

Another thing you can think of is whether you want encryption. I've done
this for my laptop. The usual setup would by md->lvm->crypt. I've done
it crypt->lvm (an LVM physical volume on top of an encrypted partition).
This way, I only need to enter the password once. You can enforce a
specific order between lvm, md and dmcrypt by putting stuff like this in
/etc/rc.conf:
rc_dmcrypt_before="lvm"
rc_dmcrypt_after="udev"

Regards,
Florian Philipp
 
Old 11-29-2011, 12:44 PM
Michael Mol
 
Default dmraid, mdraid, lvm, btrfs, what?

On Tue, Nov 29, 2011 at 2:07 AM, Florian Philipp <lists@binarywings.net> wrote:
> Am 29.11.2011 05:10, schrieb Michael Mol:
>> I've got four 750GB drives in addition to the installed system drive.
>>
>> I'd like to aggregate them and split them into a few volumes. My first
>> inclination would be to raid them and drop lvm on top. *I know lvm well
>> enough, but I don't remember md that well.
>>
>> Since I don't recall md well, and this isn't urgent, I figure I can look
>> at the options.
>>
>> The obvious ones appear tobe mdraid, dmraid and btrfs. I'm not sure I'm
>> interested in btrfs until it's got a fsck that will repair errors, but
>> I'm looking forward to it once it's ready.
>>
>> Any options I missed? What are the advantages and disadvantages?
>>
>> ZZ
>>
>
> Sounds good so far. Of course, you only need mdraid OR dmraid (md
> recommended).

dmraid looks rather new on the block. Or, at least, I've been more
aware of md than dm over the years. What's its purpose, as compared to
dmraid? Why is mdraid recommended over it?

> What kind of RAID level do you want to use, 10 or 5? You
> can also split it: Use a smaller RAID 10 for performance-critical
> partitions like /usr and the more space-efficient RAID 5 for bulk like
> videos. You can handle this with one LVM volume group consisting of two
> physical volumes. Then you can decide on a per-logical-volume basis
> where it should allocate space and also migrate LVs between the two PVs.

Since I've got four disks for the pool, I was thinking raid10 with lvm
on top, and a single lvm pv above that.

> Another thing you can think of is whether you want encryption. I've done
> this for my laptop. The usual setup would by md->lvm->crypt. I've done
> it crypt->lvm (an LVM physical volume on top of an encrypted partition).
> This way, I only need to enter the password once. You can enforce a
> specific order between lvm, md and dmcrypt by putting stuff like this in
> /etc/rc.conf:
> rc_dmcrypt_before="lvm"
> rc_dmcrypt_after="udev"

Really not interested in encryption for this box. No need.

--
:wq
 
Old 11-29-2011, 01:10 PM
Mark Knecht
 
Default dmraid, mdraid, lvm, btrfs, what?

On Mon, Nov 28, 2011 at 8:10 PM, Michael Mol <mikemol@gmail.com> wrote:
> I've got four 750GB drives in addition to the installed system drive.
>
> I'd like to aggregate them and split them into a few volumes. My first
> inclination would be to raid them and drop lvm on top.* I know lvm well
> enough, but I don't remember md that well.
>
> Since I don't recall md well, and this isn't urgent, I figure I can look at
> the options.
>
> The obvious ones appear tobe mdraid, dmraid and btrfs. I'm not sure I'm
> interested in btrfs until it's got a fsck that will repair errors, but I'm
> looking forward to it once it's ready.
>
> Any options I missed? What are the advantages and disadvantages?
>
> ZZ

Hi Michael,
Welcome to the world of what ever sort of multi-disk environment
you choose. It's a HUGE topic and a conversation I look forward to
having as you dig through it.

My main compute system here at home has six 500GB WD RE3 drives.
Five are in use with one as a cold spare. I'm using md. It's pretty
mature and you have good access to the main developer through the
email list. I don't know much about dm. If this is your first time
putting RAID on a box (it was for me) then I think md is a good
choice. On the other hand you're more system software savy than I am
so go with what you think is best for you.

1) First lesson - not all hard drives make good RAID hard drives. I
started with six 1TB WD Green drives and found they made _terrible_
RAID units so I took them out and bought _real_ RAID drives. They were
only half as large for the same price but they have worked perfectly
for nearly 2 years.

2) Second lesson - prepare to build a few RAID configurations and
TEST, TEST, TEST __BEFORE__ (BEFORE!!!) you make _ANY_ decision about
what sort of RAID you really want. There are a LOT of parameter
choices that effect performance, reliability, capacity and I think to
some extent your ability to change RAID types later on. To name a few:
The obvious RAID type (0,1,2,3,4,5,6,10, etc.) but also chunk size,
metadata type, physical layout for certain RAID types, etc. I strongly
suggest building 5-10 different configurations and testing them with
bonnie++ to gauge speed. I didn't do enough of this before I built
this system and I've been dealing with the effects ever since.

3) Third lesson - think deeply about what happens when 1 drive goes
bad and you are in the process of fixing the system. Do you have a
spare drive ready? Is it in the box? Hot or cold? What happens if a
second drive in the system fails while you're rebuilding the RAID?
It's from the same manufacturing lot so it probably suffers from the
same weaknesses. My decision for the most part was (for data or system
drives) 3-drive RAID1 or 5-drive RAID6. For backup I went with 5-drive
RAID5. It all makes me feel good, but it's too complicated.

4) Lastly - as they say all the time on the mdadm list: RAID is not a backup.

Personally I like your idea of one big RAID with lvm on top but I
haven't done it myself. I think it's what I would look at today if I
was starting from scratch, but I'm not sure. It would take some study.

Hope this helps even a little,
Mark
 
Old 11-29-2011, 03:53 PM
Michael Mol
 
Default dmraid, mdraid, lvm, btrfs, what?

On Tue, Nov 29, 2011 at 9:10 AM, Mark Knecht <markknecht@gmail.com> wrote:
> On Mon, Nov 28, 2011 at 8:10 PM, Michael Mol <mikemol@gmail.com> wrote:
>
> Hi Michael,
> * Welcome to the world of what ever sort of multi-disk environment
> you choose. It's a HUGE topic and a conversation I look forward to
> having as you dig through it.
>
> * My main compute system here at home has six 500GB WD RE3 drives.
> Five are in use with one as a cold spare. *I'm using md. It's pretty
> mature and you have good access to the main developer through the
> email list. I don't know much about dm. If this is your first time
> putting RAID on a box (it was for me) then I think md is a good
> choice. On the other hand you're more system software savy than I am
> so go with what you think is best for you.

Last time I set up RAID was three or four years ago. Two volumes, on
RAID5 of three 1.5TB drives (Seagate econo drives, but they worked
well enough for me), one RIAD0 of three 1TB drives (WD Caviar Black).

The RAID0 was for some video munging scratch space. The RAID5, I
mounted as /home. Those volumes lasted a couple years, before I
rebuilt all of them as two LVM pvgs, using the same drive sets.

>
> 1) First lesson - not all hard drives make good RAID hard drives. I
> started with six 1TB WD Green drives and found they made _terrible_
> RAID units so I took them out and bought _real_ RAID drives. They were
> only half as large for the same price but they have worked perfectly
> for nearly 2 years.

What makes a good RAID unit, and what makes a terrible RAID unit?
Unless we're talking rapid failure, I'd think anything striped would
be faster than the bare drive alone.

>
> 2) Second lesson - prepare to build a few RAID configurations and
> TEST, TEST, TEST __BEFORE__ (BEFORE!!!) you make _ANY_ decision about
> what sort of RAID you really want. There are a LOT of parameter
> choices that effect performance, reliability, capacity and I think to
> some extent your ability to change RAID types later on. To name a few:
> The obvious RAID type (0,1,2,3,4,5,6,10, etc.) but also chunk size,
> metadata type, physical layout for certain RAID types, etc. I strongly
> suggest building 5-10 different configurations and testing them with
> bonnie++ to gauge speed. I didn't do enough of this before I built
> this system and I've been dealing with the effects ever since.

I'm familiar with the different RAID types and how they operate. I'm
familiar with some of the impacts of chunk size, what that can mean in
impacts on caching and sector overlap (for SSD and 2TB+ drives, at
least).

The purpose of this array (or set of arrays) is for volume aggregation
with a touch of redundancy. Speed is a tertiary concern, and if it
becomes a real issue, I'll adapt; I've got 730GB left free on the
system's primary disk which I can throw into the mix any which way.
(use it raw as I currently am, or stripe a logical volume into it...)

> 3) Third lesson - think deeply about what happens when 1 drive goes
> bad and you are in the process of fixing the system. Do you have a
> spare drive ready?

Don't plan to, but I don't plan on storing vital or
operations-dependent data in the volume without backup. These are
going to be volumes of convenience.

> Is it in the box? Hot or cold? What happens if a
> second drive in the system fails while you're rebuilding the RAID?

Drop the failed drives, rebuild with the remaining drives, copy back a backup.

> It's from the same manufacturing lot so it probably suffers from the
> same weaknesses. My decision for the most part was (for data or system
> drives) 3-drive RAID1 or 5-drive RAID6. For backup I went with 5-drive
> RAID5. It all makes me feel good, but it's too complicated.
>
> 4) Lastly - as they say all the time on the mdadm list: RAID is not a backup.

Absolutely. I've had discussions of RAID and disk storage many times
with some rather apt and experienced friends, but dmraid and btrfs are
relatively new on the block, and the gentoo-user list is a new,
mostly-untapped resource of expertise. I wanted to pick up any
additional knowledge or references I hadn't heard before.

> * Personally I like your idea of one big RAID with lvm on top but I
> haven't done it myself. I think it's what I would look at today if I
> was starting from scratch, but I'm not sure. It would take some study.

It's probably the simplest way forward. I notice there are some
network-syncing block devices in the kernel (acting as RAID1 over a
network) I'd like to play with, but I haven't done anything with OCFS2
(or whatever other multi-operator filesystems are in the 3.0.6 kernel)
before.

>
> Hope this helps even a little,
> Mark

Certainly does. Also, your email has a permanent URL through at least
a couple mailing list archivers, so it'll be a good thing to link to
in the future.


--
:wq
 
Old 11-29-2011, 04:35 PM
Jack Byer
 
Default dmraid, mdraid, lvm, btrfs, what?

Florian Philipp wrote:

> Another thing you can think of is whether you want encryption. I've done
> this for my laptop. The usual setup would by md->lvm->crypt. I've done
> it crypt->lvm (an LVM physical volume on top of an encrypted partition).
> This way, I only need to enter the password once. You can enforce a
> specific order between lvm, md and dmcrypt by putting stuff like this in
> /etc/rc.conf:
> rc_dmcrypt_before="lvm"
> rc_dmcrypt_after="udev"

I like to use whole disk encryption so I'll format each drive with LUKS and
then use Dracut for an initramfs when I boot so that it takes care of
setting up dmcrypt/lvm/md before OpenRC ever starts up.
 
Old 11-29-2011, 05:20 PM
Florian Philipp
 
Default dmraid, mdraid, lvm, btrfs, what?

Am 29.11.2011 14:44, schrieb Michael Mol:
> On Tue, Nov 29, 2011 at 2:07 AM, Florian Philipp <lists@binarywings.net> wrote:
>> Am 29.11.2011 05:10, schrieb Michael Mol:
>>> I've got four 750GB drives in addition to the installed system drive.
>>>
>>> I'd like to aggregate them and split them into a few volumes. My first
>>> inclination would be to raid them and drop lvm on top. I know lvm well
>>> enough, but I don't remember md that well.
>>>
>>> Since I don't recall md well, and this isn't urgent, I figure I can look
>>> at the options.
>>>
>>> The obvious ones appear tobe mdraid, dmraid and btrfs. I'm not sure I'm
>>> interested in btrfs until it's got a fsck that will repair errors, but
>>> I'm looking forward to it once it's ready.
>>>
>>> Any options I missed? What are the advantages and disadvantages?
>>>
>>> ZZ
>>>
>>
>> Sounds good so far. Of course, you only need mdraid OR dmraid (md
>> recommended).
>
> dmraid looks rather new on the block. Or, at least, I've been more
> aware of md than dm over the years. What's its purpose, as compared to
> dmraid? Why is mdraid recommended over it?
>

dmraid being new? Not really. Anyway: Under the hood, md and dm use the
exactly same code in the kernel. They just provide different interfaces.
mdraid is a linux-specific software RAID implemented on top of ordinary
single-disk disk controllers. It works like a charm and any Linux system
with any disk controller can work with it (if you ever change your
hardware).

dmraid provides a "fake-RAID": A software RAID with support of (or
rather, under control of) a cheap on-board RAID controller.
Performance-wise, it usually doesn't provide any kind of advantage
because the kernel driver still has to do all the heavy lifting
(therefore it uses the same code base as mdraid). Its most important
disadvantage is that it binds you to the vendor of the chipset who
determines the on-disk layout. Apparently, this gets better in the last
few years because of some pretty major consolidations on the chipset
market. It might be helpful if you consider dual-booting Windows on the
same RAID (both systems ought to use the same disk layout by means of
their respective drivers).


>> What kind of RAID level do you want to use, 10 or 5? You
>> can also split it: Use a smaller RAID 10 for performance-critical
>> partitions like /usr and the more space-efficient RAID 5 for bulk like
>> videos. You can handle this with one LVM volume group consisting of two
>> physical volumes. Then you can decide on a per-logical-volume basis
>> where it should allocate space and also migrate LVs between the two PVs.
>
> Since I've got four disks for the pool, I was thinking raid10 with lvm
> on top, and a single lvm pv above that.
>

Yeah, that would also be my recommendation. But if storage efficiency is
more relevant, RAID-5 with 4 disks brings you 750GB more usable storage.
 
Old 11-29-2011, 05:39 PM
Michael Mol
 
Default dmraid, mdraid, lvm, btrfs, what?

On Tue, Nov 29, 2011 at 1:20 PM, Florian Philipp <lists@binarywings.net> wrote:
> Am 29.11.2011 14:44, schrieb Michael Mol:
>> On Tue, Nov 29, 2011 at 2:07 AM, Florian Philipp <lists@binarywings.net> wrote:
>>> Am 29.11.2011 05:10, schrieb Michael Mol:
>>>> I've got four 750GB drives in addition to the installed system drive.
>>>>
>>>> I'd like to aggregate them and split them into a few volumes. My first
>>>> inclination would be to raid them and drop lvm on top. *I know lvm well
>>>> enough, but I don't remember md that well.
>>>>
>>>> Since I don't recall md well, and this isn't urgent, I figure I can look
>>>> at the options.
>>>>
>>>> The obvious ones appear tobe mdraid, dmraid and btrfs. I'm not sure I'm
>>>> interested in btrfs until it's got a fsck that will repair errors, but
>>>> I'm looking forward to it once it's ready.
>>>>
>>>> Any options I missed? What are the advantages and disadvantages?
>>>>
>>>> ZZ
>>>>
>>>
>>> Sounds good so far. Of course, you only need mdraid OR dmraid (md
>>> recommended).
>>
>> dmraid looks rather new on the block. Or, at least, I've been more
>> aware of md than dm over the years. What's its purpose, as compared to
>> dmraid? Why is mdraid recommended over it?
>>
>
> dmraid being new? Not really. Anyway: Under the hood, md and dm use the
> exactly same code in the kernel. They just provide different interfaces.
> mdraid is a linux-specific software RAID implemented on top of ordinary
> single-disk disk controllers. It works like a charm and any Linux system
> with any disk controller can work with it (if you ever change your
> hardware).
>
> dmraid provides a "fake-RAID": A software RAID with support of (or
> rather, under control of) a cheap on-board RAID controller.
> Performance-wise, it usually doesn't provide any kind of advantage
> because the kernel driver still has to do all the heavy lifting
> (therefore it uses the same code base as mdraid). Its most important
> disadvantage is that it binds you to the vendor of the chipset who
> determines the on-disk layout. Apparently, this gets better in the last
> few years because of some pretty major consolidations on the chipset
> market. It might be helpful if you consider dual-booting Windows on the
> same RAID (both systems ought to use the same disk layout by means of
> their respective drivers).
>
>
>>> What kind of RAID level do you want to use, 10 or 5? You
>>> can also split it: Use a smaller RAID 10 for performance-critical
>>> partitions like /usr and the more space-efficient RAID 5 for bulk like
>>> videos. You can handle this with one LVM volume group consisting of two
>>> physical volumes. Then you can decide on a per-logical-volume basis
>>> where it should allocate space and also migrate LVs between the two PVs.
>>
>> Since I've got four disks for the pool, I was thinking raid10 with lvm
>> on top, and a single lvm pv above that.
>>
>
> Yeah, that would also be my recommendation. But if storage efficiency is
> more relevant, RAID-5 with 4 disks brings you 750GB more usable storage.
>
>

It looks like I'll want to try two different configurations. RAID5 and
RAID10. Not for different storage requirements, but I want to see
exactly what the performance drop is.

I wish lvm striping supported data redundancy. But, then, I wish btrfs
was ready...

--
:wq
 
Old 11-29-2011, 06:02 PM
Jarry
 
Default dmraid, mdraid, lvm, btrfs, what?

On 29-Nov-11 17:53, Michael Mol wrote:


1) First lesson - not all hard drives make good RAID hard drives.


What makes a good RAID unit, and what makes a terrible RAID unit?


Some hard-drives are not suitable for raid at all. There
are many reasons for that, one example is error-recovery.
Check wiki for more info:

http://en.wikipedia.org/wiki/Time-Limited_Error_Recovery

In the first place, I would not recommend those "eco" and
"green" versions for raid at all. They have some saving
mechanisms which tend to activate at wrong time and cause
problems for raid-controllers (be it SW or HW). I'd say
it is worth to pay a few bucks more for enterprise-class
24/7 (or special "raid-edition") drives.

Jarry
--
__________________________________________________ _____________
This mailbox accepts e-mails only from selected mailing-lists!
Everything else is considered to be spam and therefore deleted.
 
Old 11-29-2011, 06:23 PM
Florian Philipp
 
Default dmraid, mdraid, lvm, btrfs, what?

Am 29.11.2011 19:39, schrieb Michael Mol:
> On Tue, Nov 29, 2011 at 1:20 PM, Florian Philipp <lists@binarywings.net> wrote:
>> Am 29.11.2011 14:44, schrieb Michael Mol:
>>> On Tue, Nov 29, 2011 at 2:07 AM, Florian Philipp <lists@binarywings.net> wrote:
>>>> Am 29.11.2011 05:10, schrieb Michael Mol:
>>>>> I've got four 750GB drives in addition to the installed system drive.
>>>>>
>>>>> I'd like to aggregate them and split them into a few volumes. My first
>>>>> inclination would be to raid them and drop lvm on top. I know lvm well
>>>>> enough, but I don't remember md that well.
>>>>>
>>>>> Since I don't recall md well, and this isn't urgent, I figure I can look
>>>>> at the options.
>>>>>
[...]
>>>> What kind of RAID level do you want to use, 10 or 5? You
>>>> can also split it: Use a smaller RAID 10 for performance-critical
>>>> partitions like /usr and the more space-efficient RAID 5 for bulk like
>>>> videos. You can handle this with one LVM volume group consisting of two
>>>> physical volumes. Then you can decide on a per-logical-volume basis
>>>> where it should allocate space and also migrate LVs between the two PVs.
>>>
>>> Since I've got four disks for the pool, I was thinking raid10 with lvm
>>> on top, and a single lvm pv above that.
>>>
>>
>> Yeah, that would also be my recommendation. But if storage efficiency is
>> more relevant, RAID-5 with 4 disks brings you 750GB more usable storage.
>>
>>
>
> It looks like I'll want to try two different configurations. RAID5 and
> RAID10. Not for different storage requirements, but I want to see
> exactly what the performance drop is.
>
> I wish lvm striping supported data redundancy. But, then, I wish btrfs
> was ready...
>

Just out of curiosity: What happens if you do `lvcreate --mirrors 1
--stripes 2 ...`? Does it create something similar to a RAID-10 or does
it simply fail?

Regards,
Florian Philipp
 

Thread Tools




All times are GMT. The time now is 04:43 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org