Bug 1967165

Summary: Removed .ID_FS_TYPE_NEW UDev property used by LVM DBus
Product: [Community] LVM and device-mapper Reporter: Vojtech Trefny <vtrefny>
Component: lvm2Assignee: LVM and device-mapper development team <lvm-team>
lvm2 sub component: Udev QA Contact: cluster-qe <cluster-qe>
Status: CLOSED NEXTRELEASE Docs Contact:
Severity: unspecified    
Priority: unspecified CC: agk, heinzm, jbrassow, msnitzer, prajnoha, teigland, zkabelac
Version: unspecifiedFlags: pm-rhel: lvm-technical-solution?
pm-rhel: lvm-test-coverage?
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-06-02 16:46:16 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
proposed fix none

Description Vojtech Trefny 2021-06-02 14:24:06 UTC
2.0.32 removed the 69-dm-lvm-metad.rules UDev rules file. The ".ID_FS_TYPE_NEW" UDev property is set in there. This property is used in lvmdbusd to detect LVM PV format remove with external tools like wipefs:

https://sourceware.org/git/?p=lvm2.git;a=blob;f=daemons/lvmdbusd/udevwatch.py;h=b53b18003ee04619bf25be3231be949aac125a5e;hb=HEAD#l50

Comment 1 David Teigland 2021-06-02 14:47:53 UTC
This is the part of the old udev rule.  I don't have the best grasp of the logic here, but isn't .ID_FS_TYPE_NEW simply the same as ID_FS_TYPE?  If so then the lvmdbus code could change to look at ID_FS_TYPE.


# Detect removed PV label by comparing previous ID_FS_TYPE value with current one.
ENV{.ID_FS_TYPE_NEW}="$env{ID_FS_TYPE}"
IMPORT{db}="ID_FS_TYPE"
ENV{ID_FS_TYPE}=="LVM2_member|LVM1_member", ENV{.ID_FS_TYPE_NEW}!="LVM2_member|LVM1_member", ENV{LVM_PV_GONE}="1"
ENV{ID_FS_TYPE}="$env{.ID_FS_TYPE_NEW}"
ENV{LVM_PV_GONE}=="1", GOTO="lvm_scan"

Comment 2 Vojtech Trefny 2021-06-02 15:24:03 UTC
You are right, not sure why I missed this, ID_FS_TYPE and .ID_FS_TYPE_NEW are indeed the same. I tested it with ID_FS_TYPE and everything seems to be working fine.

Comment 3 Vojtech Trefny 2021-06-02 15:24:35 UTC
Created attachment 1788723 [details]
proposed fix

Comment 4 David Teigland 2021-06-02 16:46:16 UTC
Thanks, pushed to dev-next branch.

(https://sourceware.org/git/?p=lvm2.git;a=commit;h=2801b7a9b2faf08183685a79ec1dcee42d333541 will disappear when dev-next is rebased.)