Disk Quotas - 16 Dec 2002

Regulate your hard disk space

To recoin a phrase, there's no such thing as being too thin, too rich, or having too much hard disk space. The price of disk storage has decreased steadily in recent years, and adding disks to corporate file servers to accommodate increasing storage needs is now a viable option. However, even if you have a sufficient budget for adding storage space, managing disk expansion can be tedious. You must monitor disk use, install disks as needed, change pointers and mappings to move users to the new disks, and establish backup procedures.

When administrators grow tired of performing these chores and decide to investigate disk usage in their organization, they often find volumes filled with unnecessary data files, including outdated documents, personal files (e.g., large graphic and audio files), and other nonessential data. Disk-usage policies are rarely effective because enforcement is so time-consuming.

Windows 2000 introduces disk quotas, a great solution that lets you dump the disk-space problem into the laps of your users. When you enable quotas, each user receives a finite number of bytes of available disk space. Users who reach their quota, encounter a problem when they try to work with files, which provides an enormous incentive for them to purge unnecessary or unauthorized files.(To learn what actions add bytes, see the sidebar "How the System Counts Bytes," page 60.)

If you don't know about disk quotas, or if you've heard the term but didn't realize how effective and uncomplicated this feature is, read on. I tell you how to set up and configure an efficient and fair quota system for your users and perform the administrative tasks necessary to maintain and enforce the quotas you set.

Turning on Disk Quotas
You almost certainly meet the two requirements for enabling Win2K disk quotas on your system: You must use an NTFS-formatted hard disk, and you must have administrative rights on the target computer. Note that I didn't specify Win2K Server—you can also establish disk quotas on Win2K Professional machines. In fact, if your users save documents locally on Win2K Pro machines, establishing disk quotas is a way to force users to perform housekeeping chores regularly and to dissuade them from downloading large files from the Internet.

Establishing quotas is simple and straightforward:

  1. From My Computer or Windows Explorer, right-click the icon for the disk you want to work with, then choose Properties.

  2. In the Properties dialog box, click the Quota tab, which appears only when you're logged on with administrative rights and the hard disk is NTFS formatted.

  3. Select the Enable quota management check box.

  4. Select the configuration options you desire.

Setting Default Limits
To activate fields for disk-space limit and warning levels, select Limit disk space to and Set warning level to, as Figure 1, page 60, shows. Enter the values you require for disk-space limits and warning levels (you can use decimal values—for example, 35.5), then select units of measure (KB, MB, GB, TB, PB, or EB) from the drop-down lists. Be sure the specification for the warning level is slightly lower than the disk-space limit.

The specifications you enter in this dialog box become the default settings, and the system automatically applies these settings to all users who access the hard disk. However, as I discuss later, you can customize the disk-space limit and warning level specifications for individual users.

Denying File Saves
Select the Deny disk space to users exceeding quota limit check box if you want to prevent users from writing to the disk when they've reached their quota. Users then receive an error message from the application they're using when they try to save a file because the application sees the volume as full. Users must create free space on the disk before they can save a file.

Denying disk space to those who have reached quota limits is the most effective way to prevent users from wasting space. However, be aware that if you choose this option, you'll hear from users. You can temporarily enlarge a user's quota (see the section "Configuring Customized Quota Entries"), but other users will likely find out and ask for the same favor. You can also point out unneeded files the user has stored. On a positive note, I've learned from administrators who have taken a strict approach to quotas that this state of affairs doesn't last long. Eventually, users understand that you mean business, they make disk housekeeping a regular task, and the complaining stops.

Set Logging Options
Instead of denying write privileges when users reach quotas, you can log events when users exceed either their quota warning levels, their disk-space limits, or both. The system writes these events to the local computer's System log, which you can view in Event Viewer.

Technically, you don't have to log events instead of denying write privileges—you can set logging options in addition to denying write privileges, but doing so is unnecessary. You log events so that you can track users who exceed quotas, but denying write privileges prevents users from exceeding quotas.

Also, you can set logging options to track both the warning level and the disk-space limit, but you should set only one of these options. Otherwise, you double the number of events you collect in the System log without gaining any advantage in your efforts to control disk-space use. Decide whether to notify users when they get close to using too much disk space (i.e., with the warning-level specification) or when they've exceeded their allotted disk-space limit (i.e., with the disk-space limit specification).

Using Event Logs
If you enable logging, you can monitor disk-quota events in the System log and know when to cajole your users. The listings for disk-quota events have the following characteristics:

  • Event Type: Information
  • Event Source: Ntfs
  • Event Category: Disk
  • Event ID 36: A user hit their quota threshold
  • Event ID 37: A user hit their quota limit
  • The user name is displayed in the User column

You can use the Microsoft Management Console (MMC) to work with Event Viewer to check from your computer a remote computer that's running disk quotas. To accomplish this, follow these steps:

  1. Click Start, Run. Type
    then click OK.
  2. Click File (in Windows XP) or Console (in Win2K), and select Add/Remove Snap-in.
  3. On the Standalone tab, click Add.
  4. Click Event Viewer, and click Add.
  5. Click Another computer, then enter the Universal Naming Convention (UNC) name for the remote computer or click Browse to find the computer.
  6. Click Finish, click Close, and click OK.

MMC displays the remote computer's Event Viewer. Save the console for future use (I recommend that you use the remote computer name as the filename). If you're displaying Administrative Tools on the Programs menu, the console appears in the submenu.

Configuring Customized Quota Entries
Win2K's disk-quota feature lets you set customized quota levels or disable the feature for individual users for whom your default settings are too limiting (e.g., for users who create numerous or large files). To modify the quota settings for a user who has already used the hard disk in question, open My Computer or Windows Explorer, right-click the icon for the hard disk you want to configure, and select Properties. Next, select the Quota tab, then click Quota Entries to open the Quota Entries for Local Disk window. The names of all users who have used this drive to save files will appear, as Figure 2 shows. Right-click a user listing or multiple user listings, and choose Properties. In the Quota Settings dialog box, which Figure 3 shows, change the disk-space limit and warning-level specifications or disable quotas for this user. If you select multiple users, the title bar says Multiple Users instead of displaying the name of an individual user.

As new users access the drive, the quotas you specified will automatically apply. Alternatively, you can customize individual specifications before new users access the drive for the first time (otherwise, you must change their settings by using the steps I described in the previous paragraph). To customize quotas for users who haven't yet accessed this drive (and for whom you don't want the default settings to apply), perform the following steps:

  1. In the Quota Entries for Local Disk window, select Quota, New Quota Entry to open the Select Users dialog box.
  2. From the Look in box at the top of the dialog box, select the entity from which to retrieve a user list:
  • Choose the domain to see a list of all users in the domain (the default selection).
  • Choose the local computer to see a list of all users on the computer.
  • Choose Entire Directory to see a list of all users in Active Directory (AD), including all domains and forests.
  • Select a user (or multiple users), click Add, then click OK.
  • In the Add New Quota Entry dialog box, which Figure 4, page 62, shows, set the limits you require or turn off quotas altogether.

    Managing Disk Quotas Remotely
    After you establish disk quotas for your users, day-to-day quota administration isn't difficult. In fact, you can administer all the disk-quota systems you've set up from the comfort of your desk. To access the disk-quota information on a remote volume (to which you have administrative rights, of course), you must map a drive letter to the remote drive (which must be shared). To map a drive letter, perform the following steps:

    1. Open My Network Places, browse to the machine that houses the target disk, and navigate to the drive share.
    2. Right-click the icon for the disk, then choose Map Network Drive.
    3. Select a drive letter and click Finish (it's also a good idea to select the Reconnect on Logon option).

    When you open My Network Places, you might see shortcuts to network shares, including the disk you want to map. These shortcuts exist because you've accessed the share previously, but the shortcuts aren't the same as an icon for the share. You must open the Entire Network icon and navigate to the icon for the shared drive to see the Map Network Drive command on the shortcut menu. If you're working at an XP computer, the system periodically searches the network for new shares and adds shortcuts to those shares to the My Network Places folder, which makes the folder even more crowded than on a Win2K computer, which saves only shortcuts to accessed shares. If this XP behavior annoys you, you can disable this feature. Open any system window (e.g., My Computer), then choose Tools, Folder Options. Click the View tab, then clear the Automatically Search for Network Folders and Printers check box.

    After you map the share, open My Computer, where an icon for the drive letter appears. Right-click the drive and choose Properties to view the Properties dialog box, which now has a Quota tab.

    Using the Quota Entries Window
    The Quota Entries for Local Disk window provides a quick review of the current status of each user's disk usage, as Figure 2 shows. With this information in hand, you can contact users who seem to be approaching their limits or who have exceeded their limits.

    You can also use the information from the Quota Entries for Local Disk window to create reports, even though no commands are available to let you export data or print reports. Instead, you must select the entries you need (usually all users except Administrator), drag the entries into another application (e.g., Microsoft Word), and format the information.

    Exporting Quotas to Other Drives
    When you have a working quota system on one drive, you can move it to other drives by exporting the quota records, then importing them to any target drives in the enterprise. By exporting quotas, you can easily create quotas for users who access multiple computers on your network.

    To export a drive's quota records, open the drive's Properties dialog box, move to the Quota tab, click Quota Entries, then select the user quota records you want to export. Open the Quota menu, select Export, then save the file. Don't add an extension to the filename—disk-quota settings are saved in a file format that's exclusive to the disk-quotas feature. In fact, the system won't show the filename extension for the quota-settings file, even if you've configured Windows to show filename extensions for all files.

    To import the quotas to another drive, open the drive's Properties dialog box, select the Quota tab, then click Quota Entries. From the Quota menu, select Import, then select the file you saved. The OS automatically creates quota entries for each user. If a user in the import file already exists on the user list, the system asks you whether you want to replace the quota specifications. You can also copy quota entries by opening both Quota Entries windows and dragging a user entry from one window to the other.

    The disk-quota file contains only specifications for the usernames you exported; it doesn't enable disk quotas for the target drive, nor does it set default quota specifications. You must perform those tasks manually.

    Deleting Quota Entries
    If a user stops using a computer for file saves, you can save overhead by eliminating the user's entry from the Quota Entries window. However, you must delete, move, or change ownership for all of that user's files. Right-click the user's listing and select Delete, then click Yes when the confirmation dialog box appears. In the Disk Quota dialog box that appears, select the appropriate option for each file that the user owns, as Figure 5 shows. You don't have to take the same action for all the files*you can move some, take ownership of some, and even delete some (although that might be risky).

    Win2K's disk-quota feature helps you avoid running out of disk space and is a good way to enforce your company's rules about performing regular housekeeping chores on drives. In addition to protecting disk space on your servers, this feature works extremely well on XP Professional Edition and Win2K Pro workstations if your users save files locally.

  • Hide comments


    • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

    Plain text

    • No HTML tags allowed.
    • Web page addresses and e-mail addresses turn into links automatically.
    • Lines and paragraphs break automatically.