VDEV_ID(8)
β¨ VDEV_ID β the vdev_id girlies' guide β¨
okay bestie, so this is vdev_id from section 8 of the System Manager's Manual, and it is genuinely one of the most underrated little helpers in the whole ZFS ecosystem. she generates user-friendly names for JBOD disks π and honestly? iconic behaviour.
πΈ NAME πΈ
vdev_id β generate user-friendly names for JBOD disks π«Ά
π SYNOPSIS π
vdev_id -d dev -c config_file -g sas_direct|sas_switch|scsi -m -p
phys_per_port
π DESCRIPTION π
so vdev_id is a udev helper, which is a fancy way of saying she runs behind the scenes and does the tedious work so you don't have to. she parses vdev_id.conf(5) to map a physical path in a storage topology to a channel name. then that channel name gets combined with a disk enclosure slot number to create an alias that reflects where the drive physically lives. lowkey this is the most helpful thing ever when you're trying to do tasks like replacing failed drives π because instead of staring at /dev/sdq and going "which one is that" you get a name that literally tells you where the drive is. main character energy fr fr.
slot numbers can also be remapped, in case the default numbering is giving absolutely nothing and you need it to be different. the drive aliases get created as symbolic links in /dev/disk/by-vdev. yes bestie, that directory is your new best friend. π¦
the topologies supported right now are sas_direct, sas_switch, and scsi. there's also a multipath mode where dm-mpath devices are handled by examining the first running component disk as reported by the driver. when you're in multipath mode, the config file should contain a channel definition with the same name for each path to a given enclosure β no cap, that part is important.
vdev_id also supports creating aliases based on existing udev links in the /dev hierarchy, using the alias configuration file keyword. go check vdev_id.conf(5) for the deets. π
β¨ OPTIONS β¨
here's the whole menu, bestie, every single one, no skips π
-ddevice β the device node you want to classify, like/dev/sda.-cconfig_file β the path to an alternate configuration file. the default is/etc/zfs/vdev_id.conf.-gsas_direct|sas_switch|scsiβ tells her which physical topology you're working with, which governs how physical paths get mapped to channels:sas_directandscsiβ channels are uniquely identified by a PCI slot and HBA port number.sas_switchβ channels are uniquely identified by a SAS switch port number.
-mβ only handle dm-multipath devices. if you pass this, she examines the first running component disk of a dm-multipath device, as provided by the driver, to figure out the physical path.-pphys_per_port β the number of PHY devices associated with a SAS HBA port or a SAS switch port.vdev_idinternally uses this value to determine which HBA or switch port a device is connected to. the default is4.-hβ print a usage summary. (your little "help me" button, bestie π)
π SEE ALSO π
ngl bestie, if you're ever lost in a sea of /dev/sd* names, this is the page to come back to. she ate. π
okay bye ily, this was OpenZFS's VDEV_ID(8) from May 26, 2021 β source and version: OpenZFS π mwah, go name some disks π
π¦ where this page comes from
- alpine 3.22: zfs-doc 2.3.9-r0 Β· CDDL-1.0
- alpine 3.23: zfs-doc 2.4.4-r0 Β· CDDL-1.0
- alpine 3.24: zfs-doc 2.4.4-r0 Β· CDDL-1.0
- debian trixie: zfsutils-linux 2.3.9-0+deb13u1 Β· CDDL-1.0
- nixos 26.05: zfs-user 2.4.4
- nixpkgs unstable: zfs-user 2.4.4
- ubuntu questing: zfsutils-linux 2.3.4-1ubuntu2
- ubuntu resolute: zfsutils-linux 2.4.1-1ubuntu5 Β· CDDL-1.0
- ubuntu resolute: zfsutils-linux 2.4.1-1ubuntu5.1 Β· CDDL-1.0
- ubuntu stonking: zfsutils-linux 2.4.4-1ubuntu4 Β· CDDL-1.0
- π the page's license: CDDL-1.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms