Add vdev_id for JBOD-friendly udev aliases
[zfs.git] / man / man5 / vdev_id.conf.5
1 .TH vdev_id.conf 5
2 .SH NAME
3 vdev_id.conf \- Configuration file for vdev_id
4 .SH DESCRIPTION
5 .I vdev_id.conf
6 is the configuration file for
7 .BR vdev_id (8).
8 It controls the default behavior of
9 .BR vdev_id (8)
10 while it is mapping a disk device name to an alias.
11 .PP
12 The
13 .I vdev_id.conf
14 file uses a simple format consisting of a keyword followed by one or
15 more values on a single line.  Any line not beginning with a recognized
16 keyword is ignored.  Comments may optionally begin with a hash
17 character.
18
19 The following keywords and values are used.
20 .TP
21 \fIchannel\fR [pci_slot] <port> <name>
22 Maps a physical path to a channel name (typically representing a single
23 disk enclosure).
24
25 \fIpci_slot\fR - specifies the PCI SLOT of the HBA
26 hosting the disk enclosure being mapped, as found in the output of
27 .BR lspci (8).
28 This argument is not used in sas_switch mode.
29
30 \fIport\fR - specifies the numeric identifier of the HBA or SAS switch port
31 connected to the disk enclosure being mapped.
32
33 \fIname\fR - specifies the name of the channel.
34
35 .TP
36 \fIslot\fR <old> <new>
37 Maps a disk slot number as reported by the operating system
38 to an alternative slot number.
39 .TP
40 \fImultipath\fR <yes|no>
41 Specifies whether
42 .BR vdev_id (8)
43 will handle only dm-multipath devices.  If set to "yes" then
44 .BR vdev_id (8)
45 will examine the first running component disk of a dm-multipath
46 device as listed by the
47 .BR multipath (8)
48 command to determine the physical path.
49 .TP
50 \fItopology\fR <sas_direct|sas_switch>
51 Identifies a physical topology that governs how physical paths are
52 mapped to channels.
53
54 \fIsas_direct\fR - in this mode a channel is uniquely identified by
55 a PCI slot and a HBA port number
56
57 \fIsas_switch\fR - in this mode a channel is uniquely identified by
58 a SAS switch port number
59
60 .TP
61 \fIphys_per_port\fR <num>
62 Specifies the number of PHY devices are associated with a SAS HBA port or SAS
63 switch port.
64 .BR vdev_id (8)
65 internally uses this value to determine which HBA or switch port a
66 device is connected to.  The default is 4.
67 .SH EXAMPLES
68 A non-multipath configuration with direct-attached SAS enclosures and an
69 arbitrary slot re-mapping.
70 .P
71         multipath     no
72 .br
73         topology      sas_direct
74 .br
75         phys_per_port 4
76 .br
77
78 .br
79         #       PCI_SLOT HBA PORT  CHANNEL NAME
80 .br
81         channel 85:00.0  1         A
82 .br
83         channel 85:00.0  0         B
84 .br
85         channel 86:00.0  1         C
86 .br
87         channel 86:00.0  0         D
88 .br
89
90 .br
91         #    Linux      Mapped
92 .br
93         #    Slot       Slot
94 .br
95         slot 1          7
96 .br
97         slot 2          10
98 .br
99         slot 3          3
100 .br
101         slot 4          6
102 .br
103         slot 5          2
104 .br
105         slot 6          8
106 .br
107         slot 7          1
108 .br
109         slot 8          4
110 .br
111         slot 9          9
112 .br
113         slot 10         5
114 .br
115 .P
116 A SAS-switch topology.  Note that the
117 .I channel
118 keyword takes only two arguments in this example.
119 .P
120         topology      sas_switch
121 .br
122
123 .br
124         #       SWITCH PORT  CHANNEL NAME
125 .br
126         channel 1            A
127 .br
128         channel 2            B
129 .br
130         channel 3            C
131 .br
132         channel 4            D
133 .br
134 .P
135 A multipath configuration.  Note that channel names have multiple
136 definitions - one per physical path.
137 .P
138         multipath yes
139 .br
140
141 .br
142         #       PCI_SLOT HBA PORT  CHANNEL NAME
143 .br
144         channel 85:00.0  1         A
145 .br
146         channel 85:00.0  0         B
147 .br
148         channel 86:00.0  1         A
149 .br
150         channel 86:00.0  0         B
151 .br
152 .P
153
154 .SH FILES
155 .TP
156 .I /etc/zfs/vdev_id.conf
157 The configuration file for
158 .BR vdev_id (8).
159 .SH SEE ALSO
160 .BR vdev_id (8)