Solved

Per User Disk Quota On Home Directory

Posted on 2010-11-29
17
5,797 Views
Last Modified: 2012-05-10
Windows 2008 R2 Enterprise with FSRM installed.  Clients are XP SP3

I have over 2500 user accounts that I'd like to apply a quota to on their Home Directory.

I can't do this at the volume level, because there are other shared drive locations on that volume that I don't want taken into effect.

I've created a 100MB quota template and applied it to a test user.  It seems to work just fine.

Now I want to take this same template and apply it to my Student's home directories.  I've done the same procedure as my test user, but pointed it to \\home\homedir\students (Location of students home directories)

The problem is that after the quota is applied, it states that 14682% of my 100MB is in use and obviously since this is a hard quota all disk space is being denied.

Am I missing something in the implementation?  This needs to be per user.

0
Comment
Question by:januismer
  • 10
  • 6
17 Comments
 
LVL 10

Expert Comment

by:moon_blue69
Comment Utility
Just like you created a test user and applied it for them. Create a new security group called diskquota apply the setting the way you applied for test user. Once it is done add your required users to this security group
0
 
LVL 1

Author Comment

by:januismer
Comment Utility
Thanks for the quick response!

Sorry... You've lost me.  In 2008 R2 FSRM/Quotas I haven't seen where it even asks to take the security group into consideration anywhere, nor where to edit it.  You create the quota template and then create a new quota based upon that template.  Nowhere in the process does it ask (or can I see) where you can apply it to a security group.  Its all based upon volume hierarchy.

A little more background info... Shares (including the home directory folders) have been given NTFS rights using the access-based enumeration scheme (if it matters).

0
 
LVL 27

Expert Comment

by:KenMcF
Comment Utility
When you apply the quota template you should select "Auot apply temlate and create quotas on exisiting and new subfolders", it sounds like you selected the default "Create quota on path"

you can also do this from the command line

Create the template
dirquota Template Add /TEMPLATE:HOME_DRIVE_TEMPLATE /Limit:1gb
Add quota to d:\homedirs
dirquota AutoQuota Add /Path:d:\homedirs /SourceTemplate:HOME_DRIVE_TEMPLATE
0
 
LVL 1

Author Comment

by:januismer
Comment Utility
I've tried that too... For my test user, the quota would apply to all the sub-folders, but wouldn't take the root of the home directory into consideration.  Not good, as thats where the majority of files will probably end up.  Its weird, because the option says "Auto apply template and create quotas on existing and new sub-folders".  I guess it doesn't consider the root folder as "existing" or a "sub-folder" .

That being said, I just re-tested the first quota option "Create quota on path" and that does apply to root of the home directory and all the sub-folders for my test user, but yields that large percentage (14682%) of usage.

Still grasping...
0
 
LVL 27

Expert Comment

by:KenMcF
Comment Utility
Try it with the comamnds I sent. I apply quotas the same way you are doing it and they should apply to the root folder. Now if you would need to have a subfolder with a different quota policy then you will have to use the command line.
0
 
LVL 1

Author Comment

by:januismer
Comment Utility
Having troubles setting the quota from the server as domain admin or my PC domain admin equivalent.

Running this command:

dirquota AutoQuota Add /Path:\\home\e$\homedir$\teachers$\high school\hsteacher /SourceTemplate:"100 MB Limit"

Receive this error:
The requested operation requires elevation.
0
 
LVL 27

Expert Comment

by:KenMcF
Comment Utility
You will have to run the command prompt as an elevated user since UAC is enabled.

right start and right click on "Command Prompt" select run as administartor
0
 
LVL 1

Author Comment

by:januismer
Comment Utility
Ran the script:

C:\Windows\system32>Dirquota AutoQuota Add /Path:"E:\homedir$\teachers$\high school\hsteacher" /SourceTemplate:"100 MB Limit"

Auto apply quota successfully created for "E:\homedir$\teachers$\high school\hsteacher".

Its still not taking the root of the home directory into account and acting like the second option through the GUI which applies to sub-folders.

Any ideas?
0
How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

 
LVL 1

Author Comment

by:januismer
Comment Utility
Check out this screenshot too of how the script applied.  Note that there is no percentage for the home directory. Screenshot of applied Quota
0
 
LVL 27

Accepted Solution

by:
KenMcF earned 500 total points
Comment Utility
is hsteacher one of the users home drives?

From looking at the screen shot I would think you want to apply the policy to
"E:\homedir$\teachers$\high school"

Then it would apply the policy to all subfolders.

If you just want to test one user, select "Create quota on path" and apply to that same folder. When the testing is complete apply a new policy to  "E:\homedir$\teachers$\high school" and select "Auto Apply ...."
0
 
LVL 1

Author Comment

by:januismer
Comment Utility
Yes... hsteacher is a user's home drive.  I will be applying the template eventually to the above share that you referenced ("E:\homedir$\teachers$\high school") in order to catch everyone.

The problem still remains with the overall percentage not calculating properly though when I apply it to the parent folder.

In this screenshot I've applied this same structure, but for Students with the 100MB limit.  It appears that its not treating each user's home directory individually, but in a lump sum. Screenshot
0
 
LVL 27

Expert Comment

by:KenMcF
Comment Utility
That looks correct if you want each folder under E:\HomeDirs$\Students to have a 100MB limit.

Expand the Quota Type row and that should say Hard (Auto Apply). So the template is applied to all folders under E:\HomeDirs$\Students
0
 
LVL 1

Author Comment

by:januismer
Comment Utility
Am I not interpreting the percentage correctly?  For example, when I see the High School's used percentage, I interpret it to mean that I'm already 2323% over my 100 MB Limit per User and users are going to be Hard limited immediately.

Should I be interpreting it otherwise?
0
 
LVL 27

Expert Comment

by:KenMcF
Comment Utility
Have you checked the size of the folder?

100meg is low. So yes these users will not be able to save any additional files.
0
 
LVL 1

Author Comment

by:januismer
Comment Utility
Not to get off on another subject, but according to my nightly FSRM reports.  I don't have any student using over 100MB of data.
0
 
LVL 1

Author Comment

by:januismer
Comment Utility
As a test I just applied the 100 MB limit to the middle school students only.  It looks good!!  Highest student quota is 50%
0
 
LVL 1

Author Closing Comment

by:januismer
Comment Utility
Problem seemed to stem from where I was applying the template in my nested structure.

Thanks!
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Join & Write a Comment

I have been working as System Administrators since 2003. I recently started working as a FreeLancer and was amazed to find out that very few people are taking full advantage of their Windows Server Machines. Microsoft Windows Server comes with so…
A procedure for exporting installed hotfix details of remote computers using powershell
This tutorial will walk an individual through the steps necessary to enable the VMware\Hyper-V licensed feature of Backup Exec 2012. In addition, how to add a VMware server and configure a backup job. The first step is to acquire the necessary licen…
This tutorial will show how to configure a single USB drive with a separate folder for each day of the week. This will allow each of the backups to be kept separate preventing the previous day’s backup from being overwritten. The USB drive must be s…

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now