xref: /freebsd-src/sys/contrib/openzfs/man/man8/vdev_id.8 (revision bb2d13b686e3ccf6c3ccb36209dfb7dcc108b182)
116038816SMartin Matuska.\"
216038816SMartin Matuska.\" This file and its contents are supplied under the terms of the
316038816SMartin Matuska.\" Common Development and Distribution License ("CDDL"), version 1.0.
416038816SMartin Matuska.\" You may only use this file in accordance with the terms of version
516038816SMartin Matuska.\" 1.0 of the CDDL.
616038816SMartin Matuska.\"
716038816SMartin Matuska.\" A full copy of the text of the CDDL should have accompanied this
816038816SMartin Matuska.\" source.  A copy of the CDDL is also available via the Internet at
916038816SMartin Matuska.\" http://www.illumos.org/license/CDDL.
1016038816SMartin Matuska.\"
1116038816SMartin Matuska.Dd May 26, 2021
1216038816SMartin Matuska.Dt VDEV_ID 8
1316038816SMartin Matuska.Os
1416038816SMartin Matuska.
1516038816SMartin Matuska.Sh NAME
1616038816SMartin Matuska.Nm vdev_id
1716038816SMartin Matuska.Nd generate user-friendly names for JBOD disks
1816038816SMartin Matuska.Sh SYNOPSIS
1916038816SMartin Matuska.Nm
2016038816SMartin Matuska.Fl d Ar dev
2116038816SMartin Matuska.Fl c Ar config_file
2216038816SMartin Matuska.Fl g Sy sas_direct Ns | Ns Sy sas_switch Ns | Ns Sy scsi
2316038816SMartin Matuska.Fl m
2416038816SMartin Matuska.Fl p Ar phys_per_port
2516038816SMartin Matuska.
2616038816SMartin Matuska.Sh DESCRIPTION
2716038816SMartin Matuska.Nm
2816038816SMartin Matuskais an udev helper which parses
2916038816SMartin Matuska.Xr vdev_id.conf 5
3016038816SMartin Matuskato map a physical path in a storage topology to a channel name.
3116038816SMartin MatuskaThe channel name is combined with a disk enclosure slot number to create
3216038816SMartin Matuskaan alias that reflects the physical location of the drive.
33*bb2d13b6SMartin MatuskaThis is particularly helpful when it comes to tasks like replacing failed
34*bb2d13b6SMartin Matuskadrives.
35*bb2d13b6SMartin MatuskaSlot numbers may also be remapped in case the default numbering is
36*bb2d13b6SMartin Matuskaunsatisfactory.
3716038816SMartin MatuskaThe drive aliases will be created as symbolic links in
3816038816SMartin Matuska.Pa /dev/disk/by-vdev .
3916038816SMartin Matuska.Pp
4016038816SMartin MatuskaThe currently supported topologies are
4116038816SMartin Matuska.Sy sas_direct ,
4216038816SMartin Matuska.Sy sas_switch ,
4316038816SMartin Matuskaand
4416038816SMartin Matuska.Sy scsi .
4516038816SMartin MatuskaA multipath mode is supported in which dm-mpath devices are handled by
4616038816SMartin Matuskaexamining the first running component disk as reported by the driver.
4716038816SMartin MatuskaIn multipath mode the configuration file should contain a
48eda14cbcSMatt Macychannel definition with the same name for each path to a given
49eda14cbcSMatt Macyenclosure.
5016038816SMartin Matuska.Pp
5116038816SMartin Matuska.Nm
52eda14cbcSMatt Macyalso supports creating aliases based on existing udev links in the /dev
5316038816SMartin Matuskahierarchy using the
5416038816SMartin Matuska.Sy alias
5516038816SMartin Matuskaconfiguration file keyword.
5616038816SMartin MatuskaSee
5716038816SMartin Matuska.Xr vdev_id.conf 5
5816038816SMartin Matuskafor details.
5916038816SMartin Matuska.
6016038816SMartin Matuska.Sh OPTIONS
6116038816SMartin Matuska.Bl -tag -width "-m"
6216038816SMartin Matuska.It Fl d Ar device
6316038816SMartin MatuskaThe device node to classify, like
6416038816SMartin Matuska.Pa /dev/sda .
6516038816SMartin Matuska.It Fl c Ar config_file
6616038816SMartin MatuskaSpecifies the path to an alternate configuration file.
6716038816SMartin MatuskaThe default is
6816038816SMartin Matuska.Pa /etc/zfs/vdev_id.conf .
6916038816SMartin Matuska.It Fl g Sy sas_direct Ns | Ns Sy sas_switch Ns | Ns Sy scsi
70eda14cbcSMatt MacyIdentifies a physical topology that governs how physical paths are
7116038816SMartin Matuskamapped to channels:
7216038816SMartin Matuska.Bl -tag -compact -width "sas_direct and scsi"
7316038816SMartin Matuska.It Sy sas_direct No and Sy scsi
7416038816SMartin Matuskachannels are uniquely identified by a PCI slot and HBA port number
7516038816SMartin Matuska.It Sy sas_switch
7616038816SMartin Matuskachannels are uniquely identified by a SAS switch port number
7716038816SMartin Matuska.El
7816038816SMartin Matuska.It Fl m
7916038816SMartin MatuskaOnly handle dm-multipath devices.
8016038816SMartin MatuskaIf specified, examine the first running component disk of a dm-multipath
8116038816SMartin Matuskadevice as provided by the driver to determine the physical path.
8216038816SMartin Matuska.It Fl p Ar phys_per_port
83eda14cbcSMatt MacySpecifies the number of PHY devices associated with a SAS HBA port or SAS
84eda14cbcSMatt Macyswitch port.
8516038816SMartin Matuska.Nm
86eda14cbcSMatt Macyinternally uses this value to determine which HBA or switch port a
8716038816SMartin Matuskadevice is connected to.
8816038816SMartin MatuskaThe default is
8916038816SMartin Matuska.Sy 4 .
9016038816SMartin Matuska.It Fl h
91eda14cbcSMatt MacyPrint a usage summary.
9216038816SMartin Matuska.El
9316038816SMartin Matuska.
9416038816SMartin Matuska.Sh SEE ALSO
9516038816SMartin Matuska.Xr vdev_id.conf 5
96