When running "zpool import -d /dev", this command should loop on all devices in /dev and try to open them to look for a zpool. Unfortunately there is a small programming error in the way the name of the device is computed, as shown with ktrace: 16061 zpool CALL open(0xbfbfa724,O_RDONLY,<unused>0x280cdaef) 16061 zpool NAMI "/dev//geom.ctl" 16061 zpool CALL open(0xbfbfa724,O_RDONLY,<unused>0x280cdaef) 16061 zpool NAMI "/dev//geom.ctl/console" 16061 zpool RET open -1 errno 20 Not a directory 16061 zpool CALL open(0xbfbfa724,O_RDONLY,<unused>0x280cdaef) 16061 zpool NAMI "/dev//geom.ctl/console/devctl" [...] 16061 zpool CALL open(0xbfbfa724,O_RDONLY,<unused>0x280cdaef) 16061 zpool NAMI "/dev//geom.ctl/console/devctl/null/zero/klog/pci/ptmx/ctty/random/urandom/bpf/bpf0/sysmouse/dcons/dgdb/fido/nfslock/audit/fd/stdin/stdout/stderr/io/kbdmux0/kbd1/mem/kmem/ata/acpi/led/atkbd0/kbd0/psm0/bpsm0/lpt0/lpt0.ctl/ppi0/ttyu0/ttyu0.init/ttyu0.lock/cuau0/cuau0.init/cuau0.lock/ttyv0/ttyv1/ttyv2/ttyv3/ttyv4/ttyv5/ttyv6/ttyv7/ttyv8/ttyv9/ttyva/ttyvb/ttyvc/ttyvd/ttyve/ttyvf/consolectl/usbctl/mdctl/devstat/xpt0/ad0/ad0s1/acd0/ad0s1a/ad0s1b/ufsid/log/pts/zfs" Fix: The problem comes from cddl/contrib/opensolaris/lib/libzfs/common/libzfs_import.c The file name is computed using: (void) snprintf(path, sizeof (path), "%s/%s", rdsk, dp->d_name); However, a few lines upper, rpath is assigned to rdev: if (strcmp(path, "/dev/dsk/") == 0) rdsk = "/dev/rdsk/"; else rdsk = path; Thes best way to fix that is probably to avoid reusing variables. How-To-Repeat: Just run zpool import -d /dev
Responsible Changed From-To: freebsd-bugs->freebsd-fs Assign to maintainer(s).
This might have been fixed by pjd@ in r219089. A quick look in the code doesn't show traces of this problem.
State Changed From-To: open->closed Thanks for the report. I tried to reproduce it on HEAD/9.0 and there is no such problem anymore.
Responsible Changed From-To: freebsd-fs->pjd I'll take this one.