Pool vanishes after reboot, partition is lost without trace

All your general support questions for OpenZFS on OS X.

Pool vanishes after reboot, partition is lost without trace

Postby ggrocca » Thu Jan 14, 2021 9:17 am

Hi everyone, I'm a long time ZFS user (both on Linux and on Mac) but this is my first post - I've never stumbled upon any big issue, until now.

I have this problem with a macbook pro with Mojave 10.14.6, OpenZFS installed with brew (OpenZFS on OS X 1.9.4 Mojave.pkg).

By "disappears" here I don't mean "it's not imported", I mean actually, really disappears (no output at all from zpool import). The problem, on that particular machine at least (a macbook pro 13 unibody), and on that specific partition, is reproducible.
I create, I reboot, nothing is there anymore. diskutil list shows the pre-existing partition type, as if my zpool create command never happened (HFS+, for example).

It happens on a SSD partition (disk0s3). Other partitions are: disk0s1 -> EFI, disk0s2 -> APFS with the OS. There's also another internal disk (disk1, an HDD entirely devoted to ZFS), moreoever I use also a bunch of usb disks with ZFS. All other disks and pools work normally, without any issue.

For that partition only, whenever I reboot, disk0s3 reverts back to whatever was there before creating a ZFS pool in its place, be it a fat32 file system or a HFS one or whatever.

I've tried to search here and on the internet, but I found nothing and I got no idea about what's going on. My search results are obscured by people that cannot find their pool because it's not automatically imported, but this is not my case at all. This is not the only macOS machine on which I use ZFS - on a similar system I have exactly the same configuration, with a pool on a SSD partition and a pool on a whole disk.

Disclaimer: I posted this already on OpenZFS's github issues (probably not the best place for my problem in retrospective, I apologise for that, it occured to me only now that this forum would be better), and on StackExchange/Superuser, but no answer yet. I will report any info where I have already posted if it comes up (and close issues too, hopefully).

If anyone has any ideas about how to proceed, I would be grateful. Thanks in advance!
ggrocca
ggrocca
 
Posts: 2
Joined: Thu Jan 14, 2021 8:55 am

Re: Pool vanishes after reboot, partition is lost without tr

Postby jbelper » Tue Jan 26, 2021 4:04 pm

I've experienced this with on two different machines with 1.9.2 and 1.9.4 on Sierra and Catalina, respectively. Oddly, I've found rebooting helps. In some cases I had to reboot twice. Good luck!
jbelper
 
Posts: 2
Joined: Sat Jan 23, 2021 4:03 pm

Re: Pool vanishes after reboot, partition is lost without tr

Postby nodarkthings » Wed Jan 27, 2021 2:26 am

This resembles very much what I got when I forgot to change the partition type to bf01
(ZFS) using gdisk, after creating a pool on a slice! :o
A few years ago, it wasn't mandatory but now it is (for slices), which would explain why your pools created on an entire disk work and this one doesn't.
https://openzfsonosx.org/wiki/Zpool
https://sourceforge.net/projects/gptfdisk/
nodarkthings
 
Posts: 174
Joined: Mon Jan 26, 2015 10:32 am

Re: Pool vanishes after reboot, partition is lost without tr

Postby ggrocca » Sat Feb 13, 2021 9:14 am

Hi everyone, it's solved. Many many thanks @nodarkthings, you've pointed me in the right direction, the problem was indeed the one you described: I wasn't setting the partition type. For anyone who might stumble upon the same problem, I've posted a full solution here: https://superuser.com/questions/1616456/zfs-pool-on-internal-ssd-partition-disappears-after-reboot-pre-existing-partiti/
ggrocca
 
Posts: 2
Joined: Thu Jan 14, 2021 8:55 am

Re: Pool vanishes after reboot, partition is lost without tr

Postby nodarkthings » Sat Feb 13, 2021 10:45 am

Glad I could help! :) Great writing you've done at Superuser.
About your appendix: yes, if you created your pool when it was not mandatory, no problem even after you updated ZFS versions, that's how it took me so long to figure out where was the issue as it stroke only the recently created pools — at some point, another user pointed me to the gdisk thing... :mrgreen:

@lundman: I've always thought the wiki should be more specific about that, it only says "you are responsible for making sure the partition table shows the partition type is ZFS" in the middle of a paragraph, which can easily be missed by a novice — a fortiori if (s)he's a non native english speaking person like me. ;)
If you want me to rewrite that part of the wiki, I'll happily contribute. Just ask me.
nodarkthings
 
Posts: 174
Joined: Mon Jan 26, 2015 10:32 am


Return to General Help

Who is online

Users browsing this forum: Google [Bot] and 34 guests