mirror of
https://github.com/Lidarr/Lidarr.git
synced 2026-03-03 00:26:58 -05:00
Warning when hardlinking and metadata tagging enabled #628
Labels
No labels
Area: API
Area: Database
Area: Db-migration
Area: Download Clients
Area: Extras
Area: Import Lists
Area: Indexer
Area: Metadata API
Area: Notifications
Area: Organizer
Area: Parser
Area: Scanning
Area: Tooling
Area: UI
Area: Unit Tests
Area: Update API
On Hold: MetadataAPI Blocking
Priority: High
Priority: Low
Priority: Medium
Status: Accepted
Status: Cannot Reproduce
Status: Confirmed
Status: Don't Merge
Status: Help Wanted
Status: In Progress
Status: Info Needed
Status: Investigating
Status: Logs Needed
Status: Maybe One Day
Status: Needs Triage
Status: On Hold
Status: Ready for Review
Status: Unlikely
Status: Waiting for OP
Status: Won't Fix
Type: Bug
Type: Documentation
Type: Duplicate
Type: Enhancement
Type: Enhancement
Type: External Bug
Type: Feature Request
Type: Regression
Type: Support
Type: Support.
conflict
conflict
no-conflict
not-pulled
radarr-pull
readarr-pull
sonarr upstream
sonarr-pull
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/Lidarr-Lidarr#628
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @tommyalatalo on GitHub (Oct 6, 2019).
Is your feature request related to a problem? Please describe.
When a torrent client is used, along with hardlinking and metadata tagging of the files, the files in the torrent client are corrupted as the metadata is written to the hardlinked files which then won't match the checksums in the torrent client.
Describe the solution you'd like
There should be implemented a prominent warning that if there is a torrent client used with both hardlinking and metadata tagging enabled, the torrent client data is very likely to be corrupted.
AB#396
@MammothJerk commented on GitHub (Jan 31, 2020):
I was wondering why only my music torrents were getting these errors, this seems to be my problem as well and it was driving me crazy.
@IllMethods commented on GitHub (Apr 21, 2020):
Yep, having the same issues...
Mine setup
Transmission
Lidarr
Hardlinking
Rescan and Fingerprinting set to always
Not sure what else to add, but only happens to torrents involved with Lidarr.
@IllMethods commented on GitHub (Apr 21, 2020):
Just found this...
Overview
Lidarr can write metadata for matched tracks to the audio file (e.g. ID3 tags). This data contains the track title, artist track number etc. as well as MusicBrainz identifiers. The result should be similar to that of MusicBrainz Picard, though we currently don't populate all of the fields that Picard does.
Note that if you enable this option then the files on disk will be changed. If the files are part of a torrent you are seeding then the torrent will be corrupted.
Makes sense since the files that are hardlinked are the same files you are still seeding... Changes made to the hardlinked files with happen to the seeded files also...
Write Metadata to Audio Files - turn this option off
Possibly also change file date and scrub existing tags
@Elmeromoto commented on GitHub (Sep 25, 2023):
Yeah this is a horrible setting. It can (and does!) completely destroy a person's ratio and break their seeding. It needs a lot more controls built around it.
@john-parton commented on GitHub (Jul 27, 2024):
If hardlinking used "reflink" or "block cloning" on linux, this wouldn't be a problem. Is there a way to tell Lidarr to use
cp --reflink?@mat926 commented on GitHub (Oct 25, 2024):
I've been having this problem too. The current workaround I have is disable hardlinking. But the biggest downside to that is the files are copied and that would take up twice the disk space. Is there a better option available that doesn't take up twice the space and still have metadata tagging enabled?
@john-parton commented on GitHub (Oct 25, 2024):
If your filesystem supports it (btrfs and recent zfs), cp --reflink always will make a COW copy of the file. This original copy wouldn't take up any space, but once the file is modified, it will take up some. The amount is dependent on filesystem implementation and configuration, as well as dependent on the exact operation of the tagging code.
Most likely the benefit would be largely negated for small files like audio files, but it could be nice to test.
@Lord-Valen commented on GitHub (Apr 18, 2025):
github.com/Lidarr/Lidarr@d8850af019/src/NzbDrone.Common/Disk/DiskTransferService.cs (L346-L391)Seems that lidarr will try to reflink as long as the source and target disks use the same format out of btrfs, zfs, and xfs, and it is not told to hardlink. "Copy" will reflink and keep the original and copy. "Move" will reflink and delete the original afterward. It wouldn't be too hard to have the same flow in the hardlink mode, but seeing this it seems to be a deliberate choice. If we want reflinks, we should probably just use the copy mode.