From: Douglas Gilbert <dgilbert@interlog.com> To: mwilck@suse.com, Hannes Reinecke <hare@suse.de> Cc: "Martin K. Petersen" <martin.petersen@oracle.com>, James Bottomley <jejb@linux.vnet.ibm.com>, Franck Bui <fbui@suse.de>, dm-devel@redhat.com, linux-scsi@vger.kernel.org, Benjamin Marzinski <bmarzins@redhat.com> Subject: Re: [RFC PATCH 0/3] sg3_utils: udev rules: restrict use of ambiguous device IDs Date: Mon, 27 Mar 2023 19:58:34 -0400 [thread overview] Message-ID: <3f02a075-cc30-5584-704b-da88be1d6b31@interlog.com> (raw) In-Reply-To: <20230327132459.29531-1-mwilck@suse.com> On 2023-03-27 09:24, mwilck@suse.com wrote: > From: Martin Wilck <mwilck@suse.com> > > Most modern SCSI devices provide VPD page 83 with at least one highly > reliable device identifier, like NAA Registered Extended or EUI-64, or > the ata-id identifier. Other device identifier types have shown to be less > reliable and possibly ambiguous. Ambiguity in particular is a problem with > multipath-tools, which may group unrelated devices together in a multipath > map, causing possible data corruption. > > The device identifiers are used in two independent ways by the udev rules: > a) to set ID_SERIAL for subsystems like multipath, and b) to create > /dev/disk/by-id/scsi-... symlinks. Our udev rules have traditionally created > symlinks for every device identifier obtained from either VPD 83 or 80. This > may cause issues, especially on large installments with storage devices that > exhibit the same identifier for many logical units. At the same time, these > symlinks are rarely used. > > Avoid using unreliable identifiers for setting ID_SERIAL, and don't create > symlinks for these identifiers. Add a configuration method that allows > users to easily re-enable these methods and symlinks if they need to > (this might be the case on systems with legacy devices that are referenced > in /etc/crypttab, lvm.conf, or the like). This is done by introducing > environment variables .SCSI_ID_SERIAL_SRC and .SCSI_ID_SYMLINK_SRC, to > control use of device identifiers for determining ID_SERIAL and for creating > symlinks, respectively. Both variables can contain the letters "T", "L", "V", > and "S" to enable T10-vendor ID, NAA local ID, vendor-specific ID, and VPD 80 > based ID, respectively. > > Distributions can change the defaults for these environment variables > to provide backward compatibility for their users, while offering users > an easy way to change the settings. > > I'm sending this as RFC, because I expect that not everyone will agree > which identifiers should be enabled by default. Lets see if anything happens. Applied as sg3_utils revision 1019 and pushed to https://github.com/doug-gilbert/sg3_utils . Didn't see any effect on an Ubuntu 22.10 when sg3_utils deb package built and installed. No sign of 00-scsi-sg3_config.rules being placed anywhere by Ubuntu. Does Suse install those rules? Doug Gilbert > Martin Wilck (3): > 55-scsi-sg3_id.rules: don't set unreliable device ID by default > 58-scsi-sg3_symlink.rules: don't create extra by-id symlinks by > default > udev: add 00-scsi-sg3_config.rules for user configuration > > Makefile.am | 1 + > scripts/00-scsi-sg3_config.rules | 23 ++++++++++++++ > scripts/55-scsi-sg3_id.rules | 53 ++++++++++++++++++++++++++++--- > scripts/58-scsi-sg3_symlink.rules | 46 +++++++++++++++++++++------ > 4 files changed, 109 insertions(+), 14 deletions(-) > create mode 100644 scripts/00-scsi-sg3_config.rules >
WARNING: multiple messages have this Message-ID (diff)
From: Douglas Gilbert <dgilbert@interlog.com> To: mwilck@suse.com, Hannes Reinecke <hare@suse.de> Cc: James Bottomley <jejb@linux.vnet.ibm.com>, linux-scsi@vger.kernel.org, "Martin K. Petersen" <martin.petersen@oracle.com>, Franck Bui <fbui@suse.de>, dm-devel@redhat.com Subject: Re: [dm-devel] [RFC PATCH 0/3] sg3_utils: udev rules: restrict use of ambiguous device IDs Date: Mon, 27 Mar 2023 19:58:34 -0400 [thread overview] Message-ID: <3f02a075-cc30-5584-704b-da88be1d6b31@interlog.com> (raw) In-Reply-To: <20230327132459.29531-1-mwilck@suse.com> On 2023-03-27 09:24, mwilck@suse.com wrote: > From: Martin Wilck <mwilck@suse.com> > > Most modern SCSI devices provide VPD page 83 with at least one highly > reliable device identifier, like NAA Registered Extended or EUI-64, or > the ata-id identifier. Other device identifier types have shown to be less > reliable and possibly ambiguous. Ambiguity in particular is a problem with > multipath-tools, which may group unrelated devices together in a multipath > map, causing possible data corruption. > > The device identifiers are used in two independent ways by the udev rules: > a) to set ID_SERIAL for subsystems like multipath, and b) to create > /dev/disk/by-id/scsi-... symlinks. Our udev rules have traditionally created > symlinks for every device identifier obtained from either VPD 83 or 80. This > may cause issues, especially on large installments with storage devices that > exhibit the same identifier for many logical units. At the same time, these > symlinks are rarely used. > > Avoid using unreliable identifiers for setting ID_SERIAL, and don't create > symlinks for these identifiers. Add a configuration method that allows > users to easily re-enable these methods and symlinks if they need to > (this might be the case on systems with legacy devices that are referenced > in /etc/crypttab, lvm.conf, or the like). This is done by introducing > environment variables .SCSI_ID_SERIAL_SRC and .SCSI_ID_SYMLINK_SRC, to > control use of device identifiers for determining ID_SERIAL and for creating > symlinks, respectively. Both variables can contain the letters "T", "L", "V", > and "S" to enable T10-vendor ID, NAA local ID, vendor-specific ID, and VPD 80 > based ID, respectively. > > Distributions can change the defaults for these environment variables > to provide backward compatibility for their users, while offering users > an easy way to change the settings. > > I'm sending this as RFC, because I expect that not everyone will agree > which identifiers should be enabled by default. Lets see if anything happens. Applied as sg3_utils revision 1019 and pushed to https://github.com/doug-gilbert/sg3_utils . Didn't see any effect on an Ubuntu 22.10 when sg3_utils deb package built and installed. No sign of 00-scsi-sg3_config.rules being placed anywhere by Ubuntu. Does Suse install those rules? Doug Gilbert > Martin Wilck (3): > 55-scsi-sg3_id.rules: don't set unreliable device ID by default > 58-scsi-sg3_symlink.rules: don't create extra by-id symlinks by > default > udev: add 00-scsi-sg3_config.rules for user configuration > > Makefile.am | 1 + > scripts/00-scsi-sg3_config.rules | 23 ++++++++++++++ > scripts/55-scsi-sg3_id.rules | 53 ++++++++++++++++++++++++++++--- > scripts/58-scsi-sg3_symlink.rules | 46 +++++++++++++++++++++------ > 4 files changed, 109 insertions(+), 14 deletions(-) > create mode 100644 scripts/00-scsi-sg3_config.rules > -- dm-devel mailing list dm-devel@redhat.com https://listman.redhat.com/mailman/listinfo/dm-devel
next prev parent reply other threads:[~2023-03-27 23:58 UTC|newest] Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-03-27 13:24 [dm-devel] [RFC PATCH 0/3] sg3_utils: udev rules: restrict use of ambiguous device IDs mwilck 2023-03-27 13:24 ` mwilck 2023-03-27 13:24 ` [dm-devel] [PATCH 1/3] 55-scsi-sg3_id.rules: don't set unreliable device ID by default mwilck 2023-03-27 13:24 ` mwilck 2023-03-27 13:24 ` [dm-devel] [PATCH 2/3] 58-scsi-sg3_symlink.rules: don't create extra by-id symlinks " mwilck 2023-03-27 13:24 ` mwilck 2023-03-27 13:24 ` [dm-devel] [PATCH 3/3] udev: add 00-scsi-sg3_config.rules for user configuration mwilck 2023-03-27 13:24 ` mwilck 2023-03-27 23:58 ` Douglas Gilbert [this message] 2023-03-27 23:58 ` [dm-devel] [RFC PATCH 0/3] sg3_utils: udev rules: restrict use of ambiguous device IDs Douglas Gilbert 2023-03-28 7:52 ` Martin Wilck 2023-03-28 7:52 ` [dm-devel] " Martin Wilck
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=3f02a075-cc30-5584-704b-da88be1d6b31@interlog.com \ --to=dgilbert@interlog.com \ --cc=bmarzins@redhat.com \ --cc=dm-devel@redhat.com \ --cc=fbui@suse.de \ --cc=hare@suse.de \ --cc=jejb@linux.vnet.ibm.com \ --cc=linux-scsi@vger.kernel.org \ --cc=martin.petersen@oracle.com \ --cc=mwilck@suse.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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.