Pawel Jakub Dawidek <pjd_at_FreeBSD.org> wrote: > On Tue, May 15, 2012 at 05:07:30PM +0000, Andriy Gapon wrote: > > Author: avg > > Date: Tue May 15 17:07:29 2012 > > New Revision: 235478 > > URL: http://svn.freebsd.org/changeset/base/235478 > > > > Log: > > zpool_do_import: use /dev instead of /dev/dsk as a default > > > > This affects behavior of zpool import without -d option. > > How does it affect 'zpool import' behaviour? On FreeBSD when -d is not > given we should not scan entire /dev/, but take all available GEOM > providers from the GEOM. The problem was discussed in this thread: http://lists.freebsd.org/pipermail/freebsd-current/2012-May/033805.html (so I set Followup-To: freebsd-current_at_) Under some condition zpool import seems to do an lstat() on the searchdirs[0] default and bail out if it's unsuccessful. Here's a truss excerpt from such a failure: open("/dev/zfs",O_RDWR,030730440) = 3 (0x3) open("/dev/zero",O_RDONLY,0666) = 4 (0x4) open("/etc/zfs/exports",O_RDONLY,0666) = 5 (0x5) geteuid() = 0 (0x0) lstat("/dev",{ mode=dr-xr-xr-x ,inode=2,size=512,blksize=4096 }) = 0 (0x0) lstat("/dev/dsk",0x7fffffff83c0) ERR#2 'No such file or directory' cannot open '/dev/dsk': must be an absolute path write(2,"cannot open '/dev/dsk': must be "...,49) = 49 (0x31) close(3) = 0 (0x0) Currently (different kernel and world) I get: open("/dev/zfs",O_RDWR,030730440) = 3 (0x3) open("/dev/zero",O_RDONLY,0666) = 4 (0x4) open("/etc/zfs/exports",O_RDONLY,0666) = 5 (0x5) __sysctl(0x7fffffff7d60,0x2,0x7fffffff7da0,0x7fffffff7e08,0x801495259,0x13) = 0 (0x0) __sysctl(0x7fffffff7da0,0x4,0x8016a3f80,0x7fffffff7e50,0x0,0x0) = 0 (0x0) ioctl(3,0xd5985a04 { IORW 0x5a('Z'), 4, 5528 },0xffff7e70) = 0 (0x0) ioctl(3,0xd5985a05 { IORW 0x5a('Z'), 5, 5528 },0xffff7e30) = 0 (0x0) ioctl(3,0xd5985a05 { IORW 0x5a('Z'), 5, 5528 },0xffff7e30) = 0 (0x0) lstat("/dev",{ mode=dr-xr-xr-x ,inode=2,size=512,blksize=4096 }) = 0 (0x0) open("/dev/",O_RDONLY,037777710000) = 6 (0x6) which seems to imply that zpool didn't use the searchdirs[0] default at all, so a version before r235478 probably would have worked as well. Fabian
This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:27 UTC