Have OS X wait for ZFS during boot

Developer discussions.

Have OS X wait for ZFS during boot

Postby stefa.rossi » Sat Sep 12, 2015 9:44 am

Hello everybody,

my home folder is on ZFS. I was wondering, would it be possible to make OS X wait for all the pools to be imported and mounted, before presenting the login screen?
stefa.rossi
 
Posts: 2
Joined: Sat Sep 12, 2015 9:42 am

Re: Have OS X wait for ZFS during boot

Postby Brendon » Sat Sep 12, 2015 3:11 pm

Not so far as we know unfortunately. There is definitely a bit of inconvenience, that I understand! I have taught my family to wait until the raidz array where our home directories reside to settle down before attempting to log in.

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

Re: Have OS X wait for ZFS during boot

Postby stefa.rossi » Thu Nov 05, 2015 11:05 am

That's a good starting point, thank you!

I already have a script, written in Python, that checks if all ZFS filesystem are mounted by calling 'zfs list' and checking if the mountpoints are mounted. Maybe I can modify the plist to run that script instead, and make the script call '/System/Library/CoreServices/loginwindow.app/Contents/MacOS/loginwindow' once ZFS is done mounting...
stefa.rossi
 
Posts: 2
Joined: Sat Sep 12, 2015 9:42 am

Re: Have OS X wait for ZFS during boot

Postby Brendon » Thu Nov 05, 2015 12:17 pm

I will be interested to hear of your progress in this regard.

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

Re: Have OS X wait for ZFS during boot

Postby bhagaban » Mon Nov 30, 2015 6:35 am

Hello every body,

I changed the name filed of strlcpy(vfe.vfe_fsname, "zfs", MFSNAMELEN); to strlcpy(vfe.vfe_fsname, "zss", MFSNAMELEN);
To get the file system name as zss. But when checked the mount command . pool is still showing as zfs instead of zss.
Which file i need to change to get the name as zss instead of zfs.

Bhagaban
bhagaban
 
Posts: 22
Joined: Mon Nov 30, 2015 6:31 am

Re: Have OS X wait for ZFS during boot

Postby ilovezfs » Mon Nov 30, 2015 7:59 am

ilovezfs
 
Posts: 232
Joined: Thu Mar 06, 2014 7:58 am

Re: Have OS X wait for ZFS during boot

Postby lundman » Mon Nov 30, 2015 4:19 pm

I think we also set it a bit further down, in vfs_getattr, in the same file.
User avatar
lundman
 
Posts: 1335
Joined: Thu Mar 06, 2014 2:05 pm
Location: Tokyo, Japan

Re: Have OS X wait for ZFS during boot

Postby bhagaban » Mon Dec 21, 2015 3:27 am

How to create a raw storage pool using virtual devices, and no mounted file system on it.
bhagaban
 
Posts: 22
Joined: Mon Nov 30, 2015 6:31 am

Re: Have OS X wait for ZFS during boot

Postby lundman » Wed Dec 23, 2015 3:52 am

Create a zpool data pool, whichever way you prefer:

Code: Select all
zpool create BOOM diskX


then set the pool's dataset to not mount:

Code: Select all
zfs set mountpoint=manual BOOM


Then create virtual block devices in the pool
Code: Select all
zfs create -V 100G BOOM/virtual1


Where you replace 100G with whatever size you actually want, and "virtual1" with whatever name you want. This will create another diskX virtual disk
User avatar
lundman
 
Posts: 1335
Joined: Thu Mar 06, 2014 2:05 pm
Location: Tokyo, Japan

Re: Have OS X wait for ZFS during boot

Postby bhagaban » Wed Dec 23, 2015 8:47 am

Hi,

I have created below 3 dsk files as raw image files. and i want to add them to a storage zpool.

mkfile -n 1g test1.dsk

mkfile -n 1g test2.dsk

mkfile -n test33.dsk


Now i want to creata a single pool which is consist of above the dsks

and can I mount any file systems other then zfs on that pool

any suggestions would be great.

Bhagaban
bhagaban
 
Posts: 22
Joined: Mon Nov 30, 2015 6:31 am

Next

Return to OpenZFS on OS X Development

Who is online

Users browsing this forum: No registered users and 12 guests

cron