Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[solved] LVM type RADI1 vs MD RAID1
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
emc
Guru
Guru


Joined: 02 Jul 2004
Posts: 543
Location: Cracow, Poland

PostPosted: Sun Apr 26, 2015 11:57 am    Post subject: [solved] LVM type RADI1 vs MD RAID1 Reply with quote

I have 2x1TB disks and I'm thinking of LVM with sw RADI1. Lately I found out that https://wiki.gentoo.org/wiki/LVM#Different_storage_allocation_methods LVM itself has possibility of 'RAID1'

Anybody can point me pros and cons of LVM with RAID1 storage allocation method?


Last edited by emc on Mon Apr 27, 2015 4:09 pm; edited 1 time in total
Back to top
View user's profile Send private message
szatox
Veteran
Veteran


Joined: 27 Aug 2013
Posts: 1747

PostPosted: Sun Apr 26, 2015 4:09 pm    Post subject: Reply with quote

I don't understand your question. It tends to work the other way, you decide to go with RAID because you want some features a single drive does not provide you, and not get RAID and then think about pros and cons.
You can setup raid1 either with LVM or device-mapper, but before you get to chosing any implementation you should already have decided whether you want it at all, and this part is not LVM specific
Back to top
View user's profile Send private message
emc
Guru
Guru


Joined: 02 Jul 2004
Posts: 543
Location: Cracow, Poland

PostPosted: Sun Apr 26, 2015 5:07 pm    Post subject: Reply with quote

I got a feeling that LVM some how implemented RAID1/mirror functionality, while is partial true because, as from wiki:
Quote:
Different storage allocation methods
LVM supports different allocation methods for storage:

Linear volumes (which is the default);
Mirrored volumes (in a more-or-less active/standby setup);
Striping (RAID0);
Mirrored volumes (RAID1 - which is more an active/active setup);
Striping with parity (RAID4 and RAID5);
Striping with double parity (RAID6);
Striping and mirroring (RAID10).

and
Quote:
Mirrored volumes
LVM supports mirrored volumes, which provide fault tolerance in the event of drive failure. Unlike RAID1, there is no performance benefit - all reads and writes are delivered to a single side of the mirror.


So, I was confused all RAIDx (form list above) are just regular mdadm RAIDs, yes? If so my question was really stuipd ;)
Back to top
View user's profile Send private message
szatox
Veteran
Veteran


Joined: 27 Aug 2013
Posts: 1747

PostPosted: Mon Apr 27, 2015 7:26 pm    Post subject: Reply with quote

Ok, now that question is good enough I can answer it:
AFAIK they are not, but they do share quite a lot of code.
From your point of view, the difference is if you go with LVM on top of md-raid, you will use RAD devices as physical volumes in LVM. In this case you only use LVM for partitioning some space.
If you go with LVM raid, it's logical volume that is being mirrored. You can't control which physical devices will contain copies.
So, if you for example partitioned 2 drives into sda1, sda2, sdb1, sdb2, with mdraid you can make sure sda1 will be a mirror of sdb1 and sda2 will mirror sdb2. (create one raid with sd*1 and the other with sd*2).
With lvm you can't control it so it's possible you will have a logical volume mirrored on sda1 and sda2 instead, which obviously would suck.

I don't really know why would you actually partition your disks before concatenating them into lvm's pool, but it makes a fine example.
Oh, LVM seems to enjoy complaining in case of hard drive failure, so you have to use --force to bring it up. AFAIK MD-raid in such case simply marks one drive as faulty abd triggers rebuild (if spare is available) and goes on without a need for manul intervention.
Back to top
View user's profile Send private message
emc
Guru
Guru


Joined: 02 Jul 2004
Posts: 543
Location: Cracow, Poland

PostPosted: Mon Apr 27, 2015 11:29 pm    Post subject: Reply with quote

Now it is 100% clear to me, LVM on top of md-raid is what I want to use it.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum