Setting Disk Quotas
Windows Server 2008 supports two mutually exclusive methods forsetting quotas on the amount of file system resources a user can
use—disk quotas or directory quotas. Disk quotas were introduced in
Windows 2000, and are applied to specific users and limit the amount of
disk space that user can use on a particular volume. Directory quotas
are applied to all users and limit the amount of disk space that users
can use in a particular folder and its subfolders. Directory quotas were
introduced in Windows Server 2003 R2 with the new File Server Resource
Manager, and they are covered in detail in Chapter 20.
Enabling Quotas on a Disk
By default, disk quotas are disabled in Windows Server 2008. You canenable disk quotas on any volume that has been assigned a drive letter.
To enable quotas on a volume, follow these steps:
- In Windows Explorer, right-click a drive letter and open the properties of that drive.
- Click the Quota tab, shown in Figure 19-23, and then click Show Quota Settings.
- Select the Enable Quota Management check box to enable quotas for the disk, as shown in Figure 19-24.
- To enable hard quotas that can't be exceeded, select the Deny Disk Space To Users Exceeding Quota Limit check box.
- Set the limits and warning level, as shown in Figure 19-24. You can also enable logging on this page.
- Click OK to enable the quotas. You'll be prompted one last time
to confirm, as shown in Figure 19-25. Click OK and the quotas will be
enabled.
Setting Per-User Quotas
You can set quota limits on individual users, or you can have limitsapply equally to all non-administrative users. Unfortunately, you can't
set limits on groups of users. And any users who already own files on
the disk will have their quotas initially disabled. New users will have
the default quotas for the disk applied as you would expect when they
first save a file on the disk.
To set the quotas for individual users, follow these steps:
- In Windows Explorer, right-click a drive letter and open the properties of that drive.
- Click the Quota tab, and then click Show Quota Settings to bring up the Quota Settings dialog box for that disk.
- Click Quota Entries to open the Quota Entries dialog box for the disk, as shown in Figure 19-26.
- To modify the quota for a user already listed, select the user
and then click Properties to open the quota settings for that user, as
shown in Figure 19-27. Set the quota for the user and click OK to return
to the Quota Entries dialog box.
- To create a quota for a user who doesn't have one yet, and who
needs a quota different from the default for the disk, click New Quota
Entry.
- Select the user or users to apply the new quota to, and click
OK to bring up the Add New Quota Entry dialog box, as shown in Figure
19-28.
- Click OK to add the new entry and return to the Quota Entries
dialog box. Close the Quota Entries dialog box, click OK in the Quota
Settings dialog box, and then click OK in the Properties dialog box for
the drive.
- To manage quotas from the command line, you need to use
Fsutil.exe. Even for a determined command-line type, it's pretty lame.
Stick to the GUI, and use import and export whenever possible.
Importing and Exporting Quotas
Managing disk quotas is a potentially tedious job if you try to usefine-grained control of individual quotas. The best solution is to use a
single, general quota that is correct for almost all users, and then do
only limited exceptions to that quota for very specialized cases. If
you do have complicated quotas, however, and you need to transfer them
to another server or another volume, you can export a set of quotas and
then import them to another volume.
To export the quotas on a volume, follow these steps:
- Open the Quota Settings page for the volume you want to export the quotas from.
- Click Quota Entries to open the Quota Entries dialog box.
- Highlight the quotas you want to export.
- Choose Export from the Quota menu. Type in a name and location for the export file and click Save.
- Open the Quota Settings page for the volume you want to import the quotas to.
- Click Quota Entries to open the Quota Entries dialog box.
- Choose Import from the Quota menu. Type in a name and location for the import file and click Open.
- If there are conflicting quotas, you'll be prompted to replace the existing quotas, as shown in Figure 19-29.
- Choose to replace a quota by clicking Yes or to not keep the
existing one by clicking No. You can have the action repeated for any
further conflicts by selecting the Do This For All Quota Entries check
box.
No comments:
Post a Comment