New feature in Windows Server 2003 R2: directory-level quotas

If you are an IT administrator that has to manage file servers, you are probably familiar with Windows Server 2003 code-name R2. It's not shipped yet, but you can already download the Beta2 trial version from this location.

A new feature in this release is improved quota support. You probably know that all the existing versions of Windows do allow disk quota to be specified for the whole volume only. In R2, you get quotas that can recursively act at directory level.

You can define quotas either through the File Server Resource Management MMC snap-in, or through the new DIRQUOTA.EXE command-line utility. Here is an example where I limit the total space udner c:\test1 to 5 KB:

C:\>md c:\test1

C:\>dirquota quota add /path:c:\test1 /limit:5KB

Quota successfully created for "c:\test1".

C:\>copy \WINDOWS\system32\ntoskrnl.exe c:\test1
There is not enough space on the disk.
        0 file(s) copied.

C:\>copy \AUTOEXEC.BAT c:\test1
        1 file(s) copied.

C:\>dirquota quota list
Quotas on machine AOLTEAN-A1:

Quota Path:             C:\test1
Source Template:        None
Quota Status:           Enabled
Limit:                     5.00 KB (Hard)
Used:                      2.00 KB (40.0%)
Available:                 3.00 KB
Peak Usage:                2.00 KB (7/1/2005 7/1/2005)

C:\>md c:\test2

C:\>copy \AUTOEXEC.BAT c:\test2
        1 file(s) copied.

Another nice thing is that the new quota is more accurate. For one thing, the quota limits are acting against the physical space consumed by the file, not the logical space. So, for example, if you have a compressed file, the quota will apply to the actual size of the compressed streams on the disk. Another example is if you have a sparse file, whose physical on-disk space will be counted against the quota limit. And one more example: the quota mechanism works now with alternate streams, so your malicious users won't be able to "hide" stuff in an alternate data stream.

You can define either soft or hard limits for your quota. Also, you can define your own custom notifications in response to quota events. For example, you might want to create a separate directory for each user, and then setup a script that would automatically send an email to the users whenever the used space goes above 80% for that specific directory.

I encourage your to download the Windows Server 2003 R2 and play with these features...

Comments (4)

  1. Ravi H R says:

    Hi Adi Oltean,

    Any idea why is this released with Final release of Windows 2003?

    Best Wishes and Regards

    Ravi H R

  2. AdiOltean says:

    Actually this is not released with Windows Server 2003, but with Windows Server 2003 code-name R2. (which is a different release which did not ship yet).

    More information about R2 can be found here:

    Thanks, Adi

Skip to main content