Skip to contentSkip to conversation

RAID-less parity?

linux-lvm Janne Heß 3 participants 5 messages Jul 13, 2020 – Jul 30, 2020

lore
Share & tools
lore

Janne Heß

author
#0 lore raw

Hello everyone,

I'm currently testing dm-integrity and its use with LVM.
For RAID 1,5,6 LVM should just be able to recover the RAID when integrity fails (and the block device returns a read error).
However some of my systems are single-disk systems. For those, RAIDs are not possible so I was thinking if LVM has some support for single-PV setups with parity on the same PV.
While this is probably a niche feature right now, I can see other projects like Stratis benefit from the integrity checks provided by dm-integrity (and dm-crypt in the future) to detect (and thanks to parity fix) bit rots. So is there any way to get a parity setup with the current state of LVM? I was thinking of a RAID-4 with one PV but the current tooling (more specifically lvcreate) doesn't let me do that.

Thanks and regards
Janne

#1 lore raw
Quoted 7 lines · Janne Heß

Hello everyone,

I'm currently testing dm-integrity and its use with LVM.
For RAID 1,5,6 LVM should just be able to recover the RAID when integrity fails (and the block device returns a read error).
However some of my systems are single-disk systems. For those, RAIDs are not possible so I was thinking if LVM has some support for single-PV setups with parity on the same PV.
While this is probably a niche feature right now, I can see other projects like Stratis benefit from the integrity checks provided by dm-integrity (and dm-crypt in the future) to detect (and thanks to parity fix) bit rots. So is there any way to get a parity setup with the current state of LVM? I was thinking of a RAID-4 with one PV but the current tooling (more specifically lvcreate) doesn't let me do that.

Hi,
on current LVM implementation, the number of stripes can not exceed the number of physical device.

The only possibility I can think of is to partition your disk in multiple regions (ie: 3 partitions), adding them as PV to a new VG and the creating a RAID4/5 type volume.

Anyway, for good recovery chances you *need* physically different devices; otherwise, a catastrophic failure on your single device will eat all your data.

Regards.

Signature · 5 lines
Danti Gionatan
Supporto Tecnico
Assyoma S.r.l. - www.assyoma.it
email: [email protected] - [email protected]
GPG public key ID: FF5F32A8
#2 lore raw
In reply to Janne Heß
Quoted 3 lines · Janne He�

However some of my systems are single-disk systems. For those, RAIDs are not possible so I was thinking if LVM has some support for single-PV setups with parity on the same PV.

Hi,

We didn't include integrity+linear because we didn't see much value in it, since it would require going to backups in case of an integrity failure.

Quoted 4 lines

While this is probably a niche feature right now, I can see other projects like Stratis benefit from the integrity checks provided by dm-integrity (and dm-crypt in the future) to detect (and thanks to parity fix) bit rots.

dm-integrity will detect but not fix bit rot.

Quoted 3 lines

So is there any way to get a parity setup with the current state of LVM? I was thinking of a RAID-4 with one PV but the current tooling (more specifically lvcreate) doesn't let me do that.

It's not currently possible. We had an implementation for this we could bring back if there is enough interest, so we'd like to hear more about how this would be useful for you and others.

Thanks,
Dave

#3 lore raw

Il 2020-07-14 18:05 David Teigland ha scritto:

Quoted 11 lines · Janne Heß
Quoted 3 lines

However some of my systems are single-disk systems. For those, RAIDs are not possible so I was thinking if LVM has some support for single-PV setups with parity on the same PV.

Hi,

We didn't include integrity+linear because we didn't see much value in it, since it would require going to backups in case of an integrity failure.

dm-integrity will detect but not fix bit rot.

Hi, I really think error detection has value by itself. So I would suggest implementing it.

Quoted 8 lines
Quoted 4 lines

So is there any way to get a parity setup with the current state of LVM? I was thinking of a RAID-4 with one PV but the current tooling (more specifically lvcreate) doesn't let me do that.

It's not currently possible. We had an implementation for this we could bring back if there is enough interest, so we'd like to hear more about how this would be useful for you and others.

For this feature (parity+linear) I don't see much value: if a single physical devices fails hard, all bet of recovery are off. However having it can sometime be useful so, if implementing/maintenance cost are low, why not?

Thanks.

Signature · 5 lines
Danti Gionatan
Supporto Tecnico
Assyoma S.r.l. - www.assyoma.it
email: [email protected] - [email protected]
GPG public key ID: FF5F32A8
author
#4 lore raw
In reply to David Teigland

Hi,
Am Dienstag, 14. Juli 2020 18:05 CEST, schrieb David Teigland <[email protected]>:

Quoted 10 lines · Janne Heß
Quoted 3 lines

However some of my systems are single-disk systems. For those, RAIDs are not possible so I was thinking if LVM has some support for single-PV setups with parity on the same PV.

Hi,

We didn't include integrity+linear because we didn't see much value in it, since it would require going to backups in case of an integrity failure.

Quoted 6 lines
Quoted 4 lines

While this is probably a niche feature right now, I can see other projects like Stratis benefit from the integrity checks provided by dm-integrity (and dm-crypt in the future) to detect (and thanks to parity fix) bit rots.

dm-integrity will detect but not fix bit rot.

This is where I see a benefit from having some parity on the LVM level. With dm-integrity spotting bit-rots and reporting errors to LVM, LVM can recover the blocks with parity information.
This recovery procedure would give more feature parity to ZFS which I'm currently migrating from for a LVM-based solution.

Quoted 8 lines
Quoted 4 lines

So is there any way to get a parity setup with the current state of LVM? I was thinking of a RAID-4 with one PV but the current tooling (more specifically lvcreate) doesn't let me do that.

It's not currently possible. We had an implementation for this we could bring back if there is enough interest, so we'd like to hear more about how this would be useful for you and others.

I think this would be beneficial for a lot of users since it allows spotting and correcting bit-rots which is currently not possible other than using ZFS or RAID as far as I know.

Quoted 10 lines

Thanks,
Dave

_______________________________________________
linux-lvm mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/

Thanks,
Janne