0

If the Logical Volumne does not match the Physical Volume like in this picture, then I fear that the reliability drops.

If one PV crashes, several LV get broken.

lv-vg-pv-image

Is it (nevertheless) best practice to have a layout like in above picture?

guettli
  • 3,113
  • 14
  • 59
  • 110
  • If sdb, sdc, sdd and sde are on a RAID1,5,6 or similar, then it is considered normal practice. And yes, it is increasing the chances for data more loss when using multiple PVs. – Mircea Vutcovici Aug 15 '19 at 18:48

3 Answers3

3

I assume you aim at the fact that there is no 1:1 mapping between a physical device and a logical volume.

I would consider this very bad practice for this exact reason: One broken physical volume will kill multiple LVs.

Mitigate this by having some kind of RAID10/RAID6 (either software or hardware) as physical volume for LVM.

Note: Unless you are extra careful, LVM will not necessarily consider PV boundaries when creating LVs even in linear mode and when all LVs are exactly the size of one (or multiple) underlying PVs.

Sven
  • 97,248
  • 13
  • 177
  • 225
  • Thank you for your answer. This reads like "if unsure, don't use LVM". Here is a second question which asks "Why LVM?": https://serverfault.com/questions/978122/why-use-lvm-it-greates-more-borders-less-freedom – guettli Aug 06 '19 at 10:31
  • It is more: "If unsure, don't play with sensitive data". No mater whet you use you have the chance to make desastrous decisions. Like you think you have redundancy with a RAID controller, but you configure RAID0. – Mircea Vutcovici Aug 15 '19 at 18:46
1

Use cases exist for LVs that span PVs. Perhaps a single disk cannot provide the IOPS or capacity you need in a single volume. For example, the quotas on block devices in the cloud.

These situations tend to be exceptional. Many storage systems can provide all your needs out of one LUN. A LV that fits in one PV is the simple case and should be used if possible.

All PVs need to be in place to bring the VG online. Physical disk redundancy tends to be at a lower level, some array with RAID-style redundancy is carved up into LUNs which form your PVs.

Also, I would not bother with partitioning PVs, just adds extra steps. Use the entire disks, /dev/sd[b-e].

Regarding LV /dev/fileserver/backup, I don't consider that a "backup" as it is on the original disks. A temporary snapshot that is sent to separate protection storage, sure that makes sense.

John Mahowald
  • 30,009
  • 1
  • 17
  • 32
0

any single physical volume is ALWAYS a single point of failure, the scenario does not matter. you're relying solely on that physical disk, it breaks, disaster ensues, it has nothing to do with LVM

Sum1sAdmin
  • 1,914
  • 1
  • 11
  • 20