Page 1 of 1

ZFS pool not importing after reboot

PostPosted: Fri Jul 08, 2016 7:57 am
by daifuku74
Hello dear community,

When I tried a mirrored pool of 2 physical disks, the pool would mount in the finder after each restart.
But now I tried a raidz from 3 dummy files (using mkfile), I can create the pool OK, but nothing won't make it mount after a reboot, even if exported correctly beforehand.

Is that a normal behaviour for not having physical media for the pool?

I tried the virtual way because I'm still on my quest to simulate data corruption by ie making one file unavailable or altered in a moment ZFS is no aware of, by advice on my previous post.

Thank you for bearing with me :oops:

INFO: sudo zpool import -a outputs "no pools available to import"

Re: ZFS pool not importing after reboot

PostPosted: Fri Jul 08, 2016 11:44 am
by stumble
Right, this is normal behaviour. zfs doesn't keep track of where you've got pools, EXCEPT for the system /dev directory (which the operating system autopopulates with physical drives). For pools anywhere else, you need to tell zpool where to find them, using the -d flag.

See the man page for zpool, and specifically see zpool -d.

Re: ZFS pool not importing after reboot

PostPosted: Sun Jul 10, 2016 1:26 am
by daifuku74
Thanks a lot!

When doing "sudo zpool import -d /Users/mac/testdisk", the output is:

pool: testpool
id: 18035284535580880262
state: ONLINE
action: The pool can be imported using its name or numeric identifier.
config:

testpool ONLINE
raidz1-0 ONLINE
/Users/mac/testdisk/aaa ONLINE
/Users/mac/testdisk/bbb ONLINE
/Users/mac/testdisk/ccc ONLINE

but then, import fails
"sudo zpool import testpool" returns
cannot import 'testpool': no such pool available

"sudo zpool import 18035284535580880262" returns
cannot import '18035284535580880262': no such pool available

It looks like the pool is there, but not for import? :?