Page 1 of 1

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

PostPosted: Mon Feb 06, 2017 7:01 am
by Sigmoid
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... :)

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

PostPosted: Mon Feb 06, 2017 7:05 am
by abc123
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

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

PostPosted: Mon Feb 06, 2017 7:43 am
by JasonBelec
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.

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

PostPosted: Thu Feb 09, 2017 2:59 pm
by nodarkthings
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...

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

PostPosted: Thu Feb 09, 2017 6:55 pm
by neweralexwasserman
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.

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

PostPosted: Fri Feb 10, 2017 12:27 am
by neweralexwasserman
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 8273 times


It actually quits automatically when you login, but the button is there if you want to kill the window on your login screen.