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. To create a hard link, use the  CreateHardLink function. Any changes to that file are instantly visible to applications that access it through the hard links that reference it.

However, the directory entry size and attribute information is updated only for the link through which the change was made. Note that the attributes on the file are reflected in every hard link to that file, and changes to that file's attributes propagate to all the hard links.

If you reset the READONLY attribute on a hard link to delete that particular hard link, and there are multiple hard links to the actual file, you will need to reset the READONLY bit on the file from one of the remaining hard links to bring the file and all remaining hard links back to the READONLY state.

For example, in a system where C: and D: are local drives and Z: is a network drive mapped to \\fred\share, the following references are permitted as a hard link:

  • C:\dira\ethel.txt linked to C:\dirb\dirc\lucy.txt
  • D:\dir1\tinker.txt to D:\dir2\dirx\bell.txt
  • C:\diry\bob.bak linked to C:\dir2\mina.txt

However, these are not:

  • C:\dira linked to C:\dirb
  • C:\dira\ethel.txt linked to D:\dirb\lucy.txt
  • C:\dira\ethel.txt linked to Z:\dirb\lucy.txt

To delete a hard link, use the DeleteFile function. You can delete hard links in any order regardless of the order in which they are created.

Other considerations

  • Antivirus – security software and antivirus can block access to the file when you create a hard link so make sure it is not blocked by them.
  • Security policy – your security policy should not be blocking hard links
  • Insufficient Disk space – make sure the drive has sufficient space to download the content
  • Check the permissions on the drive and folder of the source and target
  • Configuration Manager did not create the folder for the hard link or it deleted it after the hard link failure – you can verify that in the CAS.log and NomadBranch.log
  • Configuration Manager CAS created the folder (such as 2f) in the ccmcache folder but deleted for whatever reason, i.e. content was not hashed successfully by Configuration Manager client.