Never run a server before?
Hardlinks and Instant Moves (Atomic-Moves)
If you’re wondering why hardlinks aren’t working or why a simple move is taking far longer than it should.
Description#
This guide consists of 4 sections.
- This page with a short description.
- How to set up for your installation method.
- Examples What you should use for your path settings in your used applications.
- Check if hardlinks are working
So you want one of the following?
- Instant moves (Atomic-Moves) during import of the Starr Apps (useful when using Usenet)?
- You don't want to use twice the storage when using torrents. (hardlinks)?
- You want to perma-seed?
Then Continue to How to set up for your installation method.
FAQ#
Hardlinks Limitations#
What are Hardlinks#
What are Instant Moves (Atomic Moves)#
Note
What are Instant Moves (Atomic Moves)? This is a real move, not a copying of a file from the download folder to the media folder and then deleting the file from the download folder.
What are the Starr Apps#
Note
What are the Starr Apps?
Sonarr, Radarr, Lidarr, etc.
Permissions, ownership, and UMASK#
Note
Permissions, ownership, and UMASK
Hardlinks and instant (atomic) moves require all paths to be on one filesystem, but they also depend on permissions: every app must be able to read — and the apps that import, upgrade, or delete must be able to write — each other's files. This is governed by the user and group your apps run as, the UMASK, and ownership — assumed knowledge here and explained in detail in the Servarr Docker Guide.
How the user and group are set depends on the image: many images (for example LinuxServer.io) use the PUID and PGID environment variables, while others use Docker's native --user / user: directive (a uid:gid pair). Either way, pick one of the two setups below and apply it consistently:
| Setup | Users | UMASK |
Resulting default permissions |
|---|---|---|---|
| Per-app user + shared group (recommended) | a separate user per app, all in one shared group | 002 |
folders 775 (drwxrwxr-x), files 664 (-rw-rw-r--) |
| Single shared user (simpler, less strict) | one user for every app | 022 |
folders 755 (drwxr-xr-x), files 644 (-rw-r--r--) |
UMASK 002 keeps the group-write bit, so files and folders created by one app can be read and written by the others. The single-user setup can use 022 because one user owns everything.
Warning
Don't use UMASK 000 (folders 777, files 666) — it makes everything readable and writable by everyone, which is poor Linux hygiene.
Sources
- TRaSH Guides, "Hardlinks and Instant Moves (Atomic-Moves)"Copied verbatim; collapsible boxes rendered as callouts, links made absolute. Upstream commit 529bd9c.
Copied from the sources above on , by a script that reruns weekly. The words are theirs, unchanged.
Page by Archer