Bug 1967165 - Removed .ID_FS_TYPE_NEW UDev property used by LVM DBus
Summary: Removed .ID_FS_TYPE_NEW UDev property used by LVM DBus
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: LVM and device-mapper
Classification: Community
Component: lvm2
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: LVM and device-mapper development team
QA Contact: cluster-qe@redhat.com
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-06-02 14:24 UTC by Vojtech Trefny
Modified: 2021-06-02 16:46 UTC (History)
7 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2021-06-02 16:46:16 UTC
Embargoed:
pm-rhel: lvm-technical-solution?
pm-rhel: lvm-test-coverage?


Attachments (Terms of Use)
proposed fix (975 bytes, application/mbox)
2021-06-02 15:24 UTC, Vojtech Trefny
no flags Details

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.)


Note You need to log in before you can comment on or make changes to this bug.