Add vdev_id for JBOD-friendly udev aliases
[zfs.git] / man / man8 / vdev_id.8
1 .TH vdev_id 8
2 .SH NAME
3 vdev_id \- generate user-friendly names for JBOD disks
4 .SH SYNOPSIS
5 .LP
6 .nf
7 \fBvdev_id\fR <-d dev> [-c config_file] [-g sas_direct|sas_switch]
8                  [-m] [-p phys_per_port]
9 \fBvdev_id\fR -h
10 .fi
11 .SH DESCRIPTION
12 The \fBvdev_id\fR command is a udev helper which parses the file
13 .BR /etc/zfs/vdev_id.conf (5)
14 to map a physical path in a storage topology to a channel name.  The
15 channel name is combined with a disk enclosure slot number to create an
16 alias that reflects the physical location of the drive.  This is
17 particularly helpful when it comes to tasks like replacing failed
18 drives.  Slot numbers may also be re-mapped in case the default
19 numbering is unsatisfactory.  The drive aliases will be created as
20 symbolic links in /dev/disk/by-vdev.
21
22 The only currently supported topologies are sas_direct and
23 sas_switch.  A multipath mode is supported in which dm-mpath
24 devices are handled by examining the first-listed running
25 component disk as reported by the
26 .BR multipath (8)
27 command.  In multipath mode the configuration file should contain a
28 channel definition with the same name for each path to a given
29 enclosure.
30
31 .SH OPTIONS
32 .TP
33 \fB\-c\fR <config_file>
34 Specifies the path to an alternate configuration file.  The default is
35 /etc/zfs/vdev_id.conf.
36 .TP
37 \fB\-d\fR <device>
38 This is the only mandatory argument.  Specifies the name of a device
39 in /dev, i.e. "sda".
40 .TP
41 \fB\-g\fR <sas_direct|sas_switch>
42 Identifies a physical topology that governs how physical paths are
43 mapped to channels.
44
45 \fIsas_direct\fR - in this mode a channel is uniquely identified by
46 a PCI slot and a HBA port number
47
48 \fIsas_switch\fR - in this mode a channel is uniquely identified by
49 a SAS switch port number
50 .TP
51 \fB\-m\fR
52 Specifies that
53 .BR vdev_id (8)
54 will handle only dm-multipath devices.  If set to "yes" then
55 .BR vdev_id (8)
56 will examine the first running component disk of a dm-multipath
57 device as listed by the
58 .BR multipath (8)
59 command to determine the physical path.
60 .TP
61 \fB\-p\fR <phys_per_port>
62 Specifies the number of PHY devices 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 .TP
68 \fB\-h\fR
69 Print a usage summary.
70 .SH SEE ALSO
71 .LP
72 \fBvdev_id.conf\fR(5)