none
NTFS metadata - Is it possible to shrink $Secure:$SDS

    Question

  • Is it possible to shrink the NTFS metadata?
    I have a Windows 2003 Server with a 10GB primary partition, and can see that $Secure:$SDS has grown to almost 3GB (or 30% of the partition size) - MFT Zone is set to default 12.5%, MFT is currenlty 600MB.

    I would like to know if there are any tools (Microsoft native or 3rd party) that allow you defrag and shrink the metadata without either formatting the partition or rebuilding the server.

    This issue first came to light with my investigation into a discrepancy between the used / free space on this server - I have already looked into http://support.microsoft.com/default.aspx/kb/303079, but this is not the issue.

    I have also spent a couple of days researching this and have been unable find out if this is even possible / supported - please help.

    Thanks & Best Regards,
    Jon
    Friday, August 28, 2009 10:54 AM

Answers

  • Hi Jon,

    From the file version, it seems that they were kept update on your server. To apply the latest version, you may try switching to C:\Windows\System32 and run chkdsk.exe under the system folder.

    Based on the results you post, previously MFT was 600MB, now the Total MFT size is 567 MB, it may shows that it was compressed little. To shrink MFT zone in a large number, I am afraid that you may need to use third party tool to achieve it. Thanks.


    This posting is provided "AS IS" with no warranties, and confers no rights.
    • Marked as answer by David Shen Friday, September 04, 2009 9:17 AM
    Wednesday, September 02, 2009 10:26 AM

All replies

  • Hello Jon,

    For $Secure:$SDS$, we can use Chkdsk.exe tool to compact the security descriptor stream when you use the /f switch. Please check to see this KB article http://support.microsoft.com/default.aspx/Kb/919241, The CHKDSK utility in Windows vista and later version of operation system has the abliti to compress the security stream.

    For $mft zone, currently we can use built-in disk defragment tool to defrag it, but cannot shrink the MFT zone.

    Thanks.

    This posting is provided "AS IS" with no warranties, and confers no rights.
    • Proposed as answer by David Shen Tuesday, September 01, 2009 1:52 AM
    • Marked as answer by David Shen Tuesday, September 01, 2009 7:12 AM
    • Unmarked as answer by jrmunday Tuesday, September 01, 2009 9:52 AM
    • Unproposed as answer by jrmunday Tuesday, September 01, 2009 10:19 AM
    Monday, August 31, 2009 1:27 PM
  • Hi David,

    Thanks for this KB article. Although the behavior is not exactly the same, the hotfix update should resolve it as described in the article ... unfortunately after applying the hotfix, restarting the server and runnning CHKDSK C: /F I still have the same amount of free space. Does this mean that the hotfix has not been applied successfully or that there is no scope for compressing the $Secure metadata on this particular system?

    One thing I did notice is that the .exe and .dll refered to in the KB article is a lower version to what is on my system after appying the update. I didn't check the version before so have no idea if it was already running this later version before applying the hotfix.

    KB refers to;
    Windows Server 2003 with Service Pack 2, x86-based versions
    Autochk.exe   5.2.3790.4216   600,064   10-Jan-2008 17:29   x86 SP2
    Untfs.dll   5.2.3790.4216    325,632   11-Jan-2008   10:31   x86 SP2

    Versions on my server;
    Autochk.exe   5.2.3790.4263
    Untfs.dll   5.2.3790.4263


    Results after update and using the /F switch;

    Volume System (C:)
        Volume size                                = 10.00 GB
        Cluster size                               = 4 KB
        Used space                                 = 9.36 GB
        Free space                                 = 653 MB
        Percent free space                         = 6 %

    Master File Table (MFT) fragmentation
        Total MFT size                             = 567 MB
        MFT record count                           = 74,032
        Percent MFT in use                         = 12 %
        Total MFT fragments                        = 4


    10485599 KB total disk space.
     6272612 KB in 58976 files.
      218388 KB in 5649 indexes.
           0 KB in bad sectors.
     3325199 KB in use by the system.
       54480 KB occupied by the log file.
      669400 KB available on disk.

        4096 bytes in each allocation unit.
     2621399 total allocation units on disk.
      167350 allocation units available on disk.


    Thanks,
    Jon

    Tuesday, September 01, 2009 10:08 AM
  • Hi Jon,

    From the file version, it seems that they were kept update on your server. To apply the latest version, you may try switching to C:\Windows\System32 and run chkdsk.exe under the system folder.

    Based on the results you post, previously MFT was 600MB, now the Total MFT size is 567 MB, it may shows that it was compressed little. To shrink MFT zone in a large number, I am afraid that you may need to use third party tool to achieve it. Thanks.


    This posting is provided "AS IS" with no warranties, and confers no rights.
    • Marked as answer by David Shen Friday, September 04, 2009 9:17 AM
    Wednesday, September 02, 2009 10:26 AM
  • Jon,

    PerfectDisk by Raxco Software is a fantastic disk defragmenter that can defrag all the metadata files.  I use it regularly on live W2K3 servers and have never experienced corruption or any other issue with it.

    BTW, I am not associated with nor do I work for Raxco; I just came across your post looking for info about $Secure:$SDS

    See http://www.facebook.com/pages/PerfectDisk/49084113228 for more info.

    Max

    Monday, September 14, 2009 5:07 PM
  • I just realized your question was about how to defrag the internal structure of the metadata file.  Unfortunately PerfectDisk does not do that.
    Monday, September 14, 2009 5:11 PM