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