How can I export many ZFS filesystem with NFS?

I've created 3 home folders with the [CMD=""]zfs create[/CMD] command

Code:
/tank/home/olav
/tank/home/test
/tank/home/james

If I try to export /tank/home with NFS I get all those three home folders. But all of them are empty while there are many files in the ZFS filesystem. If I create a new file or folder in one of those home folders it doesn't show up in the ZFS filesystem either?

What is really happening? What am I doing wrong?
This my export line:
Code:
/tank/home -maproot=0 -network 192.168.1.0 -mask 255.255.255.0
 
You've to export each file system in your /etc/exports separately:
Code:
/tank/home/olav -maproot=0 -network 192.168.1.0 -mask 255.255.255.0
/tank/home/test -maproot=0 -network 192.168.1.0 -mask 255.255.255.0
/tank/home/james -maproot=0 -network 192.168.1.0 -mask 255.255.255.0
 
Do I really have todo that? :(
Are there no other way around this?

It would be extremly difficult to maintain if there are thousands of users.
 
olav said:
Do I really have todo that? :(
Yes. From exports(5):
Each line in the file (other than comment lines that begin with a #) specifies the mount point(s) and export flags within one local server file system or the NFSv4 tree root for one or more hosts.

Are there no other way around this?
Don't create a separate filesystem per user.
 
Back
Top