ZFS shared with NFS makes directory cover filesystem

I'm having a strange issue that I'm unsure what to do with. I have a new Solaris home server that I want hard mount /home to all our servers. I've made each user's home directory a filesystem so that I can manage every user with a quota. In each one of my server vfstab files I have it set as:

home-server:/DATA/home /home nfs - yes bg,rw, soft

The zpool is called DATA with a filesystem called home and each users home directory is a filesystem under that. So for example one could be /DATA/home/homer on the home server that would mount /home/homer when a user logs in to any server.

The issue is that when I log into a server, a new directory (not filesystem) is created with the exact same name on the home server under /DATA/home and it ignores that there is a filesystem there already. It's like a directory is created and it masks the users home filesystem. On the home server, I have to "zfs unmount DATA/home/homer" and then I can delete the directory that was created. I don't want to have to create a line for each user on each server's vfstab file, so is there a whilecard or something that I need to add?

I don't have this issue when I use automount. I don't like using automount because I sometimes have issues with it screwing up with LDAP and I have to login as root and restart it.
Thanks for the help!

What's in /etc/auto_master on your NFS client systems?

And don't use soft unless you like data corruption - there are way too many applications coded that can't properly handle the intermittent IO errors that the soft option can result in.

Thanks for the response and the tip on soft mounting achenle. I guess I should replace "soft" with "hard" instead?

As for the automount that works, this is what I have.

#/etc/auto_master
/home /etc/auto_home -rw

And for the home file I have:

#/etc/auto_home
*    home-server:/DATA/home/&

Is the automount service online on your NFS clients?

When you explicitly mount home_server:/DATA/home on the client at /home, you're conflicting with the automount service if it's online. I don't recall offhand what happens if you do that.

On your home server, what do you see at /DATA/home if you unmount all the user file systems? That's what gets mounted on the clients when you mount home_server:/DATA/home there. No file systems mounted under the file system shared by NFS are implictly exported from the server, and even if they're explicitly exported from the server they won't be mounted on the client, although some NFSv4 clients will silently mount such nested file systems.

Thank you Achenle, that's a good point. I'm going to test this tomorrow and I'll come back and post the results. :slight_smile: