Community

Subscribe
Highlighted
Accepted Solution

Users home directories and quotas

I need to migrate a bunch of users home directories onto our FAS2240

Currently they are all folders within a hidden share off our main fileserver and each folder has permissions set so only that  the user can only access their own  folder. Each user has a 10GB quota.

I have been looking at using the cifs_homedir.cfg and specifying ntname for the naming convention but I cannot work out how to apply a quota that will apply to each user.

Could somebody point me in the correct direction ?

Thanks

Andrew

Re: Users home directories and quotas

Hi Andrew,

here is my working example. Replace *DOMAIN_NAME* with your Windows Domain Name:

create qtree /vol/userhome/*DOMAIN_NAME*

/etc/cifs_homedir.cfg:

/vol/userhome/*DOMAIN_NAME*

/etc/quotas is attached.

Default Quota is set to 1GB. Exceptions needs to be configured afterwards.

Set home dirs hidden:

FILER> options cifs.ho   

options cifs.home_dir_namestyle      hidden    

options cifs.home_dirs_public_for_admin on

Enjoy!

Florian

Re: Users home directories and quotas

About Permissions:

Admin has to set change permission for user1 to /vol/userhome/*DOMAIN_NAME*/user1.

Note: only user1 can get access to \\filer\user1$. Users who already mapped a share from \\filer are not able to map share \\filer\user1$ even if they use user1's credencials. This is a great feature of NetApp home_dir implementation.

Enjoy!

Re: Users home directories and quotas

Ok thanks I think i understand now.

So for the quota to apply to a user I need to add each user to the quota file ?  Is there a way to do that automatically ?

Re: Users home directories and quotas

Simply you set the default quota fitting to your needs. For me 1GB is perfect. See line 6 in /etc/quotas.

Re: Users home directories and quotas

Ahh of course, I was not reading it correctly.

Thank you.

Re: Users home directories and quotas

Hmm I have this configured and tested it for my user.  However the hard limit is not being applied as I can happily copy more than my quota into my home directory. Any clues what could be wrong ? I don't see any usage against the quota in quota report

Re: Users home directories and quotas

Hi Andrew,

1) is quota enabled for this volume?

quota status

quota on userhome

2) every time you change quotas file execute:

  quota resize userhome

3) query quota settings and usage:

  report quota

Re: Users home directories and quotas

my report looks like this.

                                 K-Bytes             Files

Type       ID    Volume    Tree  Used      Limit     Used    Limit   Quota Specifier

----- -------- -------- -------- --------- --------- ------- ------- ---------------

user         * vol_tt_homes        -         0  10485760       0       - *

user  \ukawood vol_tt_homes        -         0   5120000       0       - ukawood

user  \Adminis vol_tt_homes        -   7044272         -       9       -

which looks to me like the files are counting towards the Administrators quota rather than mine since the 2 files add up to just over 7GB. NT permissions are set for me as owner and read/write access.

Re: Users home directories and quotas

ok I figured it out. My user account is a member of a group that is itself a member of the BUILTIN\Administrators group. It seems that this means any files I write to the filer has the owner set to the BUILTIN\Administrator group so quotas are not applied.

Is there any way I can stop this behavior ?