beginner issues with ZFS on OS X: how to re-mount?

2

1

I hope someone might be able to help me with this. I am using ZFS to create a 4 external hard drive raid system under OS X. I was able to set everything up and copy data to it. But then I think I made the mistake to unmount the disk at some point using OS X finder. Now, I am not able to re-mount the raid system. Looking at the status, I get the following information:

(ncl_stable) iMac:~ lmm$ sudo zpool status -v pool: raid state: UNAVAIL status: One or more devices are faulted in response to IO failures. action: Make sure the affected devices are connected, then run 'zpool clear'. see: http://zfsonlinux.org/msg/ZFS-8000-HC scan: none requested config:

NAME        STATE     READ WRITE CKSUM
raid        UNAVAIL      0     0     0  insufficient replicas
  raidz2-0  UNAVAIL      0     0     0  insufficient replicas
    disk3   REMOVED      0     0     0
    disk4   REMOVED      0     0     0
    disk5   REMOVED      0     0     0
    disk6   REMOVED      0     0     0

errors: List of errors unavailable (insufficient privileges)

Do you have any suggestion how to re-mount the system and recover the data? Also it would be great if anyone can tell me how to avoid this issue in the future.

Thanks a lot in advance...

Fabian

Posted 2018-09-18T09:50:15.120

Reputation: 21

It looks like ZFS thinks those drives have all been ejected / unplugged. I think this may come down to a macOS question about how to re-discover those disks. Worst case, unplug and replug? Then run “zpool import” if ZFS doesn’t automatically reload the pool. – Dan – 2018-09-19T05:17:59.027

2Hi Dan, thank you for the reply. Just unplug and replug didn't work, but the following sequence did: 1) switch off external hard drive, 2) reboot OS X, 3) turn on external hard drive, 4) import – Fabian – 2018-09-19T06:36:59.990

This can also happen with internal ZFS disks on OS X. I think it is because the pool is displayed/handled as an external disk regardless of status, and then accidental eject is possible. Unfortunately, OS X does seem to lack a way to rediscover those disks, so they are in limbo until a reboot. – user121391 – 2018-09-19T08:37:27.633

thank you - that is good to know! I am wondering if I can also safely mount this external ZFS raid on other OS X machines (other than the one I created the raid with) without fear of loosing the backup? – Fabian – 2018-09-20T07:23:55.423

@Fabian: Yeah, you can attach the pool elsewhere, just “zpool export” on the source system to detach it. The only thing that might be wonky is if the uids/gids don’t match between systems, you may have to be root to read / write to the pool on the other system so you can bypass file permissions checks. – Dan – 2018-09-20T15:13:27.577

@Dan: thanks that is helpful! Is it also possible if I would loose the original OS X for instance due to a disk or filesystem error and therefore won't be able to detach it beforehand with "zpool export"? – Fabian – 2018-09-21T00:18:37.967

@Fabian: Skipping the export step (as happens during a hard reboot / crash) doesn’t do any harm, but exporting cleanly means the filesystem doesn’t have to replay its log when you reboot. It’s a small advantage I guess, but never hurts to be cautious. :) If a disk that’s part of the pool dies, I think it’s still possible to export the pool, but you should probably test just to make sure it acts the way you expect (for instance by unplugging one of the disks). – Dan – 2018-09-21T01:18:37.523

@Dan: Fantastic - thank you very much for the explanation! – Fabian – 2018-09-21T06:37:37.640

No answers