GetDiskFreeSpaceEx returns disk free space without considering user-quota



Hi

I am confused with what GetDiskFreeSpaceEx returns.
GetDiskFreeSpaceEx returns below three parameters:
lpFreeBytesAvailable: the total number of free bytes on a disk that
are available to the
user who is associated with the calling thread. If per-user quotas are
being used, this
value may be less than the total number of free bytes on a disk.
lpTotalNumberOfBytes: the total number of bytes on a disk that are
available to the user who
is associated with the calling thread. If per-user quotas are being
used, this value may be
less than the total number of bytes on a disk.
lpTotalNumberOfFreeBytes: the total number of free bytes on a disk.

In our application the parameters lpFreeBytesAvailable and
lpTotalNumberOfBytes are not
returning the values considering the user-quota that is defined on the
volume.

1) Drive D has 25 Gb total space and 19 GB free space.
2) Enabled quota in the D:\ Drive Properties/Quota tab and checked
"Deny disk space to user
exceeding quota limit" checkbox. Verified that the disk quota system
is active.
3) Set quota limit for a user (domain user) as 2 GB through "Quota
entries".
4) Ran the application in the context that user. The
parameters(lpFreeBytesAvailable = 19 GB
and lpTotalNumberOfBytes = 25 GB) returns sizes without considering
user quota.

But they do consider the hard quota set through FSRM (File Server
Resource Manager) on
Windows 2003 server R2 and Windows 2008 server OS, but does not
consider the quota set per-user.

So the statement “total number of free bytes on a disk that are
available to the user who is
associated with the calling thread” seems inacccurate. May be I am not
understanding
it correctly. Please comment on this.

~Somesh
.



Relevant Pages

  • Re: Quota and who is using my drive?
    ... I am afraid of that we can not set a specific folder's quota. ... quota feature is designed to limit disk usage of users. ... Microsoft CSS Online Newsgroup Support ... >permissions to the folder. ...
    (microsoft.public.windows.server.sbs)
  • GetDiskFreeSpaceEx returns disk free space without considering user-quota
    ... I am confused with what GetDiskFreeSpaceEx returns. ... value may be less than the total number of free bytes on a disk. ... lpTotalNumberOfBytes: the total number of bytes on a disk that are ... exceeding quota limit" checkbox. ...
    (microsoft.public.win2000.file_system)
  • GetDiskFreeSpaceEx returns disk free space without considering user-quota
    ... I am confused with what GetDiskFreeSpaceEx returns. ... value may be less than the total number of free bytes on a disk. ... lpTotalNumberOfBytes: the total number of bytes on a disk that are ... exceeding quota limit" checkbox. ...
    (microsoft.public.win32.programmer.kernel)
  • RE: mapped drive size
    ... Is "Disk Quota" enabled on the drive on which the share folder is stored? ... Log event when a user exceeds their quota limit is checked. ... If a volume has multiple folders, the quotas assigned to that volume apply ...
    (microsoft.public.windows.server.sbs)
  • Re: Elastic Quota File System (EQFS)
    ... > I agree that the situation with 10000+ users is where such a filesystem ... It is the difference between actual disk usage and sum ... > of all disk quota that provides the elastisicty. ... get back as much space as the compression achieves. ...
    (Linux-Kernel)

Loading