Using, Configuring, and Managing Disk Quotas


Disk quotas allow you to manage disk space usage by users. You configure quotas on a per volume basis. Only NTFS volumes can have quotas. You can't create quotas for FAT or FAT32 volumes .

Understanding Disk Quotas and How Quotas Are Used

Administrators use disk quotas to manage disk space usage for critical volumes, such as those that provide corporate data shares or user data shares. When you enable disk quotas you can configure two values:

  • Disk quota limit

    Sets the upper boundary for space usage, which you can use to prevent users from writing additional information to a volume and to log events regarding the user exceeding the limit, or both.

  • Disk quota warning

    Warns users and logs warning events when users are getting close to their disk quota limit.

Tip

If you're wondering, you can set disk quotas but not enforce them, and you might be wondering why you'd do this. Sometimes you want to track disk space usage on a per user basis and know when they've exceeded some predefined limit, but instead of denying them additional disk space, you log an event in the application log to track the overage. You can then send out warning messages or figure out other ways to reduce the space usage.


Disk quotas only apply to end users. Disk quotas don't apply to administrators. Administrators can't be denied disk space even if they exceed enforced disk quota limits.

In a typical environment, you'll restrict disk space usage in MB or GB. For example, on a corporate data share that's used by multiple users in a department, you might want to limit disk space usage to 20 “100 GB. For a user data share, you might want to set the level much lower, such as 5 “20 GB, which would restrict the user from creating large amounts of personal data. Often you'll set the disk quota warning as a percentage of the disk quota limit. For example, you might set the warning to 90 “95 percent of the disk quota limit.

Because disk quotas are tracked on a per volume, per user basis, disk space used by one user doesn't affect the disk quotas for other users. Thus, if one user exceeds his or her limit, any restrictions applied to this user don't apply to other users. For example, if a user exceeds a 1 GB disk quota limit and the volume is configured to prevent writing over the limit, the user can no longer write data to the volume. Users can, however, remove files and folders from the volume to free up disk space. They could also move files and folders to a compressed area on the volume, which might free up space, or they could elect to compress the files themselves . Moving files to a different location on the volume doesn't affect the quota restriction. The amount of file space will be the same unless the user is moving uncompressed files and folders to a folder with compression. In any case, the restriction on a single user doesn't affect other users' ability to write to the volume (as long as there's free space on the volume).

You can enable disk quotas on:

  • Local volumes

    To manage disk quotas on local volumes, you work with the local disk itself. When you enable disk quotas on a local volume the Windows systems files are included in the volume usage for the user who installed those files. In some cases this might cause the user to go over the disk quota limit. To prevent this, you might want to set a higher limit on a local workstation volume.

  • Remote volumes

    To manage disk quotas on remote volumes, you must share the root directory for the volume and then set the disk quota on the volume. Remember, quotas are set on a per volume basis, so if a remote file server has separate volumes for different types of data ”that is, a corporate data volume and a user data volume ”these volumes have different quotas.

Only members of the domain Administrators group or the local system Administrators group can configure disk quotas. The first step in using quotas is to enable quotas in Group Policy. You can do this at two levels:

  • Local

    Through local group policy, you can enable disk quotas for an individual computer.

  • Enterprise

    Through site, domain, and organizational unit policy, you can enable disk quotas for groups of users and computers.

Having to keep track of disk quotas does cause some overhead on computers. This overhead is a function of the number of disk quotas being enforced, the total size of volumes and their data, as well as the number of users to which the disk quotas apply.

Although on the face of it disk quotas are tracked per user, behind the scenes Windows Server 2003 manages disk quotas according to security identifiers (SIDs). Because SIDs track disk quotas, you can safely modify user names without affecting the disk quota configuration. Tracking by SIDs does cause some additional overhead when viewing disk quota statistics for users. The reason for this is that Windows Server 2003 must correlate SIDs to user account names so that the account names can be displayed in dialog boxes. This means contacting the local user manager and the Active Directory domain controller as necessary.

Once names are looked up, they're cached to a local file so that they can be available immediately the next time they're needed. The query cache is infrequently updated, and if you notice a discrepancy between what's displayed and what's configured, you'll need to refresh the information. Usually, this means selecting Refresh or pressing F5 in the current window.

Setting Disk Quota Policies

The best way to configure disk quotas is through Group Policy. When you configure disk quotas through local policy or through unit, domain, and site policy, you define general policies that are set automatically when you enable quota management on individual volumes. Thus, rather than having to configure each volume separately, you can use the same set of rules and apply them to each volume you want to manage in turn .

Policies that control disk quotas are applied at the system level. You access these policies through Computer Configuration\Administrative Templates\System\Disk Quotas. Table 14-6 summarizes the available policies.

Table 14-6. Policies for Setting Disk Quotas

Policy Name

Description

Enable Disk Quotas

Turns disk quotas on or off for all NTFS volumes of the computer and prevents users from changing the setting.

Enforce Disk Quota Limit

Specifies whether quota limits are enforced. If quotas are enforced, users will be denied disk space if they exceed the quota. This overrides settings in the Quota tab on the NTFS volume.

Default Quota Limit And Warning Level

Sets a default quota limit and warning level for all users. This setting overrides other settings and affects only new users.

Log Event When Quota Limit Exceeded

Determines whether an event is logged when users reach their limit and prevents users from changing their logging options.

Log Event When Quota Warning Level Exceeded

Determines whether an event is logged when users reach the warning level.

Apply Policy To Removable Media

Determines whether quota policies apply to NTFS volumes on removable media. If you don't enable this policy, quota limits apply only to fixed media drives .

Whenever you work with quota limits, you'll want to use a standard set of policies on all systems. Typically, you won't want to enable all the policies. Instead, you'll selectively enable policies and then use the standard NTFS features to control quotas on various volumes. If you want to enable quota limits, use the following technique:

  1. Access Group Policy for the system you want to work with, such as a file server. Afterward, access the Disk Quotas node by expanding Computer Configuration\Administrative Templates\System\Disk Quotas.

  2. Double-click Enable Disk Quotas, and then, in the Setting tab, choose Enabled. Click Next Setting. This displays the Enforce Disk Quota Limit policy.

  3. If you want to enforce disk quotas on all NTFS volumes residing on this computer, click Enabled. Otherwise, click Disabled and then set specific limits on a per volume basis.

  4. Click Next Setting. This displays the Default Quota Limit And Warning Level Properties dialog box as shown in Figure 14-15. Select Enabled.

  5. Under Default Quota Limit, set a default limit that's applied to users when they first write to the quota-enabled volume. The limit doesn't apply to current users or affect current limits in place. On a corporate share, such as a share used by all members of a team, a good limit is between 500 and 1000 MB. Of course, this depends on the size of the data files that the users routinely work with. Graphic designers and data engineers might need much more disk space.

  6. If you scroll down in the subwindow provided in the Setting tab, you'll be able to set a warning limit as well. A good warning limit is about 90 percent of the default quota limit, which means that if you set the default quota limit to 1000 MB, you'd set the warning limit to 900 MB.

  7. Click Next Setting. This displays the Log Event When Quota Limit Exceeded policy. Select Enabled so that limit events are recorded in the Application log.

  8. Click Next Setting. This displays the Log Event When Quota Warning Exceeded policy. Select Enabled so that warning events are recorded in the Application log.

  9. Click Next Setting. This displays the Apply Policy To Removable Media policy. Select Disabled so that the quota limits only apply to fixed media volumes on the computer.

  10. Click OK.

    Figure 14-15. Use the Default Quota Limit And Warning Level Properties dialog box to enforce disk quotas.

    graphics/f14ap15.jpg

    Tip

    To ensure that the policies are enforced immediately, access the Computer Configuration\Administrative Templates\System\Group Policy node and then double-click Disk Quota Policy Processing. Next, select Enabled and then choose Process Even If The Group Policy Objects Have Not Changed. Click OK.


Enabling Disk Quotas on NTFS Volumes

Disk quotas are set on a per volume basis. Only NTFS volumes can have disk quotas. Once the appropriate group policies are configured, you can set disk quotas for local and remote volumes using Computer Management.

To enable disk quotas on an NTFS volume, follow these steps:

  1. Start Computer Management and then right-click Computer Management in the console tree. On the shortcut menu, select Connect To Another Computer. In the Select Computer dialog box, choose the computer you want to work with.

  2. In the console tree, expand Storage and then select Disk Management. The volumes configured on the selected computer are displayed in the details pane.

  3. Using the Volume List or Graphical View, right-click the volume you want to work with and then select Properties.

  4. Select the Quota tab and then choose Enable Quota Management as shown in Figure 14-16. If you've already set quota management values through Group Policy, the options are dimmed and you can't change them. You must modify options through Group Policy instead.

    Best Practices

    Whenever you work with the Quota tab, pay particular attention to the Status text and the associated traffic light icon. Both change based on the state of quota management. If quotas aren't configured, the traffic light icon shows a red light and the status shows as inactive or not configured. If the operating system is working or updating the quotas, the traffic light icon shows a yellow light and the status shows the activity being performed. If quotas are configured, the traffic light icon shows a green light and the status text states that the quota system is active.


    Figure 14-16. Once you enable quota management, you can configure a quota limit and quota warning for all users. If you've already set these values through Group Policy, the options are dimmed and you can't change them.

    graphics/f14ap16.jpg

  5. To set a default disk quota limit for all users, select Limit Disk Space To and then use the fields provided to set a limit in KB, MB, GB, TB, PB, or EB. Afterward, use the Set Warning Level To fields to set the default warning limit. Again, you'll usually want the disk quota warning limit to be 90 “95 percent of the disk quota limit.

    Tip

    Although the default quota limit and warning applies to all users, you can configure different levels for individual users. You do this through the Quota Entries dialog box. If you create many unique quota entries and don't want to recreate them on a volume with similar characteristics and usage, you can export the quota entries and import them on a different volume.


  6. To enforce the disk quota limit and prevent users from going over the limit, select Deny Disk Space To Users Exceeding Quota Limit. Keep in mind that this creates an actual physical limitation for users (but not administrators).

  7. To configure logging when users exceed a warning limit or the quota limit, use the Log Event check boxes.

  8. If the quota system isn't currently enabled, you'll see a prompt asking you to enable the quota system. Click OK to allow Windows Server 2003 to rescan the volume and update disk usage statistics. Actions might be taken against users who exceed the current limit or warning levels, which can include preventing additional writing to the volume, notifying them the next time they access the volume, and logging applicable events in the Application log.

Viewing Disk Quota Entries

Disk space usage is tracked on a per user basis. When disk quotas are enabled, each user storing data on a volume has an entry in the disk quota file. This entry is updated periodically to show the current disk space used, the applicable quota limit, the applicable warning level, and the percentage of allowable space being used. As an administrator, you can modify disk quota entries to set different limits and warning levels for particular users. You can also create disk quota entries for users who haven't yet saved data on a volume. The key reason for creating entries is to ensure that when a user does make use of a volume, the user has an appropriate limit and warning level.

To view the current disk quota entries for a volume, follow these steps:

  1. Start Computer Management, and then right-click Computer Management in the console tree. On the shortcut menu, select Connect To Another Computer. In the Select Computer dialog box, choose the computer you want to work with.

  2. In the console tree, expand Storage and then select Disk Management. The volumes configured on the selected computer are displayed in the details pane.

  3. Using the Volume List or Graphical View, right-click the volume you want to work with and then select Properties.

  4. In the Quota tab, click Quota Entries. This displays the Quota Entries dialog box. Each quota entry is listed according to a status. The status is meant to quickly depict whether a user has gone over a limit. A status of OK means the user is working within the quota boundaries. Any other status usually means the user has reached the warning level or the quota limit.

Creating Disk Quota Entries

You can create disk quota entries for users who haven't yet saved data on a volume. This allows you to set custom limits and warning levels for a particular user. You'll usually use this feature when a user frequently stores more information than other users and you want to allow the user to go over the normal limit or when you want to set a specific limit for administrators. As you might recall, administrators aren't subject to disk quota limits, so if you want to enforce limits for individual administrators, you must create disk quota entries for each administrator you want to limit.

Real World

You shouldn't create individual disk quota entries haphazardly. You need to track individual entries carefully . Ideally, you'll keep a log that details any individual entries so that other administrators understand the policies in place and how those policies are applied. When you modify the base rules for quotas on a volume, you should reexamine individual entries to see if they're still applicable or need to be updated as well. I've found that certain types of users are exceptions more often than not and that it's sometimes better to put different classes of users on different volumes and then apply disk quotas to each volume. In this way, each class or category of user has a quota limit that's appropriate for its members' typical usage and you have fewer (perhaps no) exceptions. For example, you might use separate volumes for executives, managers, and users, or you might have separate volumes for management, graphic designers, engineers, and all other users.

To create a quota entry on a volume, follow these steps:

  1. Access the Quota Entries dialog box as discussed in the section of this chapter entitled "Viewing Disk Quota Entries." Current quota entries for all users are listed. To refresh the listing press F5 or select Refresh from the View menu.

  2. If the user doesn't have an existing entry on the volume, you can create it by selecting New Quota Entry from the Quota menu. This opens the Select Users dialog box.

  3. In the Select Users dialog box, type the name of a user you want to use in the Name field and then click Check Names. If matches are found, select the account you want to use and then click OK. If no matches are found, update the name you entered and try searching again. Repeat this step as necessary and then click OK when you're finished.

  4. Once you've selected a name, the Add New Quota Entry dialog box is displayed as shown in Figure 14-17. You have several options. You can remove all quota restrictions for this user by selecting Do Not Limit Disk Usage. Or you can set a specific limit and warning level by selecting Limit Disk Space To and then entering the appropriate values in the fields provided.

  5. Click OK.

    Figure 14-17. Use the Add New Quota Entry dialog box to customize the user's quota limit and warning level or remove quota restrictions altogether.

    graphics/f14ap17.jpg

Deleting Disk Quota Entries

When you've created disk quota entries on a volume and a user no longer needs to use the volume, you can delete the associated disk quota entry. When you delete a disk quota entry, all files owned by the user are collected and displayed in a dialog box so that you can permanently delete the files, take ownership of the files, or move the files to a folder on a different volume.

To delete a disk quota entry for a user and manage the user's remaining files on the volume, follow these steps:

  1. Access the Quota Entries dialog box as discussed in the section of this chapter entitled "Viewing Disk Quota Entries." Current quota entries for all users are listed. To refresh the listing, press F5 or select Refresh from the View menu.

  2. Select the disk quota entry that you want to delete and then press the Delete key or select Delete Quota Entry from the Quota menu. You can select multiple entries using the Shift and Ctrl keys.

  3. When prompted to confirm the action, click Yes. This displays the Disk Quota dialog box with a list of current files owned by the selected user or users.

  4. Use the List Files Owned By selection list to display files for a user whose quota entry you're deleting. You must now specify how the files for the user are to be handled. Each file can be handled separately by selecting individual files and then choosing an appropriate option. You can select multiple files using the Shift and Ctrl keys. The options available are:

    • Permanently Delete Files Select the files to delete and then press Delete. When prompted to confirm the action, click Yes.

    • Take Ownership Of Files Select the files that you want to take ownership of and then click Take Ownership.

    • Move Files To Select the files that you want to move and then enter the path to a folder on a different volume in the field provided. If you don't know the path that you want to use, click Browse to display the Browse For Folder dialog box, which you can use to find the folder. Once you find the folder, click the Move button.

  5. Click Close when you're finished managing the files. Provided that you've appropriately handled all user files, the disk quota entries will be deleted.

Exporting and Importing Disk Quota Settings

Rather than recreating custom disk quota entries on individual volumes, you can export the settings from a source volume and then import the settings on another volume. You must format both volumes using NTFS. The steps you follow to export and then import disk quota entries are the following:

  1. Start Computer Management and then right-click Computer Management in the console tree. On the shortcut menu, select Connect To Another Computer. In the Select Computer dialog box, choose the computer containing the source volume.

  2. In the console tree, expand Storage and then select Disk Management. The volumes configured on the selected computer are displayed in the details pane.

  3. Using the Volume List or Graphical View, right-click the source volume and then select Properties.

  4. In the Quota tab, click Quota Entries. This displays the Quota Entries dialog box.

  5. Select Export from the Quota menu. This displays the Export Quota Settings dialog box. Use the Save In selection list to choose the save location for the file containing the quota settings and then set a name for the file using the filename field. Afterward, click Save.

    Note

    If you save the settings file to a mapped drive on the target volume, you'll have an easier time importing the settings. Quota files are usually fairly small, so you won't need to worry about disk space usage.


  6. On the Quota menu, choose Close to exit the Quota Entries dialog box.

  7. Right-click Computer Management in the console tree. On the shortcut menu, select Connect To Another Computer. In the Select Computer dialog box, choose the computer containing the target volume. The target volume is the one that you want to use the exported settings.

  8. As explained previously, access the Properties dialog box for the target volume. Then click Quota Entries in the Quota tab. This displays the Quota Entries dialog box for the target volume.

  9. Select Import on the Quota menu. Then, in the Import Quota Settings dialog box, select the quota settings file that you saved previously. Click Open .

  10. If the volume had previous quota entries, you'll have the opportunity to replace existing entries or keep existing entries. When prompted about a conflict, click Yes to replace an existing entry or click No to keep the existing entry. You can apply the option to replace or keep existing entries to all entries on the volume by selecting Do This For All Quota Entries prior to clicking Yes or No.

Disabling Disk Quotas

You can disable quotas for individual users or all users on a volume. When you disable quotas for a particular user, the user is no longer subject to the quota restrictions but disk quotas are still tracked for other users. When you disable quotas on a volume, quota tracking and management is completely removed. To disable quotas for a particular user, follow the technique outlined in the section of this chapter entitled "Creating Disk Quota Entries." To disable quota tracking and management on a volume, follow these steps:

  1. Start Computer Management and then right-click Computer Management in the console tree. On the shortcut menu, select Connect To Another Computer. In the Select Computer dialog box, choose the computer containing the volume that you want to work with.

  2. In the console tree, expand Storage and then select Disk Management. The volumes configured on the selected computer are displayed in the details pane.

  3. Using the Volume List or Graphical View, right-click the volume and then select Properties.

  4. In the Quota tab, clear Enable Quota Management. When prompted to confirm, click OK.



Microsoft Windows Server 2003 Administrator[ap]s Pocket Consultant
Microsoft Windows Server 2003 Administrator[ap]s Pocket Consultant
ISBN: 735622450
EAN: N/A
Year: 2003
Pages: 141

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net