SpaceObserver displays incorrect numbers of hardlinks for files stored on a network share. What can I do?
Question / Problem
SpaceObserver displays incorrect numbers of hardlinks for files stored on a network share. What can I do?
Answer / Solution
Since Windows 2008 Server and Windows Vista, Microsoft uses 'Client Caches' in order to speed up the queries about gathering file and directory meta information on network drives. This approach also helps to utilize the available network bandwidth more efficiently. Anyway, these caches always return an incorrect value for the NTFS hardlinks (always shown as '1').
Caches can be disabled by the following steps:
1. Run 'regedit'
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. Save the registry and quit 'regedit'.
After these steps SpaceObServer should work properly with hardlinks. For further information about the subject please visit the Microsoft Website.
Note: In case a file has been recently opened, the number of hardlinks will be shown as 1. After a few seconds the value will be shown correctly again.