xref: /freebsd/sys/contrib/openzfs/man/man8/vdev_id.8 (revision 1603881667360c015f6685131f2f25474fa67a72)
1*16038816SMartin Matuska.\"
2*16038816SMartin Matuska.\" This file and its contents are supplied under the terms of the
3*16038816SMartin Matuska.\" Common Development and Distribution License ("CDDL"), version 1.0.
4*16038816SMartin Matuska.\" You may only use this file in accordance with the terms of version
5*16038816SMartin Matuska.\" 1.0 of the CDDL.
6*16038816SMartin Matuska.\"
7*16038816SMartin Matuska.\" A full copy of the text of the CDDL should have accompanied this
8*16038816SMartin Matuska.\" source.  A copy of the CDDL is also available via the Internet at
9*16038816SMartin Matuska.\" http://www.illumos.org/license/CDDL.
10*16038816SMartin Matuska.\"
11*16038816SMartin Matuska.Dd May 26, 2021
12*16038816SMartin Matuska.Dt VDEV_ID 8
13*16038816SMartin Matuska.Os
14*16038816SMartin Matuska.
15*16038816SMartin Matuska.Sh NAME
16*16038816SMartin Matuska.Nm vdev_id
17*16038816SMartin Matuska.Nd generate user-friendly names for JBOD disks
18*16038816SMartin Matuska.Sh SYNOPSIS
19*16038816SMartin Matuska.Nm
20*16038816SMartin Matuska.Fl d Ar dev
21*16038816SMartin Matuska.Fl c Ar config_file
22*16038816SMartin Matuska.Fl g Sy sas_direct Ns | Ns Sy sas_switch Ns | Ns Sy scsi
23*16038816SMartin Matuska.Fl m
24*16038816SMartin Matuska.Fl p Ar phys_per_port
25*16038816SMartin Matuska.
26*16038816SMartin Matuska.Sh DESCRIPTION
27*16038816SMartin Matuska.Nm
28*16038816SMartin Matuskais an udev helper which parses
29*16038816SMartin Matuska.Xr vdev_id.conf 5
30*16038816SMartin Matuskato map a physical path in a storage topology to a channel name.
31*16038816SMartin MatuskaThe channel name is combined with a disk enclosure slot number to create
32*16038816SMartin Matuskaan alias that reflects the physical location of the drive.
33*16038816SMartin MatuskaThis is particularly helpful when it comes to tasks like replacing failed drives.
34*16038816SMartin MatuskaSlot numbers may also be remapped in case the default numbering is unsatisfactory.
35*16038816SMartin MatuskaThe drive aliases will be created as symbolic links in
36*16038816SMartin Matuska.Pa /dev/disk/by-vdev .
37*16038816SMartin Matuska.Pp
38*16038816SMartin MatuskaThe currently supported topologies are
39*16038816SMartin Matuska.Sy sas_direct ,
40*16038816SMartin Matuska.Sy sas_switch ,
41*16038816SMartin Matuskaand
42*16038816SMartin Matuska.Sy scsi .
43*16038816SMartin MatuskaA multipath mode is supported in which dm-mpath devices are handled by
44*16038816SMartin Matuskaexamining the first running component disk as reported by the driver.
45*16038816SMartin MatuskaIn multipath mode the configuration file should contain a
46eda14cbcSMatt Macychannel definition with the same name for each path to a given
47eda14cbcSMatt Macyenclosure.
48*16038816SMartin Matuska.Pp
49*16038816SMartin Matuska.Nm
50eda14cbcSMatt Macyalso supports creating aliases based on existing udev links in the /dev
51*16038816SMartin Matuskahierarchy using the
52*16038816SMartin Matuska.Sy alias
53*16038816SMartin Matuskaconfiguration file keyword.
54*16038816SMartin MatuskaSee
55*16038816SMartin Matuska.Xr vdev_id.conf 5
56*16038816SMartin Matuskafor details.
57*16038816SMartin Matuska.
58*16038816SMartin Matuska.Sh OPTIONS
59*16038816SMartin Matuska.Bl -tag -width "-m"
60*16038816SMartin Matuska.It Fl d Ar device
61*16038816SMartin MatuskaThe device node to classify, like
62*16038816SMartin Matuska.Pa /dev/sda .
63*16038816SMartin Matuska.It Fl c Ar config_file
64*16038816SMartin MatuskaSpecifies the path to an alternate configuration file.
65*16038816SMartin MatuskaThe default is
66*16038816SMartin Matuska.Pa /etc/zfs/vdev_id.conf .
67*16038816SMartin Matuska.It Fl g Sy sas_direct Ns | Ns Sy sas_switch Ns | Ns Sy scsi
68eda14cbcSMatt MacyIdentifies a physical topology that governs how physical paths are
69*16038816SMartin Matuskamapped to channels:
70*16038816SMartin Matuska.Bl -tag -compact -width "sas_direct and scsi"
71*16038816SMartin Matuska.It Sy sas_direct No and Sy scsi
72*16038816SMartin Matuskachannels are uniquely identified by a PCI slot and HBA port number
73*16038816SMartin Matuska.It Sy sas_switch
74*16038816SMartin Matuskachannels are uniquely identified by a SAS switch port number
75*16038816SMartin Matuska.El
76*16038816SMartin Matuska.It Fl m
77*16038816SMartin MatuskaOnly handle dm-multipath devices.
78*16038816SMartin MatuskaIf specified, examine the first running component disk of a dm-multipath
79*16038816SMartin Matuskadevice as provided by the driver to determine the physical path.
80*16038816SMartin Matuska.It Fl p Ar phys_per_port
81eda14cbcSMatt MacySpecifies the number of PHY devices associated with a SAS HBA port or SAS
82eda14cbcSMatt Macyswitch port.
83*16038816SMartin Matuska.Nm
84eda14cbcSMatt Macyinternally uses this value to determine which HBA or switch port a
85*16038816SMartin Matuskadevice is connected to.
86*16038816SMartin MatuskaThe default is
87*16038816SMartin Matuska.Sy 4 .
88*16038816SMartin Matuska.It Fl h
89eda14cbcSMatt MacyPrint a usage summary.
90*16038816SMartin Matuska.El
91*16038816SMartin Matuska.
92*16038816SMartin Matuska.Sh SEE ALSO
93*16038816SMartin Matuska.Xr vdev_id.conf 5
94