Re: [zfs-discuss] Questions from a windows admin - Samba, shares & quotas

2007-11-23 Thread Ross
Yeah, I'd seen that, but we're only going to be running 100 users so the boot 
time shouldn't be too bad. :-)
 
 
This message posted from opensolaris.org
___
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss


Re: [zfs-discuss] Questions from a windows admin - Samba, shares & quotas

2007-11-23 Thread Akhilesh Mritunjai
Yes it will work, and quite nicely indeed. But you need to be careful.

Currently ZFS mounting is not "instantaneous", if you have like say 3 
users, you might be for a rude surprize as system takes its own merry time (~ 
few hrs) mounting them at next reboot. Even with auto mounter, things won't be 
so fast.

ZFS philosophy of "helluva tons of filesystems" breaks a lot of tools made with 
assumption of "who would ever need more than 4 filesystems ?".

To test it, create $NUM_USERS filesystems, reboot the server and see if 
everything comes up ok and in acceptable time.
 
 
This message posted from opensolaris.org
___
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss


Re: [zfs-discuss] Questions from a windows admin - Samba, shares & quotas

2007-11-22 Thread Ross
Well, it looks like I've solved the question of whether you can auto-create the 
folders.  There's a nice little samba script that you can add to the share to 
do it for you:

>From http://www.edplese.com/samba-with-zfs.html

Samba's root preexec share parameter can really come in handy when setting up 
user home directories. Here we tell it to automatically create a ZFS filesystem 
for every new user, set the owner, and set the quota to 1 GB. This can easily 
be expanded to other filesystem properties as well.

Create a file /usr/bin/createhome.sh:

#!/usr/bin/tcsh
if ( ! -e /tank/home/$1 ) then
  zfs create tank/home/$1
  chown $1 tank/home/$1
  zfs set quota=1G tank/home/$1
endif

Modify smb.conf and modify [homes] to resemble:

[homes] 
  comment = User Home Directories 
  browseable = no 
  writable = yes
  root preexec = /usr/bin/createhome.sh '%U'
 
 
This message posted from opensolaris.org
___
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss


[zfs-discuss] Questions from a windows admin - Samba, shares & quotas

2007-11-22 Thread Ross
Hey folks,

This may sound a little crazy, but I'm a long time windows admin planning on 
rolling out a Solaris server to act as our main filestore, and I could do with 
a bit of advice.

The main reason for switching is so we can use snapshots.  With Samba and 
Microsoft's Shadow Copy Client we can backup everybody's files and give users 
the power to restore files themselves.  That plus the other benefits of ZFS 
mean we're seriously looking into this.  However, there are one or two side 
effects...

I'm more than a little concerned about how we go about creating user profiles 
and managing quotas.  On a windows server this is easy.  As you create a user 
account the appropriate folders are created for you.  So long as you have the 
right permissions on the parent folder, all those folders inherit their 
permissions automatically, and since quotas work per user, that's automatic too.

The question is, can I do anything to automate all this if I move to Solaris?

We've got to use ZFS to get the benefits, but that doesn't have user quotas so 
I'll have to script the creation of a filesystem for each user.  First of all, 
if I have multiple filesystems, can I still share those out under one path?  
ie:  each user has a home folder of \\server\share\username, can I still do 
that when every 'username' is a separate filesystem?

Then, if that's possible, is there any way I can make the creation of these 
filesystems automatic?   What I'm thinking is that I'll need a parent 
filesystem for these to inherit quota settings from, and that will be the 
'share' location above.  Now, when windows creates user accounts, it will 
automatically create subfolders in that parent filesystem to act as home 
directories.  Would I be able to write a script to watch that filesystem for 
new subfolders and have it automatically delete the subfolder and create a 
filesystem in it's place?

And can I set permissions on a filesystem?  Could the script to that too?

If it works, while it may be a bit messy, there will actually be some 
advantages over the windows quota system.  In windows, the quota is set by 
ownership of the file.  If users move files between each other for any reason, 
or an admin has to take ownership to change permissions that can get messed up, 
and it's nigh on impossible to find out where all your space has gone if that 
happens.
 
 
This message posted from opensolaris.org
___
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss