Hard links are now available for all clients on filespace format 3.8 and greater. Create multiple references to the same file without duplicating data, using the standard OS commands you already know.
What are hard links and why use them?
A hard link is a directory entry that associates a name with a file. Every file has at least one: the name it was created with. The file's data and metadata live in an inode, and each name is a reference to that inode. This release adds the ability to create additional hard links, making the same file accessible under other names or from other folders.
A file with two or more hard links may appear in multiple different locations under different names, but it only uses your storage once. Changes made through any name are visible through every name, and the underlying data is only deleted when the last remaining link is removed. This makes hard links useful when you want to reference the same asset from several different folders, reorganize your layout without copying, or keep one copy of a large media file that several teams need to see in their own folders.
Availability and requirements
- Hard links require filespace format 3.8 or greater.
- Hard links are readable and function correctly on all supported platforms and clients.
- Driver-native creation of hard links (i.e. use of the
lncommand) is supported on Linux at release. Other platforms and methods will follow in future releases.
New filespaces created after this release are on format 3.8 automatically. An existing filespace in the new LucidLink can be brought to format 3.8 with a Layout Upgrade, which is currently available by request only. Your account manager will let you know if an upgrade is needed for your filespace to take advantage of hard links.
Creating hard links
Create a hard link with the standard ln command: ln existing-file new-link-name. No flags or special tooling are required.
The new link can live in a different folder but must exist within the same filespace. Hard linking on LucidLink is only supported for files and not folders themselves.
Because both names point at the same data, an edit made through one name is immediately present under the other. It is the same file, so there is nothing to sync and nothing to keep consistent.
Hard linked files are subject to the permissions of the directory they
are in, meaning that a file in a read-only directory that is hard linked into
a read/write directory will be writeable from the read/write path (but will remain
read-only from the read-only path).
Separately, Unix permissions applied to any
hard linked file will apply to all references to that file equally (Unix permissions
are only honored on Linux and other *nixes such as MacOS and will be disregarded on Windows).
These characteristics may result in unintended access or modification
to files if not carefully managed.
Finding your hard links
Hard-linked names share a single inode number, so the standard tools you already use can enumerate them. ls -li prints the inode number in the first column, followed by the link count. find . -samefile FILE and find . -inum N list every name in the current tree that points at the same data.
Run find . -samefile FILE before you reorganize or clean up, so
you know whether a file is also reachable under other names.
Creation of hard links is also logged as a distinct filespace event "HardLinkCreate",
in the filespace Audit Trail (available subject to plan entitlements
and where enabled, see
Audit Trail with New LucidLink
for more information).
Removing hard links
Delete any name the normal way, with rm, Finder, or Explorer. The data and every remaining link stay intact, and storage is reclaimed only after the last link is deleted.
Please reach out if you have any questions
Hard links work the way they do on any filesystem, using the commands and tools your team already knows.
If you still have questions, don't hesitate to reach out to Support or your Customer Success Account Manager.