RFC sg3_utils: udev rules: restrict use of ambiguous device IDs
Get series with b4
b4 am [email protected]Versions newest first
- v1 RFC Latest3 patches 2 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | 55-scsi-sg3_id.rules: don't set unreliable device ID by defaultscripts/ | +49 | 0 replies | |
| 2/3 | 58-scsi-sg3_symlink.rules: don't create extra by-id symlinks by defaultscripts/ | +41 | 0 replies | |
| 3/3 | udev: add 00-scsi-sg3_config.rules for user configurationMakefile.am scripts/ scripts/ +1 more | +27 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [dm-devel] [RFC PATCH 0/3] sg3_utils: udev rules: restrict use of ambiguous device IDs
From: Martin Wilck <[email protected]>
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.
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
Signature · 6 lines
2.39.2 -- dm-devel mailing list [email protected] https://listman.redhat.com/mailman/listinfo/dm-devel