2021-05-26 17:12:48 +00:00
|
|
|
.\"
|
|
|
|
.\" This file and its contents are supplied under the terms of the
|
|
|
|
.\" Common Development and Distribution License ("CDDL"), version 1.0.
|
|
|
|
.\" You may only use this file in accordance with the terms of version
|
|
|
|
.\" 1.0 of the CDDL.
|
|
|
|
.\"
|
|
|
|
.\" A full copy of the text of the CDDL should have accompanied this
|
|
|
|
.\" source. A copy of the CDDL is also available via the Internet at
|
|
|
|
.\" http://www.illumos.org/license/CDDL.
|
|
|
|
.\"
|
|
|
|
.Dd May 26, 2021
|
|
|
|
.Dt VDEV_ID.CONF 5
|
|
|
|
.Os
|
|
|
|
.
|
|
|
|
.Sh NAME
|
|
|
|
.Nm vdev_id.conf
|
2021-06-04 20:08:50 +00:00
|
|
|
.Nd configuration file for vdev_id(8)
|
2021-05-26 17:12:48 +00:00
|
|
|
.Sh DESCRIPTION
|
|
|
|
.Nm
|
2012-04-21 00:32:30 +00:00
|
|
|
is the configuration file for
|
2021-06-04 20:08:50 +00:00
|
|
|
.Xr vdev_id 8 .
|
2012-04-21 00:32:30 +00:00
|
|
|
It controls the default behavior of
|
2021-06-04 20:08:50 +00:00
|
|
|
.Xr vdev_id 8
|
2012-04-21 00:32:30 +00:00
|
|
|
while it is mapping a disk device name to an alias.
|
2021-05-26 17:12:48 +00:00
|
|
|
.Pp
|
2012-04-21 00:32:30 +00:00
|
|
|
The
|
2021-05-26 17:12:48 +00:00
|
|
|
.Nm
|
2012-04-21 00:32:30 +00:00
|
|
|
file uses a simple format consisting of a keyword followed by one or
|
2021-05-26 17:12:48 +00:00
|
|
|
more values on a single line.
|
|
|
|
Any line not beginning with a recognized keyword is ignored.
|
|
|
|
Comments may optionally begin with a hash character.
|
|
|
|
.Pp
|
2012-04-21 00:32:30 +00:00
|
|
|
The following keywords and values are used.
|
2021-05-26 17:12:48 +00:00
|
|
|
.Bl -tag -width "-h"
|
|
|
|
.It Sy alias Ar name Ar devlink
|
|
|
|
Maps a device link in the
|
|
|
|
.Pa /dev
|
|
|
|
directory hierarchy to a new device name.
|
|
|
|
The udev rule defining the device link must have run prior to
|
2021-06-04 20:08:50 +00:00
|
|
|
.Xr vdev_id 8 .
|
2012-11-29 19:08:37 +00:00
|
|
|
A defined alias takes precedence over a topology-derived name, but the
|
2021-05-26 17:12:48 +00:00
|
|
|
two naming methods can otherwise coexist.
|
|
|
|
For example, one might name drives in a JBOD with the
|
|
|
|
.Sy sas_direct
|
|
|
|
topology while naming an internal L2ARC device with an alias.
|
|
|
|
.Pp
|
|
|
|
.Ar name
|
|
|
|
is the name of the link to the device that will by created under
|
|
|
|
.Pa /dev/disk/by-vdev .
|
|
|
|
.Pp
|
|
|
|
.Ar devlink
|
|
|
|
is the name of the device link that has already been
|
|
|
|
defined by udev.
|
|
|
|
This may be an absolute path or the base filename.
|
|
|
|
.
|
|
|
|
.It Sy channel [ Ns Ar pci_slot ] Ar port Ar name
|
2012-04-21 00:32:30 +00:00
|
|
|
Maps a physical path to a channel name (typically representing a single
|
|
|
|
disk enclosure).
|
2021-05-26 17:12:48 +00:00
|
|
|
.
|
|
|
|
.It Sy enclosure_symlinks Sy yes Ns | Ns Sy no
|
|
|
|
Additionally create
|
|
|
|
.Pa /dev/by-enclosure
|
|
|
|
symlinks to the disk enclosure
|
|
|
|
.Em sg
|
|
|
|
devices using the naming scheme from
|
|
|
|
.Pa vdev_id.conf .
|
|
|
|
.Sy enclosure_symlinks
|
|
|
|
is only allowed for
|
|
|
|
.Sy sas_direct
|
|
|
|
mode.
|
|
|
|
.
|
|
|
|
.It Sy enclosure_symlinks_prefix Ar prefix
|
|
|
|
Specify the prefix for the enclosure symlinks in the form
|
|
|
|
.Pa /dev/by-enclosure/ Ns Ao Ar prefix Ac Ns - Ns Ao Ar channel Ac Ns Aq Ar num
|
|
|
|
.Pp
|
|
|
|
Defaults to
|
|
|
|
.Dq Em enc .
|
|
|
|
.
|
|
|
|
.It Sy slot Ar prefix Ar new Op Ar channel
|
2014-01-13 21:32:41 +00:00
|
|
|
Maps a disk slot number as reported by the operating system to an
|
2021-05-26 17:12:48 +00:00
|
|
|
alternative slot number.
|
|
|
|
If the
|
|
|
|
.Ar channel
|
|
|
|
parameter is specified
|
2014-01-13 21:32:41 +00:00
|
|
|
then the mapping is only applied to slots in the named channel,
|
2021-05-26 17:12:48 +00:00
|
|
|
otherwise the mapping is applied to all channels.
|
|
|
|
The first-specified
|
|
|
|
.Ar slot
|
|
|
|
rule that can match a slot takes precedence.
|
|
|
|
Therefore a channel-specific mapping for a given slot should generally appear
|
|
|
|
before a generic mapping for the same slot.
|
|
|
|
In this way a custom mapping may be applied to a particular channel
|
|
|
|
and a default mapping applied to the others.
|
|
|
|
.
|
|
|
|
.It Sy multipath Sy yes Ns | Ns Sy no
|
2012-04-21 00:32:30 +00:00
|
|
|
Specifies whether
|
2021-06-04 20:08:50 +00:00
|
|
|
.Xr vdev_id 8
|
2021-05-26 17:12:48 +00:00
|
|
|
will handle only dm-multipath devices.
|
|
|
|
If set to
|
|
|
|
.Sy yes
|
|
|
|
then
|
2021-06-04 20:08:50 +00:00
|
|
|
.Xr vdev_id 8
|
2012-04-21 00:32:30 +00:00
|
|
|
will examine the first running component disk of a dm-multipath
|
2021-05-26 17:12:48 +00:00
|
|
|
device as provided by the driver command to determine the physical path.
|
|
|
|
.
|
|
|
|
.It Sy topology Sy sas_direct Ns | Ns Sy sas_switch Ns | Ns Sy scsi
|
2012-04-21 00:32:30 +00:00
|
|
|
Identifies a physical topology that governs how physical paths are
|
2021-05-26 17:12:48 +00:00
|
|
|
mapped to channels:
|
|
|
|
.Bl -tag -compact -width "sas_direct and scsi"
|
|
|
|
.It Sy sas_direct No and Sy scsi
|
|
|
|
channels are uniquely identified by a PCI slot and HBA port number
|
|
|
|
.It Sy sas_switch
|
|
|
|
channels are uniquely identified by a SAS switch port number
|
|
|
|
.El
|
|
|
|
.
|
|
|
|
.It Sy phys_per_port Ar num
|
2012-11-29 19:08:37 +00:00
|
|
|
Specifies the number of PHY devices associated with a SAS HBA port or SAS
|
2012-04-21 00:32:30 +00:00
|
|
|
switch port.
|
2021-06-04 20:08:50 +00:00
|
|
|
.Xr vdev_id 8
|
2012-04-21 00:32:30 +00:00
|
|
|
internally uses this value to determine which HBA or switch port a
|
2021-05-26 17:12:48 +00:00
|
|
|
device is connected to.
|
|
|
|
The default is
|
|
|
|
.Sy 4 .
|
|
|
|
.
|
|
|
|
.It Sy slot Sy bay Ns | Ns Sy phy Ns | Ns Sy port Ns | Ns Sy id Ns | Ns Sy lun Ns | Ns Sy ses
|
2015-08-19 11:01:40 +00:00
|
|
|
Specifies from which element of a SAS identifier the slot number is
|
2021-05-26 17:12:48 +00:00
|
|
|
taken.
|
|
|
|
The default is
|
|
|
|
.Sy bay :
|
|
|
|
.Bl -tag -compact -width "port"
|
|
|
|
.It Sy bay
|
|
|
|
read the slot number from the bay identifier.
|
|
|
|
.It Sy phy
|
|
|
|
read the slot number from the phy identifier.
|
|
|
|
.It Sy port
|
|
|
|
use the SAS port as the slot number.
|
|
|
|
.It Sy id
|
|
|
|
use the scsi id as the slot number.
|
|
|
|
.It Sy lun
|
|
|
|
use the scsi lun as the slot number.
|
|
|
|
.It Sy ses
|
|
|
|
use the SCSI Enclosure Services (SES) enclosure device slot number,
|
2017-12-20 17:42:07 +00:00
|
|
|
as reported by
|
2021-05-26 17:12:48 +00:00
|
|
|
.Xr sg_ses 8 .
|
|
|
|
Intended for use only on systems where
|
|
|
|
.Sy bay
|
|
|
|
is unsupported,
|
|
|
|
noting that
|
|
|
|
.Sy port
|
|
|
|
and
|
|
|
|
.Sy id
|
|
|
|
may be unstable across disk replacement.
|
|
|
|
.El
|
|
|
|
.El
|
|
|
|
.
|
|
|
|
.Sh FILES
|
|
|
|
.Bl -tag -width "-v v"
|
|
|
|
.It Pa /etc/zfs/vdev_id.conf
|
|
|
|
The configuration file for
|
2021-06-04 20:08:50 +00:00
|
|
|
.Xr vdev_id 8 .
|
2021-05-26 17:12:48 +00:00
|
|
|
.El
|
|
|
|
.
|
|
|
|
.Sh EXAMPLES
|
2012-04-21 00:32:30 +00:00
|
|
|
A non-multipath configuration with direct-attached SAS enclosures and an
|
2021-05-26 17:12:48 +00:00
|
|
|
arbitrary slot re-mapping:
|
2021-06-04 20:08:50 +00:00
|
|
|
.Bd -literal -compact -offset Ds
|
2021-05-26 17:12:48 +00:00
|
|
|
multipath no
|
|
|
|
topology sas_direct
|
|
|
|
phys_per_port 4
|
|
|
|
slot bay
|
|
|
|
|
|
|
|
# PCI_SLOT HBA PORT CHANNEL NAME
|
|
|
|
channel 85:00.0 1 A
|
|
|
|
channel 85:00.0 0 B
|
|
|
|
channel 86:00.0 1 C
|
|
|
|
channel 86:00.0 0 D
|
|
|
|
|
|
|
|
# Custom mapping for Channel A
|
|
|
|
|
|
|
|
# Linux Mapped
|
|
|
|
# Slot Slot Channel
|
|
|
|
slot 1 7 A
|
|
|
|
slot 2 10 A
|
|
|
|
slot 3 3 A
|
|
|
|
slot 4 6 A
|
|
|
|
|
|
|
|
# Default mapping for B, C, and D
|
|
|
|
|
|
|
|
slot 1 4
|
|
|
|
slot 2 2
|
|
|
|
slot 3 1
|
|
|
|
slot 4 3
|
|
|
|
.Ed
|
|
|
|
.Pp
|
|
|
|
A SAS-switch topology.
|
|
|
|
Note, that the
|
|
|
|
.Ar channel
|
2021-06-04 20:08:50 +00:00
|
|
|
keyword takes only two arguments in this example:
|
|
|
|
.Bd -literal -compact -offset Ds
|
2021-05-26 17:12:48 +00:00
|
|
|
topology sas_switch
|
|
|
|
|
|
|
|
# SWITCH PORT CHANNEL NAME
|
|
|
|
channel 1 A
|
|
|
|
channel 2 B
|
|
|
|
channel 3 C
|
|
|
|
channel 4 D
|
|
|
|
.Ed
|
|
|
|
.Pp
|
|
|
|
A multipath configuration.
|
2021-06-04 20:08:50 +00:00
|
|
|
Note that channel names have multiple definitions - one per physical path:
|
|
|
|
.Bd -literal -compact -offset Ds
|
2021-05-26 17:12:48 +00:00
|
|
|
multipath yes
|
|
|
|
|
|
|
|
# PCI_SLOT HBA PORT CHANNEL NAME
|
|
|
|
channel 85:00.0 1 A
|
|
|
|
channel 85:00.0 0 B
|
|
|
|
channel 86:00.0 1 A
|
|
|
|
channel 86:00.0 0 B
|
|
|
|
.Ed
|
|
|
|
.Pp
|
2021-06-04 20:08:50 +00:00
|
|
|
A configuration with enclosure_symlinks enabled:
|
|
|
|
.Bd -literal -compact -offset Ds
|
2021-05-26 17:12:48 +00:00
|
|
|
multipath yes
|
|
|
|
enclosure_symlinks yes
|
|
|
|
|
|
|
|
# PCI_ID HBA PORT CHANNEL NAME
|
|
|
|
channel 05:00.0 1 U
|
|
|
|
channel 05:00.0 0 L
|
|
|
|
channel 06:00.0 1 U
|
|
|
|
channel 06:00.0 0 L
|
|
|
|
.Ed
|
2018-12-15 01:27:49 +00:00
|
|
|
In addition to the disks symlinks, this configuration will create:
|
2021-06-04 20:08:50 +00:00
|
|
|
.Bd -literal -compact -offset Ds
|
2021-05-26 17:12:48 +00:00
|
|
|
/dev/by-enclosure/enc-L0
|
|
|
|
/dev/by-enclosure/enc-L1
|
|
|
|
/dev/by-enclosure/enc-U0
|
|
|
|
/dev/by-enclosure/enc-U1
|
|
|
|
.Ed
|
|
|
|
.Pp
|
2021-06-04 20:08:50 +00:00
|
|
|
A configuration using device link aliases:
|
|
|
|
.Bd -literal -compact -offset Ds
|
2021-05-26 17:12:48 +00:00
|
|
|
# by-vdev
|
|
|
|
# name fully qualified or base name of device link
|
|
|
|
alias d1 /dev/disk/by-id/wwn-0x5000c5002de3b9ca
|
|
|
|
alias d2 wwn-0x5000c5002def789e
|
|
|
|
.Ed
|
|
|
|
.
|
|
|
|
.Sh SEE ALSO
|
|
|
|
.Xr vdev_id 8
|