This post discusses several methods of using File Server Resource Manager (FSRM) auto-quotas with a single share for many home directories, and how you can bypass the limitation with FSRM quotas over SMB and return a reduced amount of disk space through the single share. The two methods discussed are reparse points, and combined FSRM and NTFS quotas.
There is an inherent problem with FSRM quotas in Windows Server 2003 R2 – when accessed remotely, a hard quota is used to report disk free space to the client only when a quota is set on the root of the disk or share. The share overwrites volume root if both have hard quotas set.
Unfortunately this is not practical in this scenario, as the free space from the quota root down will be affected by a hard quota. For example, a hard quota set on the root of the share, where that share contains user home directories, the total space would be limited based on the quota, rather than limiting each home directory. No method could be found to prevent inheritance of a quota setting to sub-folders.
Note that this does not occur when accessing the quota locally on a machine; the problem exists due to the SMB call for QUERY_FS_INFO is querying the free space at the root, not the free space at the folder (historically there was no difference). File screening has the capability to include a blocking exception entry deeper in the tree to override policies above, but quotas do not have the same interface through the GUI.
The following methods were tried (and failed) to see if there was an easy workaround for this issue:
- A mapped drive to the UNC directly (eg. file://server/share/user1)
- A mapped drive to the share (eg. file://server/share)
- No mapped drive, using UNC only
- path parsing disabled accessing a mapped drive file:///?\h:\
- pushd file://server/share/user1
- subst y: h:\
However, if this functionality is required, there are at least two methods to work around the problem – using reparse points or using a combination of NTFS quotas and FSRM quotas.
Reparse Points
Testing was conducted to see whether reparse points, junctions, mount points or symbolic links could be used to return a different amount of free space from the root of the volume compared to the quota applied to each home drive folder.
Using one directory junction, one share, one hard quota and one autoquota, it is possible to use FSRM R2 quotas to report the free disk space based on a hard quota at a root folder, while still providing different per-folder quotas.
For example, in the following scenario, it’s possible to report a reduced disk free space limit, using only FSRM quotas and a directory junction point on the same volume.
- Cluster share Root: f:\QuotaTest - file://server/QuotaTest
- User Home Root: file://server/f$/users
- User home drive: \\server\quotatest\junction\user1 (f:)
- FSRM Hard Quota on the share root: 10MB
- FSRM Hard or Soft autoquota on the home directory root: 20MB
- Junction Directory: f:\quotatest\junction
- Junction Target: f:\users
- Create the directory junction/reparse point: junction.exe f:\quotatest\junction f:\users
Tests completed under this scenario from a workstation:
- Directory of H: on reports 10MB free space, based on the hard quota set at the root of the share
- Explorer view of H: reports 10MB free space, with the drive mapped through the junction (AD)
- Copy a 13MB file to H: succeeds, still 10MB reported free, FSRM warning triggered based on 50% usage (of the 20MB)
- Copy another 13MB file to H: fails, 20MB hard autoquota set on h:\users prevents copy
Notes:
- Apparently Windows Vista clients using SMB 2.0 do not have this issue
- Windows 2000 and later support directory junctions – reparse points. When accessing a reparse point, the processing occurs on the server, unlike Vista/2008 which has a modified MUP and network redirector architecture, supporting client-side processing of file and directory symbolic links.
- This still has at least one major disadvantage in that free space will not change for users, they would always see the free space available at the root of the share, 10MB in the example above. However, if hard FSRM autoquotas were used without this method, the free space reported to users would be the total free space on the volume, regardless of the 10MB hard limit that they would be limited to. This is potentially confusing in both scenarios.
Combined FSRM and NTFS quotas
Being completely different technologies, it doesn’t seem that NTFS quotas and FSRM quotas conflict with each other. Therefore one method of providing soft/hard FSRM quotas and also reducing the disk space seen by users is to also use NTFS hard quotas.
There are several caveats with this approach:
- NTFS quotas are only relevant for user-owned data, where each user has data in one directory, ideal for home directories, but not suitable for shared data directories.
- The two different quota systems would have to be separately maintained and aligned as configuration changes in the other. While all users conform to the standard template this would not be challenging, but as individual quotas are changed this will become problematic (as always happens).
Overall this solution provides a more realistic disk-free result for each user, provided the FSRM hard quota matches the NTFS hard quota, and file ownership is correctly set.
The following testing was completed with FSRM and NTFS quotas working together in a 2003 MSCS cluster:
- Hard NTFS quota of 15MB
- Soft auto-quota of 20MB
- Writing a file using user1 to the H: drive, automatically creates a quota entry in NTFS quotas
- Writing a second file which takes it over 10MB (50%), the FSRM quota event/command takes place
- The user doing a directory of the filesystem reports only the NTFS hard quota disk free space.
- Trying to copy another file as user1 to the H: drive fails with not enough disk space according to the hard NTFS quota
- Moved the cluster group to verify this follows on a cluster
- After the group was moved to another server, conducted same tests, NTFS quotas still apply and hard limites being returned to the client as total space.
Wayne's World of IT (WWoIT), Copyright 2008 Wayne Martin.
No comments:
Post a Comment