Force zfs mount status (or show mount info) on logon screen?

All your general support questions for OpenZFS on OS X.

Force zfs mount status (or show mount info) on logon screen?

Postby Sigmoid » Mon Feb 06, 2017 7:01 am

So I've realized the root of my problems in trying to use a home folder on ZFS in the past - the file system is kinda slow to mount, and I tried to log on when the home folder wasn't available. For some reason, in some way, this seemed to corrupt the user data, and things got permanently weird afterward.

So... I'm wondering if it's at all possible to either force all automounted volumes (including the zfs pool) to mount before showing the logon promtp, or at least show some indication of whether it's mounted or not... The time it takes can be really random, from almost immediate to two minutes after logon (based on experiences with a home folder on HFS+ and a Documents folder symlinked to ZFS...)

I'm sure this is something a lot of people have run into before... :)
Sigmoid
 
Posts: 12
Joined: Thu May 01, 2014 10:18 am

Re: Force zfs mount status (or show mount info) on logon scr

Postby abc123 » Mon Feb 06, 2017 7:05 am

Not sure about a delay but I work around I used was to have another user account with the home folder on the HFS partition. I'd log in as that user, which would prompt me for my password for the encrypted core-storage volume I had the zpool on which would then mount the zpool. I'd then log out and log in as the user with the home folder on the zpool.

This was necessary for me though because the zpool was on an encrypted core-storage volume so I needed to unlock it before I could log in anyway.

Thanks

Russell
abc123
 
Posts: 63
Joined: Mon Jan 30, 2017 11:46 pm

Re: Force zfs mount status (or show mount info) on logon scr

Postby JasonBelec » Mon Feb 06, 2017 7:43 am

Why not just put the log in image icon that your using on the ZFS partition. That way, when it appears you know its safe to log in.
JasonBelec
 
Posts: 32
Joined: Mon Oct 26, 2015 1:07 pm

Re: Force zfs mount status (or show mount info) on logon scr

Postby nodarkthings » Thu Feb 09, 2017 2:59 pm

When I was on PPC Macs It was a good move to put your Users folder on a different partition or drive but ever since I switched to Intel Macs I had random problems connecting to my home folder and discovered that the partition was not mounting fast enough for the OS, like what you're experiencing.
I abandoned that option long ago.
I rather put all the big stuff on another drive or partition (with symlinks if needed) and leave Users on the OS partition, as naked as possible.
With HFS+, you can edit /private/etc/fstab to set mounting priority and this could help. For ZFS, I've got no idea if you can manage a similar thing...
nodarkthings
 
Posts: 174
Joined: Mon Jan 26, 2015 10:32 am

Re: Force zfs mount status (or show mount info) on logon scr

Postby neweralexwasserman » Thu Feb 09, 2017 6:55 pm

It's irritating when slow. I've noticed if there was a scrub running when I shutdown it takes much longer to remount.

Normally I can tell based just on drive noise.

I also keep a spare admin user with a home directory in /adminuser specifically off ZFS, as my /Users is mounted from ZFS. That way I have a user that's always safe to use.

I also SSH from my phone as that admin account and run a quick zfs mount if I'm being paranoid.

I did mess around for a while with launchd scripts to test ideas like making a noise once it's mounted, but didn't think it worth it in the end.
neweralexwasserman
 
Posts: 3
Joined: Wed Feb 08, 2017 7:08 pm

Re: Force zfs mount status (or show mount info) on logon scr

Postby neweralexwasserman » Fri Feb 10, 2017 12:27 am

This started annoying me after it was mentioned here - funny that.

So, I ripped off an Apple tutorial on login screen helper apps to create this: https://github.com/alexwasserman/ZFSLoadCheck

Apple Tutorial: https://developer.apple.com/library/con ... lementID_2

It checks for the presence of $USERS/.zsfloadcheck

Basically, if that's there, it knows that your $USERS is coming from ZFS. It checks every 5 seconds.

screen shot 2017-02-10 at 3.27.26 am.png
screen shot 2017-02-10 at 3.27.26 am.png (9.53 KiB) Viewed 5861 times


It actually quits automatically when you login, but the button is there if you want to kill the window on your login screen.
neweralexwasserman
 
Posts: 3
Joined: Wed Feb 08, 2017 7:08 pm


Return to General Help

Who is online

Users browsing this forum: No registered users and 30 guests