Bug #10622


ZFS should still check paths for devices that have no devid

Added by Joshua M. Clulow about 3 years ago. Updated over 2 years ago.

zfs - Zettabyte File System
Start date:
Due date:
% Done:


Estimated time:
Gerrit CR:


Many block devices have a unique devid that identifies the particular physical media; e.g., a specific hard disk, or a specific logical volume. Unfortunately not every block device is required to provide one but ZFS assumes in some places that one will be available.

Of particular note is zpool_vdev_name(), used in zpool status to get the short /dev name of a disk vdev; e.g., /dev/dsk/c0t0d0 would be printed as c0t0d0. In addition to rendering the short name, this function is responsible for confirming that the /dev path is still correct. The path may have changed for devices (e.g., SATA disks) which have a /dev path based on their physical attachment point rather than the media identity. The zpool_vdev_name() function uses the devid value to determine an appropriate /dev path, and if it has changed it notifies the kernel that the ZFS pool configuration needs to be updated as well.

If the vdev does not have a devid then we do not update the /dev path at all, potentially leaving an incorrect value. This prevents processes that use the /dev path (e.g., installboot) from correctly interacting with the devices in the pool, and will almost certainly confuse the operator.

If a device does not have a devid, we should fall back to determining a valid /dev path for the physical path (i.e., the /devices path). If a vdev does not have a physical path either, we'll continue to do nothing for now.

Related issues

Related to illumos gate - Bug #10623: ZFS should be more aggressive in updating vdev devidClosedJoshua M. Clulow2019-03-31

Actions #1

Updated by Joshua M. Clulow about 3 years ago

  • Related to Bug #10623: ZFS should be more aggressive in updating vdev devid added
Actions #2

Updated by Joshua M. Clulow over 2 years ago

Testing Notes

I've run the ZFS test suite on OmniOS before and after this change. Though there are still a few failures, they seem consistent before and after, and mostly a result of a few presumably flakey tests.

In addition, I've used this a bunch as part of testing my work in progress for #7119. I've been able to take an installed OmniOS image made in VirtualBox on my desktop and write it to disks in several totally different systems, both physical and virtual. The new boot-time scan (in the #7119 code) correctly find the new /devices path and then a subsequent zpool status will update the /dev path in on systems that both do, and do not, have a devid for the disks.

In addition I booted the RTI bits on a system where there was no change in any rpool path and that works too.

Actions #3

Updated by Electric Monk over 2 years ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100

git commit 727feae5cc0661f4ec44e87b934863693bedf87d

commit  727feae5cc0661f4ec44e87b934863693bedf87d
Author: Joshua M. Clulow <>
Date:   2019-08-28T23:57:58.000Z

    10622 ZFS should still check paths for devices that have no devid
    Reviewed by: Toomas Soome <>
    Reviewed by: Gordon Ross <>
    Reviewed by: Andy Fiddaman <>
    Reviewed by: Jerry Jelinek <>
    Approved by: Dan McDonald <>


Also available in: Atom PDF