linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
From: Demi Marie Obenour <demi@invisiblethingslab.com>
To: LVM general discussion and development <linux-lvm@redhat.com>
Cc: "Marek Marczykowski-Górecki" <marmarek@invisiblethingslab.com>
Subject: [linux-lvm] [PATCH 2/3] Disable lvm2 udev rules if `dmsetup splitname` fails
Date: Mon, 4 Apr 2022 18:02:23 -0400	[thread overview]
Message-ID: <Yktq8dapJmOv8suO@itl-email> (raw)
In-Reply-To: <YktogFA9Lidvo6qa@itl-email>


[-- Attachment #1.1: Type: text/plain, Size: 967 bytes --]

If the output of `dmsetup splitname` cannot be trusted, the safest
option is to disable all lvm2 rules.
---
 udev/11-dm-lvm.rules.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/udev/11-dm-lvm.rules.in b/udev/11-dm-lvm.rules.in
index 7c58994..f7066b7 100644
--- a/udev/11-dm-lvm.rules.in
+++ b/udev/11-dm-lvm.rules.in
@@ -18,7 +18,7 @@ ENV{DM_UDEV_RULES_VSN}!="?*", GOTO="lvm_end"
 ENV{DM_UUID}!="LVM-?*", GOTO="lvm_end"
 
 # Use DM name and split it up into its VG/LV/layer constituents.
-IMPORT{program}="(DM_EXEC)/dmsetup splitname --nameprefixes --noheadings --rows $env{DM_NAME}"
+IMPORT{program}!="(DM_EXEC)/dmsetup splitname --nameprefixes --noheadings --rows $env{DM_NAME}", GOTO="lvm_disable"
 
 # DM_SUBSYSTEM_UDEV_FLAG0 is the 'NOSCAN' flag for LVM subsystem.
 # This flag is used to temporarily disable selected rules to prevent any
-- 
Sincerely,
Demi Marie Obenour (she/her/hers)
Invisible Things Lab




[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

[-- Attachment #2: Type: text/plain, Size: 202 bytes --]

_______________________________________________
linux-lvm mailing list
linux-lvm@redhat.com
https://listman.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/

  parent reply	other threads:[~2022-04-04 22:03 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-04 21:51 [linux-lvm] [PATCH 0/3] Make udev rules more robust Demi Marie Obenour
2022-04-04 21:56 ` [linux-lvm] [PATCH 3/3] Disable udev rules if udev flags can't be obtained Demi Marie Obenour
2022-04-04 21:58 ` [linux-lvm] [PATCH 1/3] dmsetup: return non-zero on stdio I/O error Demi Marie Obenour
2022-04-04 22:02 ` Demi Marie Obenour [this message]
2022-04-04 21:55 [linux-lvm] [PATCH 2/3] Disable lvm2 udev rules if `dmsetup splitname` fails Demi Marie Obenour

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Yktq8dapJmOv8suO@itl-email \
    --to=demi@invisiblethingslab.com \
    --cc=linux-lvm@redhat.com \
    --cc=marmarek@invisiblethingslab.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).