Knowledgebase

status_loader

Incorrect number of hardlinks on network drives

Question / Problem

TreeSize shows an incorrect number of hardlinks for files that are stored on a network share. What can I do?

Answer / Solution

Starting with Windows Vista / Server 2008, Microsoft introduced "Client Caches" with the SMB2 protocol in order to speed up queries about gathering file and directory meta information on network drives. This approach also helps utilizing the available network bandwidth more efficiently. However, these caches always return an incorrect value for  NTFS hardlinks (always shown as "1"). The responsible caches can be disabled with the following steps:

  1. Run "regedit.exe".
  2. Open the path "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanmanWorkstation\Parameters".
  3. Choose "New > DWORD value" in the right click menu and set the name to "FileInfoCacheLifetime" and the value to "0".
  4. Restart Windows

After these steps, TreeSize should work properly with hardlinks. For further information about client caches, please visit https://technet.microsoft.com/en-us/library/ff686200(WS.10).aspx.

Need further help getting started?

You did not find what you were looking for? Please contact us so we can provide an answer to your question.

Contact Form