Network and Storage Protocols

Users home directories and quotas

TRYAREBOOT
14,320 Views

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

1 ACCEPTED SOLUTION

fschafhauser
14,312 Views

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

View solution in original post

16 REPLIES 16

fschafhauser
14,313 Views

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

fschafhauser
14,253 Views

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!

TRYAREBOOT
14,253 Views

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 ?

fschafhauser
14,254 Views

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

TRYAREBOOT
14,254 Views

Ahh of course, I was not reading it correctly.

Thank you.

TRYAREBOOT
14,254 Views

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

fschafhauser
14,254 Views

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

TRYAREBOOT
14,254 Views

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.

TRYAREBOOT
14,254 Views

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 ?

aborzenkov
11,174 Views

Not that I know of. This is standard Windows behavior.

TRYAREBOOT
11,174 Views

Not sure I would call it standard windows behavior. Windows usually sets ownership to be the the User rather than a group the user happens to be in.  It looks to me like the NetApp is purposefully setting the owner to be the id of the Administrators group rather than the id of the user writing the file.

aborzenkov
11,174 Views

Unless user is in Administrators group. Then all created files belong to this group.

fschafhauser
11,174 Views

Hi Andrew,

it is important with which user you have had the first contact with the filer. Try to reboot and do the first share mapping with your user, not administrator. Then it should work correctly.

regards

Florian

CHRISAUDETTE
11,174 Views

I am also running into this issue with quotas being applied to BUILTIN\Administrators rather than user accounts. How were you able to solve this?

Chris

sigallcap
11,175 Views

I also have the same issue. Owner will be set to BUILTIN\Administrators.

Benny

sigallcap
8,706 Views

I also have the same issue. Owner will be set to BUILTIN\Administrators.

Benny

Public