]> git.proxmox.com Git - mirror_zfs-debian.git/blame - man/man5/vdev_id.conf.5
Imported Upstream version 0.6.2+git20140204
[mirror_zfs-debian.git] / man / man5 / vdev_id.conf.5
CommitLineData
821b6834
NB
1.TH vdev_id.conf 5
2.SH NAME
3vdev_id.conf \- Configuration file for vdev_id
4.SH DESCRIPTION
5.I vdev_id.conf
6is the configuration file for
7.BR vdev_id (8).
8It controls the default behavior of
9.BR vdev_id (8)
10while it is mapping a disk device name to an alias.
11.PP
12The
13.I vdev_id.conf
14file uses a simple format consisting of a keyword followed by one or
15more values on a single line. Any line not beginning with a recognized
16keyword is ignored. Comments may optionally begin with a hash
17character.
18
19The following keywords and values are used.
2957f38d
NB
20.TP
21\fIalias\fR <name> <devlink>
22Maps a device link in the /dev directory hierarchy to a new device
23name. The udev rule defining the device link must have run prior to
24.BR vdev_id (8).
25A defined alias takes precedence over a topology-derived name, but the
26two naming methods can otherwise coexist. For example, one might name
27drives in a JBOD with the sas_direct topology while naming an internal
28L2ARC device with an alias.
29
30\fIname\fR - the name of the link to the device that will by created in
31/dev/disk/by-vdev.
32
33\fIdevlink\fR - the name of the device link that has already been
34defined by udev. This may be an absolute path or the base filename.
35
821b6834
NB
36.TP
37\fIchannel\fR [pci_slot] <port> <name>
38Maps a physical path to a channel name (typically representing a single
39disk enclosure).
40
41\fIpci_slot\fR - specifies the PCI SLOT of the HBA
42hosting the disk enclosure being mapped, as found in the output of
43.BR lspci (8).
44This argument is not used in sas_switch mode.
45
46\fIport\fR - specifies the numeric identifier of the HBA or SAS switch port
47connected to the disk enclosure being mapped.
48
49\fIname\fR - specifies the name of the channel.
50
51.TP
a08ee875
LG
52\fIslot\fR <old> <new> [channel]
53Maps a disk slot number as reported by the operating system to an
54alternative slot number. If the \fIchannel\fR parameter is specified
55then the mapping is only applied to slots in the named channel,
56otherwise the mapping is applied to all channels. The first-specified
57\fIslot\fR rule that can match a slot takes precedence. Therefore a
58channel-specific mapping for a given slot should generally appear before
59a generic mapping for the same slot. In this way a custom mapping may
60be applied to a particular channel and a default mapping applied to the
61others.
62
821b6834
NB
63.TP
64\fImultipath\fR <yes|no>
65Specifies whether
66.BR vdev_id (8)
67will handle only dm-multipath devices. If set to "yes" then
68.BR vdev_id (8)
69will examine the first running component disk of a dm-multipath
70device as listed by the
71.BR multipath (8)
72command to determine the physical path.
73.TP
74\fItopology\fR <sas_direct|sas_switch>
75Identifies a physical topology that governs how physical paths are
76mapped to channels.
77
78\fIsas_direct\fR - in this mode a channel is uniquely identified by
79a PCI slot and a HBA port number
80
81\fIsas_switch\fR - in this mode a channel is uniquely identified by
82a SAS switch port number
83
84.TP
85\fIphys_per_port\fR <num>
2957f38d 86Specifies the number of PHY devices associated with a SAS HBA port or SAS
821b6834
NB
87switch port.
88.BR vdev_id (8)
89internally uses this value to determine which HBA or switch port a
90device is connected to. The default is 4.
91.SH EXAMPLES
92A non-multipath configuration with direct-attached SAS enclosures and an
93arbitrary slot re-mapping.
94.P
a08ee875 95.nf
821b6834 96 multipath no
821b6834 97 topology sas_direct
821b6834 98 phys_per_port 4
821b6834 99
821b6834 100 # PCI_SLOT HBA PORT CHANNEL NAME
821b6834 101 channel 85:00.0 1 A
821b6834 102 channel 85:00.0 0 B
821b6834 103 channel 86:00.0 1 C
821b6834 104 channel 86:00.0 0 D
821b6834 105
a08ee875
LG
106 # Custom mapping for Channel A
107
821b6834 108 # Linux Mapped
a08ee875
LG
109 # Slot Slot Channel
110 slot 1 7 A
111 slot 2 10 A
112 slot 3 3 A
113 slot 4 6 A
114
115 # Default mapping for B, C, and D
116
117 slot 1 4
118 slot 2 2
119 slot 3 1
120 slot 4 3
121.fi
821b6834
NB
122.P
123A SAS-switch topology. Note that the
124.I channel
125keyword takes only two arguments in this example.
126.P
a08ee875 127.nf
821b6834 128 topology sas_switch
821b6834 129
821b6834 130 # SWITCH PORT CHANNEL NAME
821b6834 131 channel 1 A
821b6834 132 channel 2 B
821b6834 133 channel 3 C
821b6834 134 channel 4 D
a08ee875 135.fi
821b6834
NB
136.P
137A multipath configuration. Note that channel names have multiple
138definitions - one per physical path.
139.P
a08ee875 140.nf
821b6834 141 multipath yes
821b6834 142
821b6834 143 # PCI_SLOT HBA PORT CHANNEL NAME
821b6834 144 channel 85:00.0 1 A
821b6834 145 channel 85:00.0 0 B
821b6834 146 channel 86:00.0 1 A
821b6834 147 channel 86:00.0 0 B
a08ee875 148.fi
821b6834 149.P
2957f38d
NB
150A configuration using device link aliases.
151.P
a08ee875 152.nf
2957f38d 153 # by-vdev
2957f38d 154 # name fully qualified or base name of device link
2957f38d 155 alias d1 /dev/disk/by-id/wwn-0x5000c5002de3b9ca
2957f38d 156 alias d2 wwn-0x5000c5002def789e
a08ee875 157.fi
2957f38d 158.P
821b6834
NB
159
160.SH FILES
161.TP
162.I /etc/zfs/vdev_id.conf
163The configuration file for
164.BR vdev_id (8).
165.SH SEE ALSO
166.BR vdev_id (8)