diff options
author | Ned A. Bass <bass6@zeno1.(none)> | 2012-04-20 17:32:30 -0700 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2012-06-01 08:55:14 -0700 |
commit | 821b683436423593a1f3ee597f40a61bd4569bdd (patch) | |
tree | a327afe3250cad9feae0ca1bdab8a16c9171b33d /etc/zfs | |
parent | e5b85622771090b7529cffdd38c0402a544609ef (diff) |
Add vdev_id for JBOD-friendly udev aliases
vdev_id parses the file /etc/zfs/vdev_id.conf to map a physical path
in a storage topology to a channel name. The channel name is combined
with a disk enclosure slot number to create an alias that reflects the
physical location of the drive. This is particularly helpful when it
comes to tasks like replacing failed drives. Slot numbers may also be
re-mapped in case the default numbering is unsatisfactory. The drive
aliases will be created as symbolic links in /dev/disk/by-vdev.
The only currently supported topologies are sas_direct and sas_switch:
o sas_direct - a channel is uniquely identified by a PCI slot and a
HBA port
o sas_switch - a channel is uniquely identified by a SAS switch port
A multipath mode is supported in which dm-mpath devices are handled by
examining the first running component disk, as reported by 'multipath
-l'. In multipath mode the configuration file should contain a
channel definition with the same name for each path to a given
enclosure.
vdev_id can replace the existing zpool_id script on systems where the
storage topology conforms to sas_direct or sas_switch. The script
could be extended to support other topologies as well. The advantage
of vdev_id is that it is driven by a single static input file that can
be shared across multiple nodes having a common storage toplogy.
zpool_id, on the other hand, requires a unique /etc/zfs/zdev.conf per
node and a separate slot-mapping file. However, zpool_id provides the
flexibility of using any device names that show up in
/dev/disk/by-path, so it may still be needed on some systems.
vdev_id's functionality subsumes that of the sas_switch_id script, and
it is unlikely that anyone is using it, so sas_switch_id is removed.
Finally, /dev/disk/by-vdev is added to the list of directories that
'zpool import' will scan.
Signed-off-by: Brian Behlendorf <[email protected]>
Closes #713
Diffstat (limited to 'etc/zfs')
-rw-r--r-- | etc/zfs/Makefile.am | 3 | ||||
-rw-r--r-- | etc/zfs/Makefile.in | 3 | ||||
-rw-r--r-- | etc/zfs/vdev_id.conf.multipath.example | 7 | ||||
-rw-r--r-- | etc/zfs/vdev_id.conf.sas_direct.example | 22 | ||||
-rw-r--r-- | etc/zfs/vdev_id.conf.sas_switch.example | 7 |
5 files changed, 42 insertions, 0 deletions
diff --git a/etc/zfs/Makefile.am b/etc/zfs/Makefile.am index 027c397e4..b1a1cf43c 100644 --- a/etc/zfs/Makefile.am +++ b/etc/zfs/Makefile.am @@ -1,6 +1,9 @@ pkgsysconfdir = $(sysconfdir)/zfs pkgsysconf_DATA = \ + vdev_id.conf.sas_direct.example \ + vdev_id.conf.sas_switch.example \ + vdev_id.conf.multipath.example \ zdev.conf \ zdev.conf.supermicro.example \ zdev.conf.dragon.example \ diff --git a/etc/zfs/Makefile.in b/etc/zfs/Makefile.in index 1d223d885..f2aef91c3 100644 --- a/etc/zfs/Makefile.in +++ b/etc/zfs/Makefile.in @@ -314,6 +314,9 @@ udevdir = @udevdir@ udevruledir = @udevruledir@ pkgsysconfdir = $(sysconfdir)/zfs pkgsysconf_DATA = \ + vdev_id.conf.sas_direct.example \ + vdev_id.conf.sas_switch.example \ + vdev_id.conf.multipath.example \ zdev.conf \ zdev.conf.supermicro.example \ zdev.conf.dragon.example \ diff --git a/etc/zfs/vdev_id.conf.multipath.example b/etc/zfs/vdev_id.conf.multipath.example new file mode 100644 index 000000000..c1359d37d --- /dev/null +++ b/etc/zfs/vdev_id.conf.multipath.example @@ -0,0 +1,7 @@ +multipath yes + +# PCI_ID HBA PORT CHANNEL NAME +channel 85:00.0 1 A +channel 85:00.0 0 B +channel 86:00.0 1 A +channel 86:00.0 0 B diff --git a/etc/zfs/vdev_id.conf.sas_direct.example b/etc/zfs/vdev_id.conf.sas_direct.example new file mode 100644 index 000000000..a0c43a78c --- /dev/null +++ b/etc/zfs/vdev_id.conf.sas_direct.example @@ -0,0 +1,22 @@ +multipath no +topology sas_direct +phys_per_port 4 + +# PCI_ID HBA PORT CHANNEL NAME +channel 85:00.0 1 A +channel 85:00.0 0 B +channel 86:00.0 1 C +channel 86:00.0 0 D + +# Linux Mapped +# Slot Slot +slot 1 7 +slot 2 10 +slot 3 3 +slot 4 6 +slot 5 2 +slot 6 8 +slot 7 1 +slot 8 4 +slot 9 9 +slot 10 5 diff --git a/etc/zfs/vdev_id.conf.sas_switch.example b/etc/zfs/vdev_id.conf.sas_switch.example new file mode 100644 index 000000000..b87d65527 --- /dev/null +++ b/etc/zfs/vdev_id.conf.sas_switch.example @@ -0,0 +1,7 @@ +topology sas_switch + +# SWITCH PORT CHANNEL NAME +channel 1 A +channel 2 B +channel 3 C +channel 4 D |