On 7/3/06, Nicholas Senedzuk <[EMAIL PROTECTED]> wrote:
I am new to zfs and do not understand the reason that you would want to create a separate file system for each home directory. Can some one explain to me why you would want to do this?
because in ZFS filesystems are cheap, you can assign a quota or reservation for each user. you can see how much space they are using with df /export/home/username or zfs list username no more waiting for du -s to complete , you can make a snapshot of each users data/filesystem. I'm sure they are more but another time James Dickens uadmin.blogspot.com
On 7/3/06, James Dickens <[EMAIL PROTECTED]> wrote: > On 7/3/06, James Dickens <[EMAIL PROTECTED]> wrote: > > On 7/3/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > > > > > >> > > > >> Currently, I'm using executable maps to create zfs > > > >> home directories. > > > >> > > > >> Casper > > > > > > > > > > > >Casper, anything you can share with us on that? Sounds interesting. > > > > > > > > > It's really very lame: > > > > > > > > > Add to /etc/auto_home as last entry: > > > > > > +/etc/auto_home_import > > > > > > And install /etc/auto_home_import as executable script: > > > > > > #!/bin/ksh -p > > > # > > > # Find home directory; create directories under /export/home > > > # with zfs if they do not exist. > > > # > > > > > > hdir=$(echo ~$1) > > > > > > if [[ "$hdir" != /home/* ]] > > > then > > > # Not a user with a valid home directory. > > > exit > > > fi > > > > > > # > > > # At this point we have verified that "$1" is a valid > > > # user with a home of the form /home/username. > > > # > > > h=/export/home/"$1" > > > if [ -d "$h" ] > > > then > > > echo "localhost:$h" > > > exit 0 > > > fi > > > > > > /usr/sbin/zfs create "export/home/$1" || exit 1 > > > > another way to do this that is quicker if you are executing this often > > is create a user directory with all the skel files in place, snapshot > > it, then clone that directory and chown the files. > > > > zfs snapshot /export/home/[EMAIL PROTECTED] export/home/$1 ; chown -R /export/home/$1 > > > oops i guess i need more coffee > > zfs clone /export/home/[EMAIL PROTECTED] export/home/$1 ; chown -R /export/home/$1 > > > James Dickens > > uadmin.blogspot.com > > > > > > > > > > cd /etc/skel > > > umask 022 > > > /bin/find . -type f | while read f; do > > > f=$(basename $f) > > > # Remove optional local prefix /etc/skel files. > > > f="$h/${f##local}" > > > cp "$f" "$t" > > > chown "$1" "$t" > > > done > > > > > > chown "$1" $h > > > > > > echo "localhost:$h" > > > exit 0 > > > > > > _______________________________________________ > > > zfs-discuss mailing list > > > zfs-discuss@opensolaris.org > > > http://mail.opensolaris.org/mailman/listinfo/zfs-discuss > > > > > > _______________________________________________ > zfs-discuss mailing list > zfs-discuss@opensolaris.org > http://mail.opensolaris.org/mailman/listinfo/zfs-discuss >
_______________________________________________ zfs-discuss mailing list zfs-discuss@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/zfs-discuss