|
3.4. Limiting Use of Disk Space with QuotasWindows 2000 first introduced the quota feature, allowing an administrator to define a limit or set of limits on the consumption of disk space by individual users. Windows quota support, up until Windows 2000, was available only through third-party software, which was typically very expensive. Windows Server 2003's quota management features some interesting properties:
As usual, though, neat features always contain weak points. First, quotas are supported only on disks formatted with the NTFS filesystem. This isn't too surprising because most progressive filesystem features aren't available under the various flavors of FAT. Second, and perhaps more disturbing, due to an architectural limitation, filesystem-based quotas can be added only to users. This creates quite a headache, as most other network operating systems allow you to set a default quota based on group membership. In this manner, all normal users could have 500MB, power users and executives could have 1.5GB, and administrators could have unrestricted space. Alternatively, payroll users could have 250MB while the sales team, with their myriad PowerPoint presentations, might need 1GB a piece. Alas, Windows Server doesn't support this, but later in this section I'll show you a problematic but workable way around this limitation. And third, Windows Server 2003 doesn't provide any sort of messaging mechanism when users exceed their quota. The OS simply writes an event to the System event log, and although you can filter through these events via either the GUI or the command-line as described later, it still requires manual labor on your part. This certainly could be improved in future revisions. 3.4.1. Setting Default QuotasTo set up default quotas through Windows Explorer, follow these steps:
3.4.2. Managing Quotas from the Command-LineTo set up default quotas and modify them using the command-line, type the following at the prompt: fsutil quota modify [VolumeOrDrive] [warninglevel] [hardquota] [username] replacing the text in brackets with the appropriate information as specified in the following list:
Using fsutil.exe, you can create scripts to automatically set quota entries upon new-user creation to work around the limitation of assigning quotas to groups, as described in the previous section. fsutil.exe can help you access functionality more quickly and efficiently than you can by using the GUI interface. The following examples, designed to run from a command-line, illustrate the quota functionality available through fsutil.exe. To disable quota support on drive C: fsutil quota disable C: To enable quota support on drive E: fsutil quota enforce E: To set a 250MB quota for Lisa Johnson (user ID lmjohnson) on drive C: fsutil quota modify C: 250000000 lmjohnson To list the current quotas set on drive D: fsutil quota query D: To track the disk usagein other words, to list which users are taking up what amount or portion of spaceon drive F: fsutil quota track F: To list all users over quota on any volume on the server: fsutil quota violations 3.4.3. Configuring Individual Quota EntriesYou might find it useful to set individual quotas for specific users which exempt them from a more limiting default quota you might have configured. This is useful in working around the limitation of being able to assign quotas to users and filesystems, but not to groups. You can set these individual quota entries through the GUI by clicking the Quota Entries button on the Quota tab under the Properties sheet of the disk in question. In the Quota Entries for Drive box, select Quota from the pull-down menu and click New Quota. Figure 3-12 shows this. Figure 3-12. Entering a new disk quota entrySelect the user to which to apply the new quota, and in the box, configure the restrictions on the user's space. You also can use the command-line functions, as illustrated previously, to perform this task. |
|