ZFS during boot?

All your general support questions for OpenZFS on OS X.

ZFS during boot?

Postby forquare » Fri Feb 12, 2016 3:10 am

Good morning all,

I have an old 2009 Mac Pro that I use for a home server. It boots El Capitan from a USB stick and the four internal drives are configured into a RAIDz.

On the RAIDz I have some VirtualBox virtual machines, and everything works great when the Mac is up and running. One of the VMs I run I use as a server providing various other services, and this should start during boot (via launchd as described in the VirtualBox manual). However, because the ZFS volumes don’t seem to be discovered until a user logs in the VM does not start when the Mac Pro is rebooted.

Auto-login is already being used for a separate user (for iTunes Home Sharing), and I’m pretty sure I can’t have multiple users auto-login…?

Is there a way, perhaps as part of the launchd service that starts my VM, to discover and mount ZFS volumes during boot?

Many thanks,
Ben
forquare
 
Posts: 8
Joined: Thu Oct 15, 2015 7:16 am

Re: ZFS during boot?

Postby forquare » Tue Mar 08, 2016 4:22 am

Would anyone be able to supply/point me to an overview of how ZFS is loaded/started on OS X? I've had a look around the Wiki but can't find anything about the process...
forquare
 
Posts: 8
Joined: Thu Oct 15, 2015 7:16 am

Re: ZFS during boot?

Postby Brendon » Tue Mar 08, 2016 12:11 pm

The ZFS kexts are loaded at boot by the OS. There is an auto-import script run by launchd which imports/mounts the filesystems. The ZFS filesystems can take a while to be imported, which may lead to the incorrect assumption that they are not available until a user logs in.

Brendon
Brendon
 
Posts: 286
Joined: Thu Mar 06, 2014 12:51 pm

Re: ZFS during boot?

Postby forquare » Tue Mar 08, 2016 12:23 pm

Interesting, thank you Brendon.

I was looking for a way to perhaps make the VirtualBox boot job depend on ZFS, but it seems that Launchd isn't designed for that….

Back to the drawing board!
forquare
 
Posts: 8
Joined: Thu Oct 15, 2015 7:16 am

Re: ZFS during boot?

Postby Brendon » Tue Mar 08, 2016 4:26 pm

You could add content to our script after the import?
Brendon
 
Posts: 286
Joined: Thu Mar 06, 2014 12:51 pm

Re: ZFS during boot?

Postby forquare » Wed Mar 09, 2016 2:00 pm

Oh that's very true! I'll take a look into it when I have time :D

Many thanks for your help!
forquare
 
Posts: 8
Joined: Thu Oct 15, 2015 7:16 am


Return to General Help

Who is online

Users browsing this forum: No registered users and 24 guests