DESKTOP

Configuring Disk Quotas

9/5/2010 9:28:52 AM

The following sections discuss how to use and manage disk quotas. Disk quotas enable you to manage disk space usage, and they are configured on a per volume basis. Only NTFS file system (NTFS) volumes can have quotas, so you can't create them for file allocation table (FAT16 or FAT32) volumes. The first step in configuring quotas is to enable disk quota policies. Once you configure the necessary policies, you can set up quotas for specific volumes on a system.

Using Disk Quotas

Administrators use disk quotas to manage disk space usage for critical volumes, such as those that provide corporate or user data shares. When you enable disk quotas, you set a disk quota limit and a disk quota warning. The disk quota limit sets the maximum space usage (which prevents users from writing additional information to a volume), logs events regarding the user exceeding the limit, or both. You use the disk quota warning to warn users and to log warning events when users approach their disk quota limits.


Real World 

Although most administrators configure quotas that are enforced, you can set disk quotas that are not enforced. You might wonder why you would do this. Sometimes you might want to track disk space usage on a per user basis and know when users have exceeded some predefined limit. Instead of denying the users additional disk space, however, you can track the overage by recording an event in the application log.

Disk quotas apply only to end users, not to administrators. Administrators can't be denied disk space even if they exceed enforced disk quota limits. Disk quota limits and warnings can be set in kilobytes (KB), megabytes (MB), gigabytes (GB), terabytes (TB), petabytes (PB), and exabytes (EB). In a typical environment, you'll restrict disk space usage in megabytes or gigabytes. For example, on a corporate data share that is used by multiple users in a department, you might want to limit disk space usage to 20 to 100 GB. For a user data share, you might want to set the level much lower, such as 5 to 20 GB, restricting 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 could set the warning at 90 to 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 does not affect the disk quotas for other users. Thus, if one user exceeds his limit, any restrictions applied to this user don't apply to other users. For example, if a user exceeds a 5 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. However, he can remove files and folders from the volume to free up disk space. The user could also move files and folders to a compressed area on the volume, which can free up space, or the user could elect to compress the files. Moving files to a different location on the volume doesn't affect the quota restriction. The amount of file space is 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 does not affect other users' ability to write to the volume (as long as the volume has free space).

You can enable disk quotas on local volumes and on remote volumes. To manage disk quotas on local volumes, you work with the local disk itself. 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. Keep in mind that when you enable disk quotas on a local volume, operating system and application program files are not included in the volume usage for the user who installed those files. Generally, system files are owned by Trusted Installer and program files are owned by the system account.

Only members of the domain administrators group or the local system administrators group can configure disk quotas. Through local group policy, you can enable disk quotas for an individual computer. Through site, domain, or organizational unit policies, you can enable disk quotas for groups of users and computers. Keeping track of disk quotas does cause some overhead on computers, which is a function of the number of disk quotas being enforced, the total size of volumes and their data, and the number of users to which the disk quotas apply.

Although it appears that disk quotas are tracked per user, behind the scenes, Windows Vista manages disk quotas according to security identifiers (SIDs). Because disk quotas are tracked by SIDs, you can safely modify user names without affecting the disk quota configuration. Tracking by SIDs causes some additional overhead when viewing disk quota statistics for users because Windows Vista 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 or the Microsoft Active Directory directory service domain controller as necessary. Once names are looked up, they are cached to a local file so that they are available immediately the next time they are needed. The query cache is infrequently updated, so if you notice a discrepancy between what is displayed and what is configured, you'll need to refresh the information. Usually, this means selecting Refresh or pressing F5 in the current window.

Enabling Disk Quotas on NTFS Volumes

Disk quotas are set on a per volume basis, and only NTFS volumes can have disk quotas. Disk quotas must first be configured through Group Policy . Once the appropriate group policies are configured, you can use the Computer Management console to set disk quotas for local and remote volumes.

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

  1. Start Computer Management. You are connected to the local computer by default. If you want to configure disk quotas on a remote computer, right-click Computer Management in the console tree and then select Connect To Another Computer. In the Select Computer dialog box, select 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. Click the Quota tab, shown in Figure 1, and then select the Enable Quota Management check box.

    Image from book
    Figure 1: Once you enable quota management, you can configure a quota limit and quota warning for all users.

  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. Next use the Set Warning Level To fields to set the default warning limit. You'll usually want the disk quota warning limit to be 90 to 95 percent of the disk quota limit.


    Tip 

    Although the default quota limit and warning apply to all users, you can use the Quota Entries dialog box to configure different levels for individual users. If you create many unique quota entries and don't want to re-create 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 the Deny Disk Space To Users Exceeding Quota Limit check box. Keep in mind that this creates an actual physical limitation for users, but not for 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 Vista to rescan the volume and update disk usage statistics. Actions can be taken against users that exceed the current limit or warning levels, which can include preventing additional writing to the volume, notifying users 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 have not yet saved data on a volume. By creating entries, you ensure that when a user does make use of a volume, she has an appropriate limit and warning level.

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

  1. Start Computer Management. You are connected to the local computer by default. If you want to view disk quotas on a remote computer, right-click Computer Management in the console tree and then select Connect To Another Computer. In the Select Computer dialog box, select 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. On the Quota tab, click Quota Entries. This displays the Quota Entries dialog box, shown in Figure 2. As you can see from the figure, each quota entry is listed according to a status. The status is meant to quickly depict whether a user has gone over her 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.

    Image from book
    Figure 2: Disk quota entries show current disk space usage on a particular volume as well as applicable quota limits and warning levels.

Creating Disk Quota Entries

You can create disk quota entries for users who have not yet saved data on a volume as well as for users who have already saved data on a volume. This enables you to set custom limits and warning levels for any user as necessary. Usually you'll use this feature when one user frequently stores more information than others do. For example, a graphic designer might have much higher storage needs than a customer-support person does. The good news about custom quota entries is that you can export them to other volumes, which enables you to quickly apply the same set of rules to multiple volumes.

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

  1. In Computer Management, expand Storage and then select Disk Management. Using the Volume List or Graphical view, right-click the volume you want to work with and then select Properties.

  2. On the Quota tab, click Quota Entries. Current quota entries for all users are listed. To refresh the listing, press F5 or select Refresh from the View menu.

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

  4. In the Select Users dialog box, type the name of a user in the Enter The Object Names To Select field and then click Check Names. If multiple matches are found, select the desired account and then click OK. If no matches are found, update the name you entered and try again. Repeat this step as necessary and click OK when finished.

  5. Once you've selected a name, the Add New Quota Entry dialog box is displayed. You have several options. You can remove all quota restrictions for this user by selecting Do Not Limit Disk Usage. In addition, 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.

  6. Click OK. Close the Quota Entries dialog box. Click OK on the Properties dialog box.

Updating and Customizing Disk Quota Entries

You can modify and customize disk quota entries for individual users at any time by following these steps:

  1. In Computer Management, expand Storage and then select Disk Management. Using the Volume List or Graphical view, right-click the volume you want to work with and then select Properties.

  2. On the Quota tab, click Quota Entries. Current quota entries for all users are listed. To refresh the listing, press F5 or select Refresh from the View menu.

  3. Double-click the quota entry for the user. This displays the Quota Settings For dialog box, which is similar to the dialog box shown in Figure 1.

  4. To remove all quota restrictions for this user, select Do Not Limit Disk Usage.

  5. To modify the current limit and warning level, select Limit Disk Space To and then enter the appropriate values in the fields provided.

  6. Click OK.

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 remaining files on the volume, follow these steps:

  1. In Computer Management, expand Storage and then select Disk Management. Using the Volume List or Graphical view, right-click the volume you want to work with and then select Properties.

  2. On the Quota tab, click Quota Entries. Current quota entries for all users are listed. To refresh the listing, press F5 or select Refresh from the View menu.

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

  4. 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.

  5. Use the List Files Owned By selection list to display files for the user whose quota entry you are deleting. You must then specify how the files for the user will be handled. You can handle each file separately by selecting individual files and then choosing an appropriate option. Select multiple files by using the Shift or Ctrl key. The following options are available:

    • q Show Folders Only Changes the view to show only folders in which the user has files. In this way, you can delete, move, or take ownership of all the user's files in a particular folder.

    • q Show Files Only Shows all files that the user owns according to the folder in which they were created. This is the default view.

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

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

    • q Move Files To Select the files that you want to move and then, in the field provided, enter the path to a folder on a different volume. 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 Move.

  6. Click Close when you are finished managing the files. Provided that you've appropriately handled all user files, the disk quota entries are deleted.

Exporting and Importing Disk Quota Settings

Rather than re-creating custom disk quota entries on individual volumes, you can export the settings from a source volume and import them to another volume. Both volumes must be formatted using NTFS. To export and then import disk quota entries, perform the following steps:

  1. Start Computer Management. You are connected to the local computer by default. If you want to work with disk quotas on a remote computer, right-click Computer Management in the console tree and then select Connect To Another Computer. In the Select Computer dialog box, select 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 source volume and then select Properties.

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

  5. From the Quota menu, select Export. This displays the Export Quota Settings dialog box. Use the Save In selection list to choose the location to which to save the file containing the quota settings, and then set a name for the file using the File Name field. Next click Save.


    Tip 

    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. From the Quota menu, select Close to exit the Quota Entries dialog box. Click OK to close the Properties dialog box.

  7. Right-click Computer Management in the console tree. From the shortcut menu, select Connect To Another Computer. In the Select Computer dialog box, select the computer containing the target volume on which you want to use the exported settings.

  8. Expand Storage and then select Disk Management. Using the Volume List or Graphical view, right-click the target volume and then select Properties.

  9. Click the Quota tab, ensure that Enable Quota Management is selected, and then click Quota Entries. This displays the Quota Entries dialog box for the target volume.

  10. From the Quota menu, select Import. In the Import Quota Settings dialog box, select the quota settings file that you saved previously. Click Open.

  11. If the volume had previous quota entries, you'll have the opportunity to replace or keep existing entries. When prompted about a conflict, click Yes to replace an existing entry, or click No to keep the existing entry. The option to replace or keep existing entries can be applied 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, that 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 are completely removed. To disable quotas for a particular user. To disable quota tracking and management on a volume, follow these steps:

  1. Start Computer Management. You are connected to the local computer by default. If you want to disable disk quotas on a remote computer, right-click Computer Management in the console tree and then select Connect To Another Computer. In the Select Computer dialog box, select 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 and then select Properties.

  4. On the Quota tab, clear the Enable Quota Management check box. Click OK. When prompted to confirm, click OK.

Other  
  •  Installing Networking Components in Vista
  •  Configuring Local Area Connections
  •  Managing Local Area Connections
  •  Troubleshooting and Testing Network Settings
  •  Detecting and Resolving Windows Vista Errors
  •  Scheduling Maintenance Tasks in Vista
  •  Backing Up and Recovering a Computer with Vista
  •  Troubleshooting Startup and Shutdown
  •  How an Access Control List Is Used
  •  Silverlight Tools: XML Editors
  •  Algorithms for Compiler Design: VARIOUS APPROACHES TO SYMBOL TABLE ORGANIZATION
  •  Algorithms for Compiler Design: REPRESENTING THE SCOPE INFORMATION IN THE SYMBOL TABLE
  •  Algorithms for Compiler Design: ACTIVATION OF THE PROCEDURE AND THE ACTIVATION RECORD
  •  Algorithms for Compiler Design: STACK ALLOCATION
  •  Algorithms for Compiler Design: ERROR RECOVERY IN LR PARSING
  •  Algorithms for Compiler Design: PREDICTIVE PARSING ERROR RECOVERY
  •  Algorithms for Compiler Design: LOOP OPTIMIZATION
  •  Algorithms for Compiler Design: ELIMINATING INDUCTION VARIABLES
  •  Algorithms for Compiler Design: ELIMINATING LOCAL COMMON SUBEXPRESSIONS
  •  Algorithms for Compiler Design:
  •  
    Top 10
    Windows 7 : Getting Help and Giving Others Assistance
    Programming with SQL Azure : Record Navigation in WCF Data Services
    Windows Server 2008 : Keeping a Distributed Environment in Sync
    Managing and Administering SharePoint 2010 Infrastructure : Using Additional Administration Tools for SharePoint
    LINQ Projection Queries and Alternatives in WCF Services
    Windows 7 : Using Windows Defender (part 2) - Scanning Your Computer for Spyware and Malware
    Visual Studio 2010 : Structured Exception Handling to the Rescue
    Debugging Tools For Parallel Tasks
    Deploying the Client for Microsoft Exchange Server 2010 : Preparing the Deployment
    Excel Programmer : Fix Misteakes
    Most View
    Filtering Out Evil with Firewalls (part 1)
    Using the Dynamic Keyword in C# 4.0
    .NET security : Administering Isolated Storage
    iPhone 3D Programming : Adding Depth and Realism - Creating and Using the Depth Buffer
    Building Android Apps: Creating a Dynamic Manifest File
    SQL Server 2008 : Working with DML Queries - Using the UPDATE Statement (part 1)
    Algorithmic Run Time
    Programming the Mobile Web : HTML 5 (part 1)
    SQL Server 2008 : Working with DML Queries - Using the DELETE Statement
    Introducing WPF
    .NET security : Isolated Storage Explained
    Introducing IIS 7
    IIS 7 Administration
    SQL Server 2008 : Developing with LINQ to SQL (part 2) - Uncovering LINQ to SQL with Linqpad
    SQL Server 2008 : Monitoring Your Server - Monitoring Your CPU
    Developing an SEO-Friendly Website: Content Delivery and Search Spider Control (part 2)
    Work with IIS 7.0 : Delegate Rights Assignments
    Windows 7 : Preparing Disks for Use (part 1) - Creating Mirrored, Spanned, or Striped Volumes
    Windows 7: Optimizing Performance (part 2) - Fine-Tuning Virtual Memory & Data Execution Prevention
    Building a WPF Application without XAML (part 2)