Hard Links and Storage Space

January 3, 2012 at 08:46:42
Specs: Windows 7
In testing the "fsutil hardlink create..." command I'm getting some puzzling results. According to microsofts documentation, "A hard link is the file system representation of a file by which more than one path references a single file in the same volume." That wording seems to suggest to me that if you have a file "C:\foo.xxx" of 3GB and created a hardlink named "C:\bar.xxx" the amount of available space on the C-drive should remain unchanged after creating the hardlink. You should only be referencing the same file but by a different name--"C:\bar.xxx". However I'm not finding that is the case. I'm finding that for every hardlink that is created, the amount of storage space that is used increases by the same amount of space that "C:\foo.xxx" uses. Am I missing something here? Why does the file system not recognize that "C:\foo.xxx" and "C:\bar.xxx" are the same file and reflect that in the amount of storage space used?

See More: Hard Links and Storage Space

Report •

January 3, 2012 at 09:21:13
I've just tried that on my Windows 7 system and the free space doesn't change. Is the hard link on the same partition as the original file?

Report •

January 4, 2012 at 06:06:20
I actually mistated the issue here. There was a slight time gap from when I posted the issue and when I actually observed what was going on. Sorry about that, but here's the issue. When I make a hardlink between "C:\RootFolder\Somesubfolder\Foo.xxx" and "C:\Rootfolder\SomeotherSubfolder\Barr.xxx" I noticed that the size of "C:\RootFolder" increases. However, after reading your post I went back and tried it again, and as you said the space on C remains the same. Still confusing, though, how the space on "C:\RootFolder" changes but the overall space on C remains the same.

Report •
Related Solutions

Ask Question