By-vdev: why is it called that?

The vdev_id.conf file can be used to create entries with convenient channel names in /dev/disk/by-vdev with udev. My question is: why is it called “by-vdev”? This seems to overlap in meaning with a zpool vdev (virtual device, consisting of a set of physical drives), yet it seems to be a very different meaning (normally referring to individual disks). Surely, they could have used “by-udev”? Or another term not already in use within ZFS terminology?

I figured understanding the motivations behind the naming would help prevent confusion.

ZFS terminology also calls single-device vdevs “vdevs,” e.g. in zpoolconcepts(7)

Virtual Devices (vdevs)
A “virtual device” describes a single device or a collection of devices […]

so the ones in /dev/disk/by-vdev are single-device/disk ones referred to by their name as vdevs (though that’s to some degree only true if you make it so, by importing using those links).

1 Like