Join Ed Liberman for an in-depth discussion in this video Configure quotas, part of Windows Server 2016: File Services.
- [Instructor] The File Server Resource Manager is a tool that is included with Windows Server which can assist you with capacity management. Now this tool is broken down into five different areas, one of which is called Quota Management. Now Quota Management allows you to establish limits on how much data your users can store out on your servers. To demonstrate this we need to jump over to a server that I have here called Member-1 where we've already installed the File Server Resource Manager role.
Here in the Server Manager we're going to go up to the Tools menu and you'll see that we have our File Server Resource Manager. Here in the File Server Resource Manager tool you'll see our five different areas of management. Right at the top we have Quote Management and if I expand it you'll see it's broken down into two areas, Quotas and Quota Templates. Let's start off by looking at our templates. If I click on it you'll see that there are a number of templates that are already available and built right in when you install the role.
And you may find these templates useful when you are creating your quotas. But if you want to create your own template all you have to do is right-click on Quota Templates and select Create Quota Template. Now one neat thing about creating a quota template is right at the top here where it says Copy properties from quota template. You'll see here that I can choose an existing template if I know that maybe I have one that's close and I just need to tweak it a little bit I can copy in all of those parameters and then just make a slight change.
Alright, so we're not going to do that here though. We're going to create this template from scratch. And as you'll see, there's not much to set here, so while it's pretty cool that you can copy an existing one, I don't typically see a whole lot of need. We need to give it a name, so I'm just going to call this Demo Quota Template. We could add a Description to it if we wanted to. But down here below, this is the important part, where we set up the actual limits. So here it says Space limit and we can set any limit amount and the amount can be in kilobytes, megabytes, gigabytes, or even terabytes.
So I'm going to take just the amount that it defaulted to, we'll just say 100 megabytes, just for the sake of demonstration. Obviously in the real world 100 megabyte limit probably isn't very practical, 'cause that would be filled up in no time flat. But that's kind of the idea, 'cause I want to show you how we're going to actually implement this and use up our quota. Now the next thing we have to choose is whether we want to a Hard or a Soft quota. Hard quotas means users, they hit that quota that's it, they're done, can't exceed it. Soft quotas however allow users to exceed their limit and is used for monitoring purposes only.
Now some people struggle with this one, they say why would you ever do a Soft quota? If you're going to set up limits why would you let people blow through those limits? Well, you may have an environment where your users are performing business-critical tasks all day and you don't want one of those tasks to come to a screeching halt all because they've used up their own individual limit, 'cause usually if you've set these up correctly you still will have disk space available beyond the user's limits.
So you may just want to be notified that they've gone through their limit and then you can have a conversation about how it's going to be handled. So for the sake of this demonstration I will make it a Hard quota where we are going to say, nope, 100 meg and that's it. And speaking of those notifications we were just talking about, that's what we have at the bottom here, the Notification thresholds. If I click on Add you'll see here there's a default percentage of 85 that it populates in, at which point an E-mail could be sent out, and or an entry into the Event Log, and or a Command that can be run, and or a Report that can be run.
I, for this example, want to just go ahead and send a warning into the event log. So I'll click OK, and I'm actually going to add a second threshold, which is going to be at 100%. And again, send a warning to the event log. Alright, so I want to know based upon this template when a user has used up 85% of their storage and I want to also be notified if they've truly run out of space. So I will click OK and you'll see here that I now have the Demo Quota Template in place.
So now let's talk about actually creating a quota based off this template. So if I come up here and click on Quotas you'll see here that it's empty, so I will right-click and select Create Quota. I first need to determine a path, where is it that I'm establishing this limit? So I want to show you that if I Browse on my C drive you will see that there's a folder that's already been created, this is something I already did, so if you're following along you'll need to jump over to Windows Explorer and actually create this folder.
This Sales Users folder is what I'm going to use for this particular demonstration. I'll click OK. And then we're going to go ahead and Auto apply template and create quotas on existing and new subfolders. So this is where we're going to create our quota based upon a template, which is the recommended way to do it. And it says what template do you want to pull this from? And so I want to choose this one that we created just a moment ago called the Demo Quota Template.
And you'll see here that it shows that it's a 100 megabyte Hard limit, along with an 85 and a 100% Warning going into the Event logs. So I'm going to click Create and you will see here that I now have a quota that's been set on the Sales Users folder. So now let's go into Windows Explorer real quick and let's jump into our Sales Users container and I'm going to go ahead and I'm going to create another folder for a sales user, we'll say Ed, we're going to say user Ed is in our sales department.
Close out of here. Come back over here to our File Server Resource Manager and then I'm going to click the Refresh button or I could hit f5 on the keyboard, either way. And you'll see here that it now created the quota on the Ed folder, because that was created inside the Sales User folder. So now let's have some fun, let's actually create some data, so we can see how this all works. What I want to do is go ahead and click on the Start button, and then I'm going to select Windows PowerShell.
So here in the PowerShell window I'm going to type in cd\, which will take us all the way back to the root of our C drive, cd, and then I'll need quotes here, 'cause there's a space, so I'll put sales users, and then let's cd ed. Now why did I do all these cds? Cd stands for change directory, so that now puts us in the ed directory. And we're going to use this neat little utility called fsutil space file space createnew, so you can kind of guess what I'm doing here.
I'm creating a file, I'm just going to call it demo1.txt. And I'm going to make this file 90 million bytes, or somewhere in the area of about 90 megs, it's actually going to be slightly short of 90 meg. Let me go ahead and hit Enter, let's make sure this file creates. OK, perfect, it says that the file has been created. The reason I picked that size is because remember, we set up a threshold at 85%, so as long as this file was at least 85% megabytes that means I've hit a threshold.
So let me jump back over to the File Server Resource Manager. Before I hit Refresh, right here you see it says 0% Used. I'm going to hit Refresh, and you can see that it's now 85% Used. So the next thing I want to do is click on Start and then select the Event Viewer. Here in the Event Viewer what I want to do is expand my Windows Logs, and then click on the Application log, and what we're hoping for is that we have this Event ID 12325.
That Event ID is the one that is created any time one of the quota management notifications is piped in. And sure enough, if we look at this you'll see here at the bottom it says that the User LANDONHOTEL\administrator, that's who I'm logged in as, has exceeded the 85% quota threshold on this particular quota. So that's good. So now let's jump back over to our PowerShell window and let's go ahead and type our fsutil command again, file createnew, and we're going to call it demo2.txt, and let's see, how big do we want to make it? I'm kind of doing the math here, that should be enough to put us just over the 100%.
So when I hit Enter watch what happens. Oh, I get an error. There's not enough space on this disk. Hm, so if we go back to the File Server Resource Manager and we hit Refresh, you'll see that we're still sitting at 85%. If I go into Windows Explorer you'll see the reason why, if I jump down in my Sales Users folder, and then into the Ed directory, you'll see that demo1 was the only file that was actually created.
Demo2 never actually got created, 'cause it was a hard limit and we've maxed out on our capacity. So everything's still pretty much the same as it was before we ran that last PowerShell tool trying to add the additional file, but there is one thing that should have changed. And that is if I go back to the Event Viewer and I Refresh the log you'll see here that I have second Warning now, it's still 12325, it's the same Event ID, but now you'll see that it says that this particular user has exceeded the 100% quota threshold.
As an administrator I would now know that a user had tried to fill up the rest of their space. So if I put this all together I know that they tried and failed and they were not able to save that file, something that we would need to address. Now if we had set this up as a soft limit then the file would have been saved, we would have seen that the quota limit was at 100%, but the user would have been able to save the file.
As you can see, Quota Management is a great way to help keep a handle on how much storage space any of your users are actually using out on your servers.
- Configuring File Server Resource Manager
- Configuring quotas
- Configuring file screens and reports
- Configuring Distributed File System (DFS)
- Configuring DFS namesakes and DFS replication
- Encrypting files using the Encrypting File System
- Auditing file access