lvconvert fails to repair LVM RAID volume when RAID SubLVs span multiple PVs
Issue
-
An attempt to use lvconvert --repair in order to repair an LVM RAID volume fails with "Insufficitent free space", even though the replacement disk is as big as the failed one.
# lvconvert --repair vgraid/raid5lv WARNING: Couldn't find device with uuid aaaaaa-aaaa-aaaa-aaaa-aaaa-aaaa-aaaaaa. WARNING: VG vgraid is missing PV aaaaaa-aaaa-aaaa-aaaa-aaaa-aaaa-aaaaaa (last written to [unknown]). WARNING: Couldn't find device with uuid aaaaaa-aaaa-aaaa-aaaa-aaaa-aaaa-aaaaaa. Attempt to replace failed RAID images (requires full device resync)? [y/n]: y Insufficient free space: 4993 extents needed, but only 2687 available Failed to replace faulty devices in vgraid/raid5lv. -
LVM requires more disk space to repair a raid volume, compared to the size of the PV that failed and needs replacement.
Environment
- Red Hat Enterprise Linux 8
-
LVM RAID LVs, in which, raid SubLVs use multiple PVs, such as the following example:
# lvs -a -olv_name,vg_name,attr,devices vgraid LV VG Attr Devices raid5lv vgraid rwi-a-r--- raid5lv_rimage_0(0),raid5lv_rimage_1(0),raid5lv_rimage_2(0) [raid5lv_rimage_0] vgraid iwi-aor--- /dev/sdb(1) [raid5lv_rimage_0] vgraid iwi-aor--- /dev/sde(0) [raid5lv_rimage_1] vgraid iwi-aor--- /dev/sdc(1) [raid5lv_rimage_1] vgraid iwi-aor--- /dev/sdf(0) [raid5lv_rimage_2] vgraid iwi-aor--- /dev/sdd(1) [raid5lv_rimage_2] vgraid iwi-aor--- /dev/sdg(0) [raid5lv_rmeta_0] vgraid ewi-aor--- /dev/sdb(0) [raid5lv_rmeta_1] vgraid ewi-aor--- /dev/sdc(0) [raid5lv_rmeta_2] vgraid ewi-aor--- /dev/sdd(0)e.g. raid5lv_rimage_1 is built on top of 2 PVs: sdc and sdf
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.