zfs home directories best practice

Bob Friesenhahn bfriesen at simple.dallas.tx.us
Thu Apr 4 02:31:19 UTC 2013


On Tue, 2 Apr 2013, Graham Allan wrote:

> We're building a new NFS home directory server on FreeBSD with ZFS. The 
> Solaris ZFS Best Practices docs say to create a separate filesystem for each 
> user home directory. My instinct is to ask "Are you serious???". My gut 
> feeling isn't entirely logical but the idea of getting 1000+ lines of output 
> from a simple "df" just feels wrong...
>
> Can anyone comment about how well this approach actually works, specifically 
> on FreeBSD? (we're running 9.1) Obviously it has some nice features, such as 
> quota controls, snapshots directly available to users within their home, etc, 
> but it leaves me concerned. I chatted with some neighbors who have a larger, 
> Solaris-based shop, and they said that with 10,000 user home filesystems, 
> their server could take an hour to boot (at least using the default startup 
> scripts). They reverted to having one big shared filesystem for all, but 
> would like to revisit the per-user approach with fewer users per server.

As others have said, the NFS export is where the time gets expended. 
It is not necessary to have zfs do the exports for you.

There is indeed value to each user having their own home directory. 
The 1000+ lines of output from 'df' is quite useful if it tells you 
exactly how much space each user has consumed so that you don't have 
to do something really evil like run 'du' in each directory to find 
the hogs.  The ability to snapshot filesystems on a per-user basis is 
quite useful.

Probably I shouldn't be answering since I have only used this at a 
small scale with a Solaris server (but with a FreeBSD client).

Having a good NFS automounter on the clients is useful if you have a 
home directory per user.  The AMD automounter which comes with FreeBSD 
is just barely competent for the task.  It is able to automount user 
home directories on request but not enumerate them via 'ls /home/*' as 
Solaris and Apple OS X clients can.  It will only list the currently 
automounted directories.

Bob
-- 
Bob Friesenhahn
bfriesen at simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/


More information about the freebsd-fs mailing list