Switch to using lvs to identify active LVM LVs (#160787)
Previously used "dmsetup info" to directly list device-mapper mapping names in the kernel to identify active Logical Volumes. However GParted failed to recognise active LVs if the VGNAME contains any hyphens (-). This is because LVM encodes hyphens as double hyphens in the mapping name. To avoid having to duplicate the LVM hyphen encoding in GParted, switch to using "lvm lvs" to list LVs. # dmsetup info --columns --noheadings --separator , -o name GParted_VG1-lvol_00 GParted--VG2-lvol--00 # lvm lvs --noheadings --separator , -o lv_name,vg_name,lv_attr lvol_00,GParted_VG1,-wi-a- lvol-00,GParted-VG2,-wi-a- lvol-01,GParted-VG3,-wi--- .^. (-) not active, (a) or any other character considered active. Reference lvs(8). Bug #160787 - lvm support
parent
72ac7120
Please register or sign in to comment