| Previous | Next |
| EROFS | EPIPE |
EMLINK
Hard links, not symbolic links
EMLINK concerns the number of hard links: directory entries that refer directly to the same inode. It does not mean that a symbolic-link chain was too deep; that condition is reported as ELOOP. The affected object can be a file with too many retained names, or a directory whose link count reaches a filesystem limit as subdirectories are created or moved.
Link-count ceilings vary by filesystem and implementation. Workloads that use hard links as a versioning, deduplication, backup, or deployment mechanism can reach the limit long after the original design looked harmless. Renames can also encounter the condition because they modify directory entries and, for directories, link counts.
How to handle it
- Inspect the target inode’s link count and identify the directories or tools creating additional names.
- Do not replace hard links with symbolic links without checking caller expectations for atomicity, permissions, and portability.
- Remove obsolete links only after verifying that another name still retains the required data.
- For content-addressed storage, design retention and garbage collection around the filesystem’s link-count limits.
References
Looking for a different code? Search another status or error code.