Page 1 of 1

All zpool and zfs commands hangs forever

PostPosted: Sat Jul 13, 2019 11:59 pm
by TooDizzy
Hi Guys,

I am having some nasty problems and I need some help to sort them out and/or recover my data.

I run a single disk pool that is mounted on boot. Normally everything is great, but now (for some reason) the pool never gets online. When I try to check the status by running
Code: Select all
zpool status
the command just hangs. Can't even ctrl-c it to kill it. It is frozen.
I also tried to look for errors in the log files, but nothing obvious.

My best guess is that this is related to starting hardware failure on the disk, but I would really like to get the data out!
Disk util can read the disk and Disk Drill can also scan the disk can find most, if not all, files on the disk. So it can't be completely dead.

Tried to reinstall ifs, but it fails as I need to first export the pool. Which I can't as any
Code: Select all
zpool
command never returns to the prompt.

Read somewhere that I should try to mount the pool as read only. How can I do this when I can't access any of the CLI commands?
Can I specify this in a config file somewhere?

Hope that you can help me or at least point me in the right direction :)

Re: All zpool and zfs commands hangs forever

PostPosted: Sun Jul 14, 2019 4:13 am
by TooDizzy
any easy way to not import all pools on boot?

Re: All zpool and zfs commands hangs forever

PostPosted: Sun Jul 14, 2019 7:52 pm
by lundman
The all-pool-import is a script run by launchctl - easiest thing is simply to comment out the line with "zpool import -a" from that script.

If that hangs, then yes, any further command could potentially hang too - you can use "spindump" to get a list of the stacks to see where it is stuck. But really, you should comment out the auto-import, then try importing with "-o readonly=on" and "-N" (don't mount) - then see if you can mount the datasets one at a time.

Re: All zpool and zfs commands hangs forever

PostPosted: Mon Jul 15, 2019 8:31 am
by TooDizzy
lundman wrote:The all-pool-import is a script run by launchctl - easiest thing is simply to comment out the line with "zpool import -a" from that script.


Great and thank you for the advise. Any hints on where this script is located? Tried to find it, but no luck so far... :?

/Tue

Re: All zpool and zfs commands hangs forever

PostPosted: Mon Jul 15, 2019 3:42 pm
by lundman

Re: All zpool and zfs commands hangs forever

PostPosted: Tue Jul 16, 2019 11:41 am
by TooDizzy
lundman wrote:I believe this has the path:

https://openzfsonosx.org/wiki/FAQ#Q.29_ ... t_work_.3F


Worked. Thanks a lot!
In process of recovering data.