A peculiarity with Nomad - two home directories

After installing NomadBSD to the SSD on my laptop, I find there are two home directories: /home and /usr/home. Both are actual directories and not sym linked. All my user data is contained under /home and /usr/home is empty. As /usr/home is an actual zfs dataset and /home is simply a directory under /, I decided to change my user home directory (chpass) to /usr/home/myusername, move everything over from /home and delete the /home directory. Sounds simple, huh?

Didn’t work. I just didn’t think it out before I tried it. All the applications, including the desktop are configured based on /home. Anybody know why the developers did it that way? Seems to me that it would be reasonable to put the actual home directory under /usr/home, which is traditional FreeBSD, since they actually created a zfs dataset there, rather than putting all user data under /home which is just a directory under the root directory. Seems like it would be a better setup all the way around to have user data on a separate dataset from root.

1 Like

Good catch!

Instead of deleting /home, have you tried to replace it with a link to /usr/home?

[Edit]
Just booted up a NomadBSD-USBstick (my installations are also ZFS-installations on SSD).
On the USBstick /home is a link to /data/home/ (/data doesn’t exist on a ZFS-installation).
So I think it is an error in the ZFS installation script to make a /home-folder and not a link to /usr/home

I tried that, but didn’t get it right. Kept adding a second layer of home directory, ie. /user/home/home. When I get a little time I’ll figure it out, but for now it’s not a problem.

I’m still trying to eliminate one home directory. I have tried to copy /home over to /usr/home, then deleted /home and link /usr/home to /home, but not all the hidden files will copy over and once done, various things no longer work.

I tried:

ln -s /usr/home /home

and it links, but then I still have both directories and nothing is stored in /usr/home. I destroyed /usr/home:

sudo zfs destroy zroot/usr/home

and that worked, but then I don’t have a separate pool for my /home directory, as it’s still mounted on root.

What I really would like to see is everything copied to /usr/home, delete /home, and sym link /usr/home to /home so that Nomad still functions as originally configured.

The files that would not copy over to /usr/home are:

tony@NomadBSD$ sudo cp -rp /home/* /usr/home
cp: /home/tony/.local/share/akonadi/socket-NomadBSD-default: No such file or directory
cp: /home/tony/.thunderbird/rycilolo.default-release/lock: No such file or directory
cp: /home/tony/.mozilla/firefox/ulunejqu.default-esr-1649789645164/lock: No such file or directory

I don’t understand why these files would show as errors if they don’t exist.

OK. I figured out the copy problem. There is no -r option in cp. The correct code is:

sudo cp -Rp /home/* /usr/home

which worked perfectly. I was also able to remove the /home directory and all subdirectories/files, but upon reboot, it is restored. The link exists (/home → /usr/home) but I now have two complete /home directories including all user data. The link works, so I have a duplicate home directory. The question I now have is whether /usr/home is actually storing data on the zroot/usr/home volume. I’m not sure which direction the link is operating. Everything is still working, though, so I’ll leave it alone for now.

# df

is now showing that /usr/home has data in it, so I guess that’s my answer to where the data is being stored.

Just an update to this thread. I started having problems with some applications, particularly FreeCAD, OpenScad, and kdenlive, which I installed via pkg install. I think it was related to my attempt to solve the two-home-directories issue detailed above. I have since made a fresh install of Nomad and have resolved to just live with the two home directories. Everything is working correctly now, so I’m going to leave good enough alone.

Maybe one of the devs will read this thread and make changes to the install scripts to fix the issue.

1 Like