diff options
author | Ned Bass <bass6@llnl.gov> | 2012-11-29 11:08:37 -0800 |
---|---|---|
committer | Brian Behlendorf <behlendorf1@llnl.gov> | 2012-12-03 14:04:47 -0800 |
commit | 2957f38d78d376431ab18d2f576099d682d7a711 (patch) | |
tree | a979091181389347a50da7a51a2e0431f8286799 /udev/rules.d | |
parent | e89260a1c8851ce05ea04b23606ba438b271d890 (diff) |
vdev_id support for device link aliases
Add a vdev_id feature to map device names based on already defined
udev device links. To increase the odds that vdev_id will run after
the rules it depends on, increase the vdev.rules rule number from 60
to 69. With this change, vdev_id now provides functionality analogous
to zpool_id and zpool_layout, paving the way to retire those tools.
A defined alias takes precedence over a topology-derived name, but the
two naming methods can otherwise coexist. For example, one might name
drives in a JBOD with the sas_direct topology while naming an internal
L2ARC device with an alias.
For example, the following lines in vdev_id.conf will result in the
creation of links /dev/disk/by-vdev/{d1,d2}, each pointing to the same
target as the device link specified in the third field.
# by-vdev
# name fully qualified or base name of device link
alias d1 /dev/disk/by-id/wwn-0x5000c5002de3b9ca
alias d2 wwn-0x5000c5002def789e
Also perform some minor vdev_id cleanup, such as removal of the unused
-s command line option.
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #981
Diffstat (limited to 'udev/rules.d')
-rw-r--r-- | udev/rules.d/69-vdev.rules.in (renamed from udev/rules.d/60-vdev.rules.in) | 2 | ||||
-rw-r--r-- | udev/rules.d/Makefile.am | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/udev/rules.d/60-vdev.rules.in b/udev/rules.d/69-vdev.rules.in index e47b5aa7c..5c2940af6 100644 --- a/udev/rules.d/60-vdev.rules.in +++ b/udev/rules.d/69-vdev.rules.in @@ -1,5 +1,5 @@ # -# @udevdir@/rules.d/60-vdev.rules +# @udevdir@/rules.d/69-vdev.rules # ENV{DEVTYPE}=="disk", IMPORT{program}="@udevdir@/vdev_id -d %k" diff --git a/udev/rules.d/Makefile.am b/udev/rules.d/Makefile.am index 586d76a5e..1ec83ac76 100644 --- a/udev/rules.d/Makefile.am +++ b/udev/rules.d/Makefile.am @@ -1,11 +1,11 @@ udevrule_DATA = \ - $(top_srcdir)/udev/rules.d/60-vdev.rules \ + $(top_srcdir)/udev/rules.d/69-vdev.rules \ $(top_srcdir)/udev/rules.d/60-zpool.rules \ $(top_srcdir)/udev/rules.d/60-zvol.rules \ $(top_srcdir)/udev/rules.d/90-zfs.rules EXTRA_DIST = \ - $(top_srcdir)/udev/rules.d/60-vdev.rules.in \ + $(top_srcdir)/udev/rules.d/69-vdev.rules.in \ $(top_srcdir)/udev/rules.d/60-zpool.rules.in \ $(top_srcdir)/udev/rules.d/60-zvol.rules.in \ $(top_srcdir)/udev/rules.d/90-zfs.rules.in |