#!/bin/bash # # Direct-Attached Mode # -------------------- # Set BUSES and HOST_PORTS to match the topology of your system. As # each port is enumerated it will be assigned the next channel name. # The current script enumerates each port on a bus before moving on # to enumerate the next bus. # # Every distribution, version of udev, and type of attached storage # seems to result in slightly different formatting of the by-path # name. For this reason you may need to adjust the parsing below # to suit your needs. This is one of the reasons to use a custom # /etc/zfs/zdev.conf file, it allows the by-path naming convention # to change and still keep the simple naming. # # SAS-Switch Mode # ------------------------- # When the host accesses disk via SAS switches the combination of # bus and port number does not necessarily uniquely identify a # channel or disk drawer. In this case we must resort to other # means to infer the physical topology. For a single-level network # (i.e. no switch cascading) we can assign alphabetic channel labels # based on the switch port number that the drawer is connected to. # If support for more complex topologies is needed this script will # need to be customized or replaced. # # In SAS-Switch mode (enabled with "-g switch" ) we require that # udev has been configured to create per-disk symbolic links in # /dev/disk/by-id of the form #