Network Administration / Windows 2000 Server

Implementing Windows 2000 hard disk quotas

One of the biggest headaches for Windows NT administrators has often been the issue of running out of hard disk space. In just about every company that I've ever worked for, there has been a user that tried to copy his or her entire hard disk onto the network. Sometimes, these users will even show their friends how to do the same thing. Of course, such activity eventually causes the server's hard disk to run out of space.

When I first began working with networks, I managed NetWare networks. NetWare has supported disk quotas for years, and it was routine to place limits on the amount of hard disk space that a user could consume. When I managed my first Windows NT network, I was absolutely shocked to learn that Windows NT didn't provide any capability for limiting hard disk consumption without buying an add-on product. Fortunately, Microsoft has addressed this issue by adding a disk quota feature to Windows 2000. In this article, I'll explain how to enable disk quotas in Windows 2000 and reveal some of the gotchas that come with this feature.

NTFS version 5

Before I get started explaining how disk quotas work, I should point out that disk quotas may be applied only to NTFS partitions. However, the Windows 2000 version of NTFS is different from the version that's included in Windows NT. The version of NTFS that comes with Windows NT supports features like file-level permissions but doesn't offer features such as file-level encryption or disk quotas. Fortunately, you don't have to worry about upgrading the NTFS file system, because when you install Windows 2000, Setup automatically performs an NTFS upgrade.

These differences really matter when you're dual-booting Windows 2000 with another operating system. Chances are, you'd probably never dual-boot Windows 2000 Server, but since Windows 2000 Professional also supports disk quotas, the point seems worth mentioning. Basically, the way that things work is if you upgrade a FAT or FAT 32 partition to NTFS so that you can use disk quotas, the other operating system you'll be dual-booting against won't be able to access the newly converted partition. The only exception to this is if the other operating system is Windows NT. Windows NT can interact with Windows 2000 partitions as long as it's running Service Pack 4 or later.

The rules of the game

By now, you know that in a Windows 2000 environment, an administrator can limit a user's hard disk consumption as long as a partition uses NTFS. However, there are some limits to the process of implementing disk quotas. Perhaps the biggest limitation is that the disk quotas must be applied on a per-partition basis. Unfortunately, there's no way to enforce a total amount of disk space that a user is allowed to consume on a per-server, per-site, or per-organization basis. Therefore, you may find yourself implementing a separate set of disk quotas for every server-based partition in your entire organization.

Enabling disk quotas

Now that you have a basic understanding of how disk quotas work, let's examine the process of implementing disk quotas. To implement a disk quota, select Programs | Administrative Tools | Computer Management from the Start menu. When the Computer Management console loads, navigate through the console tree to Computer Management (Local) | Storage | Disk Management. When you do, Windows will display a summary of all of the hard disks that are installed in your system, as shown in Figure A.

At this point, right-click the partition that you want to work with and select the Properties command from the resulting context menu. You'll then see the partition's Properties sheet. Select the Properties sheet's Quota tab. The disk quotas are disabled by default, but you can enable them from this tab.

 

To enable disk quotas, select the Enable Quota Management check box, as shown in Figure B. Keep in mind that doing so enables quota management only for this partition. Other partitions must have quota management enabled separately. Once you've enabled quota management, decide how you want Windows 2000 to regulate the disk quotas.

One option that you can use is selecting the Deny Disk Space To Users Exceeding Quota Limit. By setting this option, you make it impossible for users to save files to partitions in which they have met their limit. However, you may not always want to use this option because not being able to save files could have a negative impact on a user's ability to do his or her job.

Beneath the Deny Disk Space To Users Exceeding Quota Limit check box, you'll see a section that allows you to set the default quota limits. Keep in mind that the limits that you set here have absolutely no effect on existing users. They affect only user accounts that are created after the quotas are enabled. In this section, you can either tell Windows to not limit disk usage, or you can set some limitations.

Windows allows you not only to set the maximum amount of hard disk space a user can consume on a partition but also to set a warning threshold. For example, if you were to limit each user to 100 MB of space, you might set the warning threshold to 90 MB. By doing so, Windows would generate a warning message for users when they exceeded the 90-MB limit.

Simply setting a disk space limit alone, however, won't prevent users from saving files when they've used too much space. It merely provides the administrator with an easy method for checking to see who has exceeded a preset threshold. In fact, you can actually see which users are hogging all of the disk space by enabling quota logging. The Quota tab contains two check boxes that you can use to generate a log entry whenever a user surpasses his or her warning level or quota level.

Applying quotas to users

Whenever you enable quotas, the limits that you set apply only to new user accounts. Therefore, it's necessary to manually apply the quotas to the existing user accounts. At first, you may assume that you had set quota limits to user accounts by going through the Active Directory Users And Computers console. Keep in mind, though, that properties that you apply to Active Directory users are valid for the entire domain, and quotas are applied on a per-partition basis. Therefore, you must set the quota limits from the computer for which you're establishing quotas.

To do so, return to the partition's Properties sheet and select the Quota tab. Now, click the Quota Entries button. When you do, you'll see a screen similar to the one shown in Figure C. This screen contains a list of all of the quotas in effect for the partition, as well as a summary of who is above the limit and how much disk space that each user is actually consuming. This screen brings up an interesting point: Simply enabling quotas doesn't guarantee that you won't run out of hard disk space. In Figure C, I've given each user a 100-MB disk space limit. However, the entire volume is only 16 MB. As you can see, the hard disk would fill up long before any of the quotas that I've set were reached. It's also possible for applications to fill up the hard disk by creating log files or temp files.


The Quota Entries For Local Disk (C:) window allows you to see a summary of existing quotas.

Keep in mind that in Figure C, you see several user accounts listed. However, all of these user accounts except for the BUILTIN\Administrators account were added manually. The BUILTIN\Administrators account is placed in the list automatically. By default, this account is set to not have any limits. You can enable a warning threshold for the administrators, but you can't impose a disk space limit. This is Windows 2000's way of making sure that disk quotas don't hinder administrative chores. It is possible to set a disk quota for the administrator, but you'll have to manually add the administrator to the list to do so.

Unfortunately, you can apply disk quotas only to individual user accounts. You can't apply disk quotas to groups. If this seems strange, keep in mind that it's possible for a user to belong to more than one group, and in such a case, Windows wouldn't have any way of knowing which group's limits should be enforced. Applying quotas directly to individual user accounts, however, isn't as bad as it sounds.

Even though you can't apply disk quotas directly to groups, you can apply them to multiple users simultaneously. To do so, select the New Quota Entry command from the Quota menu. When you do, you'll see the Select Users dialog box. This dialog box displays a list of the users within a given domain. You can select either a single user or multiple users from this list. Once you've selected a group of users, click OK. When you do, you'll see the Add New Quota Entry dialog box. This dialog box allows you to specify the limit and warning thresholds for the users that you've selected.

As you can see, being able to select multiple users greatly expedites the process of applying disk quotas. However, there is an even better shortcut to the process. As I've mentioned, you have to apply disk quotas to each individual partition on each different server. To make this process easier, you can set up the quotas the way that you want them on one server and then export those settings to a file. You can then import the file when configuring other partitions. To do this, simply use the Import and Export commands that are found on the Quota menu.

Disk space reporting

The biggest reason for using disk space quotas may be to prevent users from consuming all of your hard disk space; however, when disk space starts getting low on a server, it's almost as important to know who is consuming the most space. Fortunately, there are several ways of acquiring this information.

You probably noticed in Figure C that the Quota Entries For Local Disk (C:) screen displays how much space each user is using and who is over the limit or above the warning level. However, you can make this screen even more useful. By clicking on a column heading, you can make Windows 2000 sort the list by that column. For example, if you were to click on the Amount Used column, the users would be sorted by who's using the most and least amount of disk space. You can also sort the list based on the Status column so that you can see who's over the limits that you've set.

If you prefer a more conventional method of reporting, simply select the users that you'd like to include in the report and drag them into an empty Excel spreadsheet. Windows will automatically create a spreadsheet that even includes a title and the column headings.

Conclusion

For years, Windows NT users have had free reign to store files on your system. They could completely fill up your server's hard drives and there was little you could do to stop it. I hope that this article has given you the information you need to put the control over disk quotas where it belongs: in the administrator's hands.

Contact Us | Authors | Subject Index | RSS Feeds

Copyright ©2007 Setup32.com