LVM RAID vs LVM over MD

classic Classic list List threaded Threaded
15 messages Options
Reply | Threaded
Open this post in threaded view
|

LVM RAID vs LVM over MD

Kamil Jońca-5
So far I used lvm with raid1 device as PV.

Recently I have to extend my VG
(https://lists.debian.org/debian-user/2016/11/msg00909.html)

and I read some about lvm.
If I understand correctly, LVM have builtin RAID1 functionality.
And I wonder about migrating
lvm over md --> (lvm with raid1) over physical hard drive partitions.


Any cons?

KJ

--
http://stopstopnop.pl/stop_stopnop.pl_o_nas.html
Wiesz, tryb tekstowy w Linuksie ma się tak do DOSu
jak F-117A do paralotni. (c) Dawid Kuroczko

Reply | Threaded
Open this post in threaded view
|

Re: LVM RAID vs LVM over MD

Henrique de Moraes Holschuh
On Sat, 03 Dec 2016, Kamil Jońca wrote:
> If I understand correctly, LVM have builtin RAID1 functionality.
> And I wonder about migrating
> lvm over md --> (lvm with raid1) over physical hard drive partitions.
>
> Any cons?

Yes, many.  Don't do it.

--
  Henrique Holschuh

Reply | Threaded
Open this post in threaded view
|

Re: LVM RAID vs LVM over MD

Sven Hartge-5
In reply to this post by Kamil Jońca-5
Kamil Jońca <[hidden email]> wrote:

> So far I used lvm with raid1 device as PV.

> Recently I have to extend my VG
> (https://lists.debian.org/debian-user/2016/11/msg00909.html)

> and I read some about lvm.  If I understand correctly, LVM have
> builtin RAID1 functionality.  And I wonder about migrating lvm over md
> --> (lvm with raid1) over physical hard drive partitions.

My last information on the RAID1 code in LVM is, that it is inferior to
the one in MD.

The MD code for example is able to fix broken sectors by reading the data
from the other disk, overwriting the sector on the broken disk with the
correct data, trying to get the drive to remap the sector.

Also, the last time I checked (which was a few years ago, so take my
advise with a bit of caution) the LVM code had no feature to do a
regular scrubbing of the RAID, detecting bit-rot in advance.

Grüße,
Sven.

--
Sigmentation fault. Core dumped.

Reply | Threaded
Open this post in threaded view
|

Re: LVM RAID vs LVM over MD

Roman Tsisyk
In reply to this post by Kamil Jońca-5
On Sat, Dec 3, 2016 at 9:39 PM, Kamil Jońca <[hidden email]> wrote:

> So far I used lvm with raid1 device as PV.
>
> Recently I have to extend my VG
> (https://lists.debian.org/debian-user/2016/11/msg00909.html)
>
> and I read some about lvm.
> If I understand correctly, LVM have builtin RAID1 functionality.
> And I wonder about migrating
> lvm over md --> (lvm with raid1) over physical hard drive partitions.
>

Please ask yourself a simple question: do you know how to recover LVM RAID?
I don't. mdraid is proven technology which just works.

The truth is that all these overcomplicated stuff (lvm, pulseaudio,
systemd, etc.) is designed to increase sales of premium support from
RedHat. SCNR.

--
WBR,
  Roman Tsisyk <[hidden email]>

Reply | Threaded
Open this post in threaded view
|

Re: LVM RAID vs LVM over MD

Kamil Jońca-5
In reply to this post by Henrique de Moraes Holschuh
Henrique de Moraes Holschuh <[hidden email]> writes:

> On Sat, 03 Dec 2016, Kamil Jońca wrote:
>> If I understand correctly, LVM have builtin RAID1 functionality.
>> And I wonder about migrating
>> lvm over md --> (lvm with raid1) over physical hard drive partitions.
>>
>> Any cons?
>
> Yes, many.  Don't do it.

For example?

So far found by googling:
1. it's rather new code (yes I know that is md based, but integration
... in lvm)
2. very little community (so harder to get answers for questions)
3. lack of recovery advices (or I can't find them)
4. no "mdadm --monitor" equivalent (or I can't find)

but these can be only my inexperience or "code newness" :)
KJ
--
http://stopstopnop.pl/stop_stopnop.pl_o_nas.html
Try to divide your time evenly to keep others happy.

Reply | Threaded
Open this post in threaded view
|

Re: LVM RAID vs LVM over MD

Jonathan Dowland
In reply to this post by Kamil Jońca-5
On Sat, Dec 03, 2016 at 07:39:37PM +0100, Kamil Jońca wrote:

> So far I used lvm with raid1 device as PV.
>
> Recently I have to extend my VG
> (https://lists.debian.org/debian-user/2016/11/msg00909.html)
>
> and I read some about lvm.
> If I understand correctly, LVM have builtin RAID1 functionality.
> And I wonder about migrating
> lvm over md --> (lvm with raid1) over physical hard drive partitions.
>
>
> Any cons?
MD is older, has had more development and is generally considered to be
more robust. I would always choose to do RAID with MD, directly on the
disks, and put LVM on top of the MD virtual block devices.

--
Jonathan Dowland
Please do not CC me, I am subscribed to the list.

signature.asc (836 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: LVM RAID vs LVM over MD

Nicholas Geovanis-2
I'd like to make sure I'm taking away the right thing from this conversation.
It seems we have high-level recommendations _not_ to use LVM RAID1.
Not just over MD, simply don't use it at all. Do I get that right?

On Mon, Dec 5, 2016 at 4:25 AM, Jonathan Dowland <[hidden email]> wrote:
On Sat, Dec 03, 2016 at 07:39:37PM +0100, Kamil Jońca wrote:
> So far I used lvm with raid1 device as PV.
>
> Recently I have to extend my VG
> (https://lists.debian.org/debian-user/2016/11/msg00909.html)
>
> and I read some about lvm.
> If I understand correctly, LVM have builtin RAID1 functionality.
> And I wonder about migrating
> lvm over md --> (lvm with raid1) over physical hard drive partitions.
>
>
> Any cons?

MD is older, has had more development and is generally considered to be
more robust. I would always choose to do RAID with MD, directly on the
disks, and put LVM on top of the MD virtual block devices.

--
Jonathan Dowland
Please do not CC me, I am subscribed to the list.

Reply | Threaded
Open this post in threaded view
|

Re: LVM RAID vs LVM over MD

Dan Ritter-4
On Mon, Dec 05, 2016 at 01:14:14PM -0600, Nicholas Geovanis wrote:
> I'd like to make sure I'm taking away the right thing from this
> conversation.
> It seems we have high-level recommendations _not_ to use LVM RAID1.
> Not just over MD, simply don't use it at all. Do I get that right?
>

Yes.

If you want RAID1, use mdadm (and use RAID10 with 2 devices).

If you want LVM, use LVM.

If you want LVM on top of RAID, use LVM on top of mdadm, but consider
whether you might actually want ZFS instead.

-dsr-

Reply | Threaded
Open this post in threaded view
|

Re: LVM RAID vs LVM over MD

Sven Hartge-5
In reply to this post by Nicholas Geovanis-2
Nicholas Geovanis <[hidden email]> wrote:

> I'd like to make sure I'm taking away the right thing from this
> conversation.
> It seems we have high-level recommendations _not_ to use LVM RAID1.

Yes.

> Not just over MD, simply don't use it at all. Do I get that right?

Yes. With MD lower in the stack, you don't need LVM-RAID1.



--
Sigmentation fault. Core dumped.

Reply | Threaded
Open this post in threaded view
|

Re: LVM RAID vs LVM over MD

Sven Hartge-5
In reply to this post by Dan Ritter-4
Dan Ritter <[hidden email]> wrote:

> If you want LVM on top of RAID, use LVM on top of mdadm, but consider
> whether you might actually want ZFS instead.

Side note: With ZFS you don't want to use MD (or any other RAID) below
ZFS but instead put all disk directly into a (or multiple) VDEV.



--
Sigmentation fault. Core dumped.

Reply | Threaded
Open this post in threaded view
|

Re: LVM RAID vs LVM over MD

Roman Tsisyk
On Mon, Dec 5, 2016 at 10:47 PM, Sven Hartge <[hidden email]> wrote:
> Dan Ritter <[hidden email]> wrote:
>
>> If you want LVM on top of RAID, use LVM on top of mdadm, but consider
>> whether you might actually want ZFS instead.
>
> Side note: With ZFS you don't want to use MD (or any other RAID) below
> ZFS but instead put all disk directly into a (or multiple) VDEV.
>

I wonder do you want your data back? :)

--
WBR,
  Roman Tsisyk <[hidden email]>

Reply | Threaded
Open this post in threaded view
|

Re: LVM RAID vs LVM over MD

Sven Hartge-5
Roman Tsisyk <[hidden email]> wrote:
> On Mon, Dec 5, 2016 at 10:47 PM, Sven Hartge <[hidden email]> wrote:
>> Dan Ritter <[hidden email]> wrote:

>>> If you want LVM on top of RAID, use LVM on top of mdadm, but
>>> consider whether you might actually want ZFS instead.

>> Side note: With ZFS you don't want to use MD (or any other RAID)
>> below ZFS but instead put all disk directly into a (or multiple)
>> VDEV.

> I wonder do you want your data back? :)

Why?



--
Sigmentation fault. Core dumped.

Reply | Threaded
Open this post in threaded view
|

Re: LVM RAID vs LVM over MD

Igor Cicimov
In reply to this post by Nicholas Geovanis-2

On 6 Dec 2016 5:14 am, "Nicholas Geovanis" <[hidden email]> wrote:
>
> I'd like to make sure I'm taking away the right thing from this conversation.
> It seems we have high-level recommendations _not_ to use LVM RAID1.
> Not just over MD, simply don't use it at all. Do I get that right?
>
> On Mon, Dec 5, 2016 at 4:25 AM, Jonathan Dowland <[hidden email]> wrote:
>>
>> On Sat, Dec 03, 2016 at 07:39:37PM +0100, Kamil Jońca wrote:
>> > So far I used lvm with raid1 device as PV.
>> >
>> > Recently I have to extend my VG
>> > (https://lists.debian.org/debian-user/2016/11/msg00909.html)
>> >
>> > and I read some about lvm.
>> > If I understand correctly, LVM have builtin RAID1 functionality.
>> > And I wonder about migrating
>> > lvm over md --> (lvm with raid1) over physical hard drive partitions.
>> >
>> >
>> > Any cons?
>>
>> MD is older, has had more development and is generally considered to be
>> more robust. I would always choose to do RAID with MD, directly on the
>> disks, and put LVM on top of the MD virtual block devices.
>>
>> --
>> Jonathan Dowland
>> Please do not CC me, I am subscribed to the list.
>
>
It depends. If you are using cloud services with remote shared storage like AWS EBS it does not make sense using LVM on top of RAID. To me it is just adding complexity to already complex SAN storage. You also have no idea what the block devices presented to the VM are coming from it might be a file coming over iSCSI. I've been using LVM raid on AWS EBS for years without any issues. My advice is test and match them all before you make your decision each ones user case and experience is different.

Reply | Threaded
Open this post in threaded view
|

Re: LVM RAID vs LVM over MD

Jonathan Dowland
On Tue, Dec 06, 2016 at 10:53:30AM +1100, Igor Cicimov wrote:
> It depends. If you are using cloud services with remote shared storage like
> AWS EBS it does not make sense using LVM on top of RAID. To me it is just
> adding complexity to already complex SAN storage. You also have no idea
> what the block devices presented to the VM are coming from it might be a
> file coming over iSCSI. I've been using LVM raid on AWS EBS for years
> without any issues. My advice is test and match them all before you make
> your decision each ones user case and experience is different.

I should have prefixed my answer with "If you want RAID...". I don't
personally use RAID anywhere, myself, at the moment.

In the situation you describe then you are doing logical volume management
elsewhere and you would indeed not need LVM. You should also address redundancy
at that other layer so you wouldn't need (local) RAID either, either LVM or MD
based, IMHO.

You don't explain why you chose to use LVM RAID over mdadm, but as I said, I
wouldn't use either in your case.

--
Jonathan Dowland
Please do not CC me, I am subscribed to the list.

signature.asc (836 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: LVM RAID vs LVM over MD

Igor Cicimov


On 12 Dec 2016 10:21 pm, "Jonathan Dowland" <[hidden email]> wrote:
On Tue, Dec 06, 2016 at 10:53:30AM +1100, Igor Cicimov wrote:
> It depends. If you are using cloud services with remote shared storage like
> AWS EBS it does not make sense using LVM on top of RAID. To me it is just
> adding complexity to already complex SAN storage. You also have no idea
> what the block devices presented to the VM are coming from it might be a
> file coming over iSCSI. I've been using LVM raid on AWS EBS for years
> without any issues. My advice is test and match them all before you make
> your decision each ones user case and experience is different.

I should have prefixed my answer with "If you want RAID...". I don't
personally use RAID anywhere, myself, at the moment.

In the situation you describe then you are doing logical volume management
elsewhere and you would indeed not need LVM. You should also address redundancy
at that other layer so you wouldn't need (local) RAID either, either LVM or MD
based, IMHO.

You don't explain why you chose to use LVM RAID over mdadm, but as I said, I
wouldn't use either in your case.

--
Jonathan Dowland
Please do not CC me, I am subscribed to the list.

It is not all about redundancy but performance too. In my tests the lvm-raid performed better than plain lvm.