ZFS Replace /home with /Users in zfs pool

So I installed a fresh system using ZFS with my home directory at /Users/joshua (I'm also a MacOS user so it feels familiar lol) and I noticed that /home still exists and is set in zroot. I suppose that's normal because the system probably assumes that other users would have their homes there, but in my case they would also go to /Users. Is there a way that I can safely remove /home and fix ZFS to use /Users in its place? I like what ZFS offers, but I don't really know how it works yet. I appreciate any advice you guys have to offer!

Here's my ZFS pool:
Code:
NAME                 USED  AVAIL  REFER  MOUNTPOINT
zroot               8.38G   220G    96K  /zroot
zroot/ROOT          8.37G   220G    96K  none
zroot/ROOT/default  8.37G   220G  8.37G  /
zroot/home            96K   220G    96K  /home
zroot/tmp            140K   220G   140K  /tmp
zroot/usr            288K   220G    96K  /usr
zroot/usr/ports       96K   220G    96K  /usr/ports
zroot/usr/src         96K   220G    96K  /usr/src
zroot/var            784K   220G    96K  /var
zroot/var/audit       96K   220G    96K  /var/audit
zroot/var/crash       96K   220G    96K  /var/crash
zroot/var/log        264K   220G   264K  /var/log
zroot/var/mail       136K   220G   136K  /var/mail
zroot/var/tmp         96K   220G    96K  /var/tmp


EDIT: I managed to unmount /home in zroot and removed the directory. Not gonna lie, I'm a little scared to reboot at the moment lol

I guess at this point I just need to remount it at /Users. I'm not sure how it would react to having my home directory already in there when I try to mount it. I may have to move /Users/joshua elsewhere (as another user), mount home at /Users and move ./joshua back into place?
 
/home was the mountpoint for the zroot/home dataset. How did you remove it? Exact commands you used.

Right now your /Users is just a directory under the zroot dataset.
what is the current output of the zfs list command?

If the zroot/home dataset has not been deleted, you should be able to:
mv /Users /OldUsers
zfs set mountpoint=/Users zroot/home
cp -R /OldUsers/joshua /Users
rm -rf /OldUsers

If the zroot/home dataset has been deleted:
zfs create -o mountpoint=/Users zroot/Users
cp -R /OldUsers/joshua /Users
rm -rf /OldUsers
 
I just unmounted zroot/home with ‘zfs unmount /home’ and ran 'rm -r /home' so maybe not? It seemed to work after a few times looking at ‘zfs -h’.
Below is they output of 'zfs list' ran just now so it looks like it's still there.

Code:
zroot               8.41G   220G    96K  /zroot
zroot/ROOT          8.41G   220G    96K  none
zroot/ROOT/default  8.41G   220G  8.41G  /
zroot/home            96K   220G    96K  /home
zroot/tmp            140K   220G   140K  /tmp
zroot/usr            288K   220G    96K  /usr
zroot/usr/ports       96K   220G    96K  /usr/ports
zroot/usr/src         96K   220G    96K  /usr/src
zroot/var            784K   220G    96K  /var
zroot/var/audit       96K   220G    96K  /var/audit
zroot/var/crash       96K   220G    96K  /var/crash
zroot/var/log        264K   220G   264K  /var/log
zroot/var/mail       136K   220G   136K  /var/mail
zroot/var/tmp         96K   220G    96K  /var/tmp

I'm going to try the instructions for if it has not been deleted
 
XFCE won’t launch now so I’m responding from my phone. I logged into a shell and ‘zfs list’ reports that zroot/home is mounted at /Users and my home folder is back in place. Aside from XFCE not launching, everything looks good.
 
I installed mate-base to see if it was just XFCE or Xorg as a whole and I got permission errors from dbus and caja. It seems like I don’t have full permissions
 
When I run ‘echo $HOME’ it returns ’/‘. I double checked /etc/passwd and the field for home says ‘/Users/joshua’. I imagine that’s probably causing some kind of issue
 
Back
Top