auto mount on boot - 2.2.2 - Monterey

All your general support questions for OpenZFS on OS X.

auto mount on boot - 2.2.2 - Monterey

Postby z-fan88 » Fri May 24, 2024 12:40 pm

Hello:

After a long time away, I'm trying OpenZFS on MacOS again (I run ZFS on my Promox machine and other places).

The set up on an Intel 2013 Mac Pro, Montery (a fresh install of 12.7.5), went pretty well. A few strange things. I'll skip a few, but one was when creating a raidz-1 of four SSDs, disks defined like: /var/run/disk/by-serial/Samsung_SSD_860_EVO_500GB-<redactedSN>

It worked, but threw errors: cannot open '/private/var/run/disk/by-serial/Samsung_SSD_860_EVO_500GB-<redactedSN>': Operation not permitted (for all four drives).

Perhaps I can ignore that, since it created fine.

But it won't auto-mount on reboot. I have the pool mounted, reboot, and when the machine comes back Disk Utility offers to format each of the four drives for me (no thanks!) and the pool does not mount. The pool will mount if I just type sudo zpool import -a ... and if I search with sudo zpool import, it does name the pool as available for import.

In "Security and Privacy" under Full Disk Access I have the following listed and checked: sshd-keygen-wrapper, zpool, smbd, Terminal.

Thanks.
z-fan88
 
Posts: 8
Joined: Fri May 24, 2024 12:09 pm

Re: auto mount on boot - 2.2.2 - Monterey

Postby cgiard » Fri May 24, 2024 12:42 pm

You'll need to add bash to the list of what allowed for full disk access. That's one of the reasons I don't have auto mounting setup on my system, because allowing bash to have full disk access means any script someone gets onto the system can do just about anything to it. It would be much better if instead of scripts to do the auto mounting it was compiled binaries.
cgiard
 
Posts: 26
Joined: Sat Dec 20, 2014 8:10 am

Re: auto mount on boot - 2.2.2 - Monterey

Postby z-fan88 » Fri May 24, 2024 12:48 pm

Thanks cgiard. Is there a work-around to have the OS just ignore the disk instead of throwing up the offer to format the zfs member disks?

... it seems like one should be able to use Automator to make a script that can be compiled and that one thing could be allowed FDA?
z-fan88
 
Posts: 8
Joined: Fri May 24, 2024 12:09 pm

Re: auto mount on boot - 2.2.2 - Monterey

Postby cgiard » Fri May 24, 2024 1:07 pm

z-fan88 wrote:Is there a work-around to have the OS just ignore the disk instead of throwing up the offer to format the zfs member disks?


I think it will automatically ignore the disks if it is at least partitioned with a zfs partition type. If it was used as a raw disk I'm not sure what would need to be done.

z-fan88 wrote:... it seems like one should be able to use Automator to make a script that can be compiled and that one thing could be allowed FDA?


It would still need to at least call the zpool command, but since you have that listed it might work?
cgiard
 
Posts: 26
Joined: Sat Dec 20, 2014 8:10 am

Re: auto mount on boot - 2.2.2 - Monterey

Postby z-fan88 » Fri May 24, 2024 1:38 pm

Ah, yes, I set them up as whole disks. Maybe I'll try with partitions as you suggest. Thanks again.
z-fan88
 
Posts: 8
Joined: Fri May 24, 2024 12:09 pm

Re: auto mount on boot - 2.2.2 - Monterey

Postby z-fan88 » Wed May 29, 2024 3:10 am

Ok, interesting. I destroyed the pool, then connected the disks one by one to a linux system and blew out all the formatting. Using fdisk on Linux I GPT formatted the disks, created a 100MB partition 1 type Microsoft Data and the remainder partition 2 type zfs (aka solaris /usr if I recall correctly). Then I put the disks back on the mac and redid the pool defining the slices for ZFS to use as the partition 2's on all four disks.

Now not only does Disk Utility not complain about the disks at all upon boot, but the pool does auto-mount!

Success then I suppose!
z-fan88
 
Posts: 8
Joined: Fri May 24, 2024 12:09 pm

Re: auto mount on boot - 2.2.2 - Monterey

Postby jawbroken » Wed May 29, 2024 4:36 am

roughly this kind of setup happened automatically for me when just using OpenZFS on OS X and letting it format the disks. it doesn't see the drives as unformatted and throw up the message to format them, and in `diskutil list` they have an additional 8.4 MB slice as well as the ZFS one
jawbroken
 
Posts: 92
Joined: Wed Apr 01, 2015 4:46 am

Re: auto mount on boot - 2.2.2 - Monterey

Postby z-fan88 » Wed May 29, 2024 4:59 am

jawbroken wrote:roughly this kind of setup happened automatically for me when just using OpenZFS on OS X and letting it format the disks. it doesn't see the drives as unformatted and throw up the message to format them, and in `diskutil list` they have an additional 8.4 MB slice as well as the ZFS one


Yeah, the undesired behaviour I saw was probably due to the way I created the pool (by defining using disk/by-serial), though the first time I did call the whole disk not a partition. Do you remember how you defined the disks in your zpool create command? For example was it zpool create tank mirror /dev/disk1 /dev/disk2 or similar?
z-fan88
 
Posts: 8
Joined: Fri May 24, 2024 12:09 pm

Re: auto mount on boot - 2.2.2 - Monterey

Postby jawbroken » Thu May 30, 2024 5:13 am

my exact command was
Code: Select all
zpool create -f -o ashift=12 -O casesensitivity=insensitive -O atime=off -O normalization=formD estorage raidz2 disk6 disk8 disk9 disk10 disk13 disk14 disk15 disk16 disk18 disk21 disk24 disk25
jawbroken
 
Posts: 92
Joined: Wed Apr 01, 2015 4:46 am

Re: auto mount on boot - 2.2.2 - Monterey

Postby z-fan88 » Thu May 30, 2024 5:18 am

jawbroken wrote:my exact command was
Code: Select all
zpool create -f -o ashift=12 -O casesensitivity=insensitive -O atime=off -O normalization=formD estorage raidz2 disk6 disk8 disk9 disk10 disk13 disk14 disk15 disk16 disk18 disk21 disk24 disk25


Thanks!
z-fan88
 
Posts: 8
Joined: Fri May 24, 2024 12:09 pm


Return to General Help

Who is online

Users browsing this forum: No registered users and 9 guests

cron