Latest interface: 0.3.1
Latest system: 010
Oko
User

1 posts

Posted on 24 November 2017 @ 17:04edited 17:05 31s
I just spent whole afternoon playing with the new file server I am about to deploy in a very small startup and I have a serious problem.

Based on my previous experience in managing ZFS based file servers in Linux/UNIX computing environment I decided this time around to use a separate data sets for users' home directories. Namely that enables me to set quota per user and easily destroy the home directories of rogue users. It also allows people to search [FILE].zfs/snapshots[/FILE] directory without my assistance and much more if I want.

So I have created a ZFS pool [FILE]storage[/FILE] and a level 1 data set called [FILE]lab[/FILE]. On the top of [FILE]lab[/FILE] I created three level 2 data sets called project, data, and home. And on the top of the home I created few test home directories. So the output of [CMD]zfs list[/CMD] command looks something like

[CODE]
root@hera:~ # zfs list
NAME USED AVAIL REFER MOUNTPOINT
storage 1.17M 3.51T 96K /storage
storage/lab 528K 3.51T 88K /storage/lab
storage/lab/data 88K 3.51T 88K /storage/lab/data
storage/lab/home 264K 3.51T 88K /storage/lab/home
storage/lab/home/usr1 88K 512G 88K /storage/lab/home/usr1
storage/lab/home/usr2 88K 512G 88K /storage/lab/home/usr2
storage/lab/project 88K 3.51T 88K /storage/lab/project
[/CODE]


Ideally I would like to be able to put something like
[CODE]
/storage/lab -alldirs -network 192.168.1.0/24[/CODE]
into the [FILE]/etc/exports[/FILE] and just to mount everything on a Linux computing node with a command

[CODE]mount -t nfs hera:/storage/lab /zfs
[/CODE]
Unfortunately as many of you know NFS version 3 will prevent me from seeing

[CODE]/zfs/lab/home/usr1
/zfs/lab/home/usr2 [/CODE]
folders on the target machine. I can see level 2 data sets i.e folders

[CODE]
/zfs/project
/zfs/home
/zfs/data
[/CODE]

If I don't use a data sets for user directories and if I mount parent data set [FILE]/storage/lab/home[/FILE] everything works as expected. I tried to play with NFSv4 but the results are similar. I should also say that I am using "classical" way to do NFS export. Means that I didn't alter [CMD]sharenfs=off[/CMD]. I tried to play with those properties as well but no avail. It looks like I have a very similar problem to this guy

http://zfsguru.com/forum/zfsgurudevelopment/516

Short of me having a script which will mount each user directory on the computing node just like the post 3 is suggesting is there an elegant way to have each user directory as a separate data set and to mount them recursively without need to specify absolute path of each home dataset in the export file? I am OK if somebody shows me how to do this with NFSv4 although I must admit I am not thrilled to use that protocol. My main concern is that I don't want to have 30+ exports mounted on 10 different machines.
Last Page

Valid XHTML 1.1