> On Dec 17, 2024, at 16:34, Heming Zhao <[email protected]> wrote: > > Hi LVM2 maintainers, > > One of SUSE's customers encountered an issue with LVM2. The user created > several partitions, one of which was marked as "BIOS boot" (4) instead of > "LINUX LVM" (8E). Subsequently, the user ran pvcreate/vgcreate/lvcreate on > this partition. During a system update, grub2-install installed GRUB2 in the > "BIOS boot" partition, resulting in LVM2 metadata corruption. > > The root cause of this issue is that grub2-install targets the "BIOS boot" > partition when this lvm2 device is specified for installation. If the user > had initially marked the partition as "LINUX LVM", grub2-install would not > have chosen this partition. > > On the other hand, it would be beneficial if LVM2 could implement a new > filter or a filter function to detect and exclude the "BIOS boot" partition > from being considered a valid target for LVM2 device creation. This could > involve issuing a warning or error message to alert the user of the potential > conflict. This may also help user to notice the issue more easily. > > Best regards, > Heming
Also Cc [email protected] and [email protected] as it’s not an issue with lvm but also other fs progs. It would be great if we can enhance libblkid to avoid data loss even caused by user mistakes. — Su
