2012-04-21 00:32:30 +00:00
|
|
|
.TH vdev_id.conf 5
|
|
|
|
.SH NAME
|
|
|
|
vdev_id.conf \- Configuration file for vdev_id
|
|
|
|
.SH DESCRIPTION
|
|
|
|
.I vdev_id.conf
|
|
|
|
is the configuration file for
|
|
|
|
.BR vdev_id (8).
|
|
|
|
It controls the default behavior of
|
|
|
|
.BR vdev_id (8)
|
|
|
|
while it is mapping a disk device name to an alias.
|
|
|
|
.PP
|
|
|
|
The
|
|
|
|
.I vdev_id.conf
|
|
|
|
file uses a simple format consisting of a keyword followed by one or
|
|
|
|
more values on a single line. Any line not beginning with a recognized
|
|
|
|
keyword is ignored. Comments may optionally begin with a hash
|
|
|
|
character.
|
|
|
|
|
|
|
|
The following keywords and values are used.
|
2012-11-29 19:08:37 +00:00
|
|
|
.TP
|
|
|
|
\fIalias\fR <name> <devlink>
|
|
|
|
Maps a device link in the /dev directory hierarchy to a new device
|
|
|
|
name. The udev rule defining the device link must have run prior to
|
|
|
|
.BR vdev_id (8).
|
|
|
|
A defined alias takes precedence over a topology-derived name, but the
|
|
|
|
two naming methods can otherwise coexist. For example, one might name
|
|
|
|
drives in a JBOD with the sas_direct topology while naming an internal
|
|
|
|
L2ARC device with an alias.
|
|
|
|
|
|
|
|
\fIname\fR - the name of the link to the device that will by created in
|
|
|
|
/dev/disk/by-vdev.
|
|
|
|
|
|
|
|
\fIdevlink\fR - the name of the device link that has already been
|
|
|
|
defined by udev. This may be an absolute path or the base filename.
|
|
|
|
|
2012-04-21 00:32:30 +00:00
|
|
|
.TP
|
|
|
|
\fIchannel\fR [pci_slot] <port> <name>
|
|
|
|
Maps a physical path to a channel name (typically representing a single
|
|
|
|
disk enclosure).
|
|
|
|
|
|
|
|
\fIpci_slot\fR - specifies the PCI SLOT of the HBA
|
|
|
|
hosting the disk enclosure being mapped, as found in the output of
|
|
|
|
.BR lspci (8).
|
|
|
|
This argument is not used in sas_switch mode.
|
|
|
|
|
|
|
|
\fIport\fR - specifies the numeric identifier of the HBA or SAS switch port
|
|
|
|
connected to the disk enclosure being mapped.
|
|
|
|
|
|
|
|
\fIname\fR - specifies the name of the channel.
|
|
|
|
|
|
|
|
.TP
|
2014-01-13 21:32:41 +00:00
|
|
|
\fIslot\fR <old> <new> [channel]
|
|
|
|
Maps a disk slot number as reported by the operating system to an
|
|
|
|
alternative slot number. If the \fIchannel\fR parameter is specified
|
|
|
|
then the mapping is only applied to slots in the named channel,
|
|
|
|
otherwise the mapping is applied to all channels. The first-specified
|
|
|
|
\fIslot\fR 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.
|
|
|
|
|
2012-04-21 00:32:30 +00:00
|
|
|
.TP
|
|
|
|
\fImultipath\fR <yes|no>
|
|
|
|
Specifies whether
|
|
|
|
.BR vdev_id (8)
|
|
|
|
will handle only dm-multipath devices. If set to "yes" then
|
|
|
|
.BR vdev_id (8)
|
|
|
|
will examine the first running component disk of a dm-multipath
|
|
|
|
device as listed by the
|
|
|
|
.BR multipath (8)
|
|
|
|
command to determine the physical path.
|
|
|
|
.TP
|
|
|
|
\fItopology\fR <sas_direct|sas_switch>
|
|
|
|
Identifies a physical topology that governs how physical paths are
|
|
|
|
mapped to channels.
|
|
|
|
|
|
|
|
\fIsas_direct\fR - in this mode a channel is uniquely identified by
|
|
|
|
a PCI slot and a HBA port number
|
|
|
|
|
|
|
|
\fIsas_switch\fR - in this mode a channel is uniquely identified by
|
|
|
|
a SAS switch port number
|
|
|
|
|
|
|
|
.TP
|
|
|
|
\fIphys_per_port\fR <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.
|
|
|
|
.BR vdev_id (8)
|
|
|
|
internally uses this value to determine which HBA or switch port a
|
|
|
|
device is connected to. The default is 4.
|
2015-08-19 11:01:40 +00:00
|
|
|
|
|
|
|
.TP
|
2017-12-20 17:42:07 +00:00
|
|
|
\fIslot\fR <bay|phy|port|id|lun|ses>
|
2015-08-19 11:01:40 +00:00
|
|
|
Specifies from which element of a SAS identifier the slot number is
|
|
|
|
taken. The default is bay.
|
|
|
|
|
|
|
|
\fIbay\fR - read the slot number from the bay identifier.
|
|
|
|
|
|
|
|
\fIphy\fR - read the slot number from the phy identifier.
|
|
|
|
|
2017-08-14 22:18:26 +00:00
|
|
|
\fIport\fR - use the SAS port as the slot number.
|
|
|
|
|
2015-08-19 11:01:40 +00:00
|
|
|
\fIid\fR - use the scsi id as the slot number.
|
|
|
|
|
|
|
|
\fIlun\fR - use the scsi lun as the slot number.
|
2017-12-20 17:42:07 +00:00
|
|
|
|
|
|
|
\fIses\fR - use the SCSI Enclosure Services (SES) enclosure device slot number,
|
|
|
|
as reported by
|
|
|
|
.BR sg_ses (8).
|
|
|
|
This is intended for use only on systems where \fIbay\fR is unsupported,
|
|
|
|
noting that \fIport\fR and \fIid\fR may be unstable across disk replacement.
|
2012-04-21 00:32:30 +00:00
|
|
|
.SH EXAMPLES
|
|
|
|
A non-multipath configuration with direct-attached SAS enclosures and an
|
|
|
|
arbitrary slot re-mapping.
|
|
|
|
.P
|
2014-01-13 21:32:41 +00:00
|
|
|
.nf
|
2012-04-21 00:32:30 +00:00
|
|
|
multipath no
|
|
|
|
topology sas_direct
|
|
|
|
phys_per_port 4
|
2015-08-19 11:01:40 +00:00
|
|
|
slot bay
|
2012-04-21 00:32:30 +00:00
|
|
|
|
|
|
|
# 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
|
|
|
|
|
2014-01-13 21:32:41 +00:00
|
|
|
# Custom mapping for Channel A
|
|
|
|
|
2012-04-21 00:32:30 +00:00
|
|
|
# Linux Mapped
|
2014-01-13 21:32:41 +00:00
|
|
|
# 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
|
|
|
|
.fi
|
2012-04-21 00:32:30 +00:00
|
|
|
.P
|
|
|
|
A SAS-switch topology. Note that the
|
|
|
|
.I channel
|
|
|
|
keyword takes only two arguments in this example.
|
|
|
|
.P
|
2014-01-13 21:32:41 +00:00
|
|
|
.nf
|
2012-04-21 00:32:30 +00:00
|
|
|
topology sas_switch
|
|
|
|
|
|
|
|
# SWITCH PORT CHANNEL NAME
|
|
|
|
channel 1 A
|
|
|
|
channel 2 B
|
|
|
|
channel 3 C
|
|
|
|
channel 4 D
|
2014-01-13 21:32:41 +00:00
|
|
|
.fi
|
2012-04-21 00:32:30 +00:00
|
|
|
.P
|
|
|
|
A multipath configuration. Note that channel names have multiple
|
|
|
|
definitions - one per physical path.
|
|
|
|
.P
|
2014-01-13 21:32:41 +00:00
|
|
|
.nf
|
2012-04-21 00:32:30 +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
|
2014-01-13 21:32:41 +00:00
|
|
|
.fi
|
2012-04-21 00:32:30 +00:00
|
|
|
.P
|
2012-11-29 19:08:37 +00:00
|
|
|
A configuration using device link aliases.
|
|
|
|
.P
|
2014-01-13 21:32:41 +00:00
|
|
|
.nf
|
2012-11-29 19:08:37 +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
|
2014-01-13 21:32:41 +00:00
|
|
|
.fi
|
2012-11-29 19:08:37 +00:00
|
|
|
.P
|
2012-04-21 00:32:30 +00:00
|
|
|
|
|
|
|
.SH FILES
|
|
|
|
.TP
|
|
|
|
.I /etc/zfs/vdev_id.conf
|
|
|
|
The configuration file for
|
|
|
|
.BR vdev_id (8).
|
|
|
|
.SH SEE ALSO
|
|
|
|
.BR vdev_id (8)
|