beetbox / beets

music library manager and MusicBrainz tagger
http://beets.io/
MIT License
12.8k stars 1.82k forks source link

Cannot hard link across folders #3511

Closed ee6f8317 closed 4 years ago

ee6f8317 commented 4 years ago

Problem

Hi, I’m running the latest Linuxserver’s docker of Beets on a DS218+ Synology NAS with both the /downloads and /music on the same partition. When I launch the import command via ssh it show me this at the end: Running this command via PuTTY:

docker exec -it Beets-8337 /bin/bash -c 'beet import /downloads'

Led to this problem:

Error: Cannot hard link across devices.link during (b'/downloads/We The Heathens/We The Heathens - Approaching Thunder/01 - 33 Shots.mp3', b'/music/MP3/We The Heathens/1. Album/2019 - Approaching Thunder/01 - 33 Shots.mp3') of paths T, r, a, c, e, b, a, c, k, , (, m, o, s, t, , r, e, c, e, n, t, , c, a, l, l, , l, a, s, t, ), :,, , , F, i, l, e, , ", /, u, s, r, /, l, i, b, /, p, y, t, h, o, n, 3, ., 8, /, s, i, t, e, -, p, a, c, k, a, g, e , s, /, b, e, e, t, s, /, u, t, i, l, /, _, _, i, n, i, t, _, _, ., p, y, ", ,, , l, i, n, e, , 5, 2, 8, ,, , i, n , , h, a, r, d, l, i, n, k,, , , , , o, s, ., l, i, n, k, (, s, y, s, p, a, t, h, (, p, a, t, h, ), ,, , s, y, s, p, a, t, h, (, d, e, s, t , ), ),, O, S, E, r, r, o, r, :, , [, E, r, r, n, o, , 1, 8, ], , C, r, o, s, s, -, d, e, v, i, c, e, , l, i, n, k, :, , b, ', /, d, o, w, n, l, o, a, d, s, /, W, e, , T, h, e, , H, e, a, t, h, e, n, s, /, W, e, , T, h, e, , H, e, a , t, h, e, n, s, , -, , A, p, p, r, o, a, c, h, i, n, g, , T, h, u, n, d, e, r, /, 0, 1, , -, , 3, 3, , S, h, o , t, s, ., m, p, 3, ', , -, >, , b, ', /, m, u, s, i, c, /, M, P, 3, /, W, e, , T, h, e, , H, e, a, t, h, e, n, s , /, 1, ., , A, l, b, u, m, /, 2, 0, 1, 9, , -, , A, p, p, r, o, a, c, h, i, n, g, , T, h, u, n, d, e, r, /, 0, 1 , , -, , 3, 3, , S, h, o, t, s, ., m, p, 3, ',

Setup

My configuration (output of beet config) is:

lyrics:
    bing_lang_from: []
    auto: yes
    bing_client_secret: REDACTED
    bing_lang_to:
    google_API_key: REDACTED
    google_engine_ID: REDACTED
    genius_api_key: REDACTED
    fallback:
    force: no
    local: no
    sources:
    - google
    - lyricwiki
    - musixmatch
    - genius

plugins: fetchart embedart convert scrub replaygain lastgenre chroma web lyrics
directory: /music
library: /config/musiclibrary.blb
art_filename: albumart
threaded: yes
original_date: no
per_disc_numbering: no
convert:
    auto: no
    ffmpeg: /usr/bin/ffmpeg
    opts: -ab 320k -ac 2 -ar 48000
    max_bitrate: 320
    threads: 1
    dest:
    pretend: no
    format: mp3
    id3v23: inherit
    formats:
        aac:
            command: ffmpeg -i $source -y -vn -acodec aac -aq 1 $dest
            extension: m4a
        alac:
            command: ffmpeg -i $source -y -vn -acodec alac $dest
            extension: m4a
        flac: ffmpeg -i $source -y -vn -acodec flac $dest
        mp3: ffmpeg -i $source -y -vn -aq 2 $dest
        opus: ffmpeg -i $source -y -vn -acodec libopus -ab 96k $dest
        ogg: ffmpeg -i $source -y -vn -acodec libvorbis -aq 3 $dest
        wma: ffmpeg -i $source -y -vn -acodec wmav2 -vn $dest
    tmpdir:
    quiet: no
    embed: yes

    paths: {}
    no_convert: ''
    never_convert_lossy_files: no
    copy_album_art: no
    album_art_maxwidth: 0

paths:
    default: $format/$albumartist/1. Album/$original_year - $album%aunique{}/$track - $title
    albumtype_ep: $format/$albumartist/2. EP/$original_year - $album%aunique{}/$track - $title
    singleton: Non-Album/$artist - $title
    comp: Compilations/$album%aunique{}/$track - $title
    albumtype_soundtrack: Soundtracks/$album/$track $title

import:
    write: no
    copy: no
    move: no
    hardlink: yes
    resume: ask
    incremental: yes
    quiet_fallback: skip
    timid: no
    log: /config/beet.log
lastgenre:
    auto: yes
    source: album
    whitelist: yes
    min_weight: 10
    count: 1
    fallback:
    canonical: no
    force: yes
    separator: ', '
    prefer_specific: no
embedart:
    auto: yes
    maxwidth: 0
    compare_threshold: 0
    ifempty: no
    remove_art_file: no
fetchart:
    auto: yes
    minwidth: 0
    maxwidth: 0
    enforce_ratio: no
    cautious: no
    cover_names:
    - cover
    - front
    - art
    - album
    - folder
    sources:
    - filesystem
    - coverart
    - itunes
    - amazon
    - albumart
    google_key: REDACTED
    google_engine: 001442825323518660753:hrh5ch1gjzm
    fanarttv_key: REDACTED
    store_source: no
replaygain:
    auto: no
    overwrite: no
    backend: command
    targetlevel: 89
    r128: [Opus]
    command: ''
    noclip: yes
scrub:
    auto: yes

replace:
    ^\.: _
    '[\x00-\x1f]': _
    '[<>:"\?\*\|]': _
    '[\xE8-\xEB]': e
    '[\xEC-\xEF]': i
    '[\xE2-\xE6]': a
    '[\xF2-\xF6]': o
    '[\xF8]': o
    \.$: _
    \s+$: ''
web:
    host: 0.0.0.0
    port: 8337
    cors: ''
    cors_supports_credentials: no
    reverse_proxy: no
    include_paths: no
chroma:
    auto: yes
sampsyo commented 4 years ago

Hi! Can you please include the verbose output?

ee6f8317 commented 4 years ago
user configuration: /config/config.yaml
data directory: /config
plugin paths:
Sending event: pluginload
lyrics: Disabling google source: no API key configured.
library database: /config/musiclibrary.blb
library directory: /music
Sending event: library_opened
Sending event: import_begin
state file could not be read: [Errno 2] No such file or directory: '/config/stat                                                                                                                                                             e.pickle'
state file could not be read: [Errno 2] No such file or directory: '/config/stat                                                                                                                                                             e.pickle'
Sending event: import_task_created
Sending event: import_task_start
Looking up: /downloads/We The Heathens/We The Heathens - Approaching Thunder
Tagging We The Heathens - Approaching Thunder
No album ID found.
Search terms: We The Heathens - Approaching Thunder
Album might be VA: False
Searching for MusicBrainz releases with: {'release': 'approaching thunder', 'artist':                                                                                                                                                         'we the heathens', 'tracks': '8'}
Requesting MusicBrainz release f4a7c00d-2740-48e9-bf2b-48c4fae1ef74
Sending event: albuminfo_received
Candidate: We The Heathens - Approaching Thunder (f4a7c00d-2740-48e9-bf2b-48c4fae1ef7                                                                                                                                                        4)
Computing track assignment...
...done.
Success. Distance: 0.00
Requesting MusicBrainz release 37f7c445-8946-4f16-b0d9-da7b8f18b872
primary MB release type: album
Sending event: albuminfo_received
Candidate: We The Heathens - Regicide (37f7c445-8946-4f16-b0d9-da7b8f18b872)
Computing track assignment...
...done.
Success. Distance: 0.60
Requesting MusicBrainz release bded38d2-9a08-421e-96f6-e8ee31b9e317
primary MB release type: album
Sending event: albuminfo_received
Candidate: We The Heathens - The Blood Behind The Dam (bded38d2-9a08-421e-96f6-e8ee31                                                                                                                                                        b9e317)
Computing track assignment...
...done.
Success. Distance: 0.49
Requesting MusicBrainz release ba53fe1b-1cc1-4093-8f12-1f8a3db87b2a
primary MB release type: album
Sending event: albuminfo_received
Candidate: We The Heathens - We The Heathens (ba53fe1b-1cc1-4093-8f12-1f8a3db87b2a)
Computing track assignment...
...done.
Success. Distance: 0.59
Requesting MusicBrainz release 055437bf-a0ee-4d02-9d4d-131ace965561
primary MB release type: ep
Sending event: albuminfo_received
Candidate: We The Heathens - Stench of a Thousand Farts (055437bf-a0ee-4d02-9d4d-131a                                                                                                                                                        ce965561)
Computing track assignment...
...done.
Success. Distance: 0.58
chroma: acoustid album candidates: 0
Evaluating 5 candidates.

/downloads/We The Heathens/We The Heathens - Approaching Thunder (8 items)
Sending event: before_choose_candidate
Tagging:
    We The Heathens - Approaching Thunder
URL:
    https://musicbrainz.org/release/f4a7c00d-2740-48e9-bf2b-48c4fae1ef74
(Similarity: 100.0%) (Digital Media, 2019, XW)
 * Lung of Lies -> Lung Of Lies
 * Fdl          -> FDL
Sending event: import_task_choice
Sending event: import_task_apply
Replacing item 4: /downloads/We The Heathens/We The Heathens - Approaching Thunder/01                                                                                                                                                         - 33 Shots.mp3
Sending event: database_change
Sending event: item_removed
Replacing item 5: /downloads/We The Heathens/We The Heathens - Approaching Thunder/02                                                                                                                                                         - Crooked Kings.mp3
Sending event: database_change
Sending event: item_removed
Replacing item 6: /downloads/We The Heathens/We The Heathens - Approaching Thunder/03                                                                                                                                                         - Lung of Lies.mp3
Sending event: database_change
Sending event: item_removed
Replacing item 7: /downloads/We The Heathens/We The Heathens - Approaching Thunder/04                                                                                                                                                         - Fallohides.mp3
Sending event: database_change
Sending event: item_removed
Replacing item 8: /downloads/We The Heathens/We The Heathens - Approaching Thunder/05                                                                                                                                                         - Stutter.mp3
Sending event: database_change
Sending event: item_removed
Replacing item 9: /downloads/We The Heathens/We The Heathens - Approaching Thunder/06                                                                                                                                                         - Neurotic Decay.mp3
Sending event: database_change
Sending event: item_removed
Replacing item 10: /downloads/We The Heathens/We The Heathens - Approaching Thunder/0                                                                                                                                                        7 - The Order.mp3
Sending event: database_change
Sending event: item_removed
Replacing item 11: /downloads/We The Heathens/We The Heathens - Approaching Thunder/0                                                                                                                                                        8 - Fdl.mp3
Sending event: database_change
Sending event: database_change
Sending event: item_removed
8 of 8 items replaced
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Reimported album: added 1583247037.7760816, flexible attributes [] from album 2 for /                                                                                                                                                        downloads/We The Heathens/We The Heathens - Approaching Thunder
Reimported item added 1583247037.780423 from item 4 for /downloads/We The Heathens/We                                                                                                                                                         The Heathens - Approaching Thunder/01 - 33 Shots.mp3
Reimported item flexible attributes ['track_alt', 'data_source', 'track_alt', 'data_s                                                                                                                                                        ource'] from item 4 for /downloads/We The Heathens/We The Heathens - Approaching Thun                                                                                                                                                        der/01 - 33 Shots.mp3
Sending event: database_change
Reimported item added 1583247037.785113 from item 5 for /downloads/We The Heathens/We                                                                                                                                                         The Heathens - Approaching Thunder/02 - Crooked Kings.mp3
Reimported item flexible attributes ['track_alt', 'data_source', 'track_alt', 'data_s                                                                                                                                                        ource'] from item 5 for /downloads/We The Heathens/We The Heathens - Approaching Thun                                                                                                                                                        der/02 - Crooked Kings.mp3
Sending event: database_change
Reimported item added 1583247037.7894666 from item 6 for /downloads/We The Heathens/W                                                                                                                                                        e The Heathens - Approaching Thunder/03 - Lung of Lies.mp3
Reimported item flexible attributes ['track_alt', 'data_source', 'track_alt', 'data_s                                                                                                                                                        ource'] from item 6 for /downloads/We The Heathens/We The Heathens - Approaching Thun                                                                                                                                                        der/03 - Lung of Lies.mp3
Sending event: database_change
Reimported item added 1583247037.7938213 from item 7 for /downloads/We The Heathens/W                                                                                                                                                        e The Heathens - Approaching Thunder/04 - Fallohides.mp3
Reimported item flexible attributes ['track_alt', 'data_source', 'track_alt', 'data_s                                                                                                                                                        ource'] from item 7 for /downloads/We The Heathens/We The Heathens - Approaching Thun                                                                                                                                                        der/04 - Fallohides.mp3
Sending event: database_change
Reimported item added 1583247037.7981684 from item 8 for /downloads/We The Heathens/W                                                                                                                                                        e The Heathens - Approaching Thunder/05 - Stutter.mp3
Reimported item flexible attributes ['track_alt', 'data_source', 'track_alt', 'data_s                                                                                                                                                        ource'] from item 8 for /downloads/We The Heathens/We The Heathens - Approaching Thun                                                                                                                                                        der/05 - Stutter.mp3
Sending event: database_change
Reimported item added 1583247037.8021142 from item 9 for /downloads/We The Heathens/W                                                                                                                                                        e The Heathens - Approaching Thunder/06 - Neurotic Decay.mp3
Reimported item flexible attributes ['track_alt', 'data_source', 'track_alt', 'data_s                                                                                                                                                        ource'] from item 9 for /downloads/We The Heathens/We The Heathens - Approaching Thun                                                                                                                                                        der/06 - Neurotic Decay.mp3
Sending event: database_change
Reimported item added 1583247037.8061762 from item 10 for /downloads/We The Heathens/                                                                                                                                                        We The Heathens - Approaching Thunder/07 - The Order.mp3
Reimported item flexible attributes ['track_alt', 'data_source', 'track_alt', 'data_s                                                                                                                                                        ource'] from item 10 for /downloads/We The Heathens/We The Heathens - Approaching Thu                                                                                                                                                        nder/07 - The Order.mp3
Sending event: database_change
Reimported item added 1583247037.810438 from item 11 for /downloads/We The Heathens/W                                                                                                                                                        e The Heathens - Approaching Thunder/08 - Fdl.mp3
Reimported item flexible attributes ['track_alt', 'data_source', 'track_alt', 'data_s                                                                                                                                                        ource'] from item 11 for /downloads/We The Heathens/We The Heathens - Approaching Thu                                                                                                                                                        nder/08 - Fdl.mp3
Sending event: database_change
lyrics: lyrics not found: We The Heathens - Approaching Thunder - 33 Shots
lyrics: fetched lyrics: We The Heathens - Approaching Thunder - Crooked Kings
Sending event: database_change
lyrics: fetched lyrics: We The Heathens - Approaching Thunder - Lung Of Lies
Sending event: database_change
lyrics: fetched lyrics: We The Heathens - Approaching Thunder - Fallohides
Sending event: database_change
lyrics: lyrics not found: We The Heathens - Approaching Thunder - Stutter
lyrics: fetched lyrics: We The Heathens - Approaching Thunder - Neurotic Decay
Sending event: database_change
lyrics: lyrics not found: We The Heathens - Approaching Thunder - The Order
lyrics: lyrics not found: We The Heathens - Approaching Thunder - FDL
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Sending event: database_change
Error: Cannot hard link across devices.link during (b'/downloads/We The Heathens/We T                                                                                                                                                        he Heathens - Approaching Thunder/01 - 33 Shots.mp3', b'/music/MP3/We The Heathens/1.                                                                                                                                                         Album/2019 - Approaching Thunder/01 - 33 Shots.mp3') of paths T, r, a, c, e, b, a, c                                                                                                                                                        , k,  , (, m, o, s, t,  , r, e, c, e, n, t,  , c, a, l, l,  , l, a, s, t, ), :,
,  ,  , F, i, l, e,  , ", /, u, s, r, /, l, i, b, /, p, y, t, h, o, n, 3, ., 8, /, s,                                                                                                                                                         i, t, e, -, p, a, c, k, a, g, e, s, /, b, e, e, t, s, /, u, t, i, l, /, _, _, i, n,                                                                                                                                                         i, t, _, _, ., p, y, ", ,,  , l, i, n, e,  , 5, 2, 8, ,,  , i, n,  , h, a, r, d, l, i                                                                                                                                                        , n, k,
,  ,  ,  ,  , o, s, ., l, i, n, k, (, s, y, s, p, a, t, h, (, p, a, t, h, ), ,,  , s,                                                                                                                                                         y, s, p, a, t, h, (, d, e, s, t, ), ),
, O, S, E, r, r, o, r, :,  , [, E, r, r, n, o,  , 1, 8, ],  , C, r, o, s, s, -, d, e,                                                                                                                                                         v, i, c, e,  , l, i, n, k, :,  , b, ', /, d, o, w, n, l, o, a, d, s, /, W, e,  , T,                                                                                                                                                         h, e,  , H, e, a, t, h, e, n, s, /, W, e,  , T, h, e,  , H, e, a, t, h, e, n, s,  , -                                                                                                                                                        ,  , A, p, p, r, o, a, c, h, i, n, g,  , T, h, u, n, d, e, r, /, 0, 1,  , -,  , 3, 3,                                                                                                                                                          , S, h, o, t, s, ., m, p, 3, ',  , -, >,  , b, ', /, m, u, s, i, c, /, M, P, 3, /,                                                                                                                                                         W, e,  , T, h, e,  , H, e, a, t, h, e, n, s, /, 1, .,  , A, l, b, u, m, /, 2, 0, 1, 9                                                                                                                                                        ,  , -,  , A, p, p, r, o, a, c, h, i, n, g,  , T, h, u, n, d, e, r, /, 0, 1,  , -,  ,                                                                                                                                                         3, 3,  , S, h, o, t, s, ., m, p, 3, ',
sampsyo commented 4 years ago

Hmm; that's very odd—this is supposed to give a full traceback showing where the error actually came from. To clarify, did you use -vv?

Joshfindit commented 4 years ago

Seems like a standard hard link issue, not a beets issue

If you use docker exec -it Beets-8337 /bin/bash, and then use ln "/downloads/We The Heathens/We The Heathens - Approaching Thunder/01 - 33 Shots.mp3" "/music/", does it error?

If it does, this is most likely because the OS inside Docker sees /downloads and /music/ as being on different drives (which tbh my intuition tells me is the case as they are both mounted on root), and you cannot hard link between different drives (or even different partitions)

stale[bot] commented 4 years ago

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward? This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

JDIacobbo commented 1 year ago

I was able to resolve this issue by only mounting one path, /music, which contains /sorted_music and /unsorted_music and then change the directory in config.yaml to /music/sorted_music.

I believe the previous commenter was correct that separate paths within docker are viewed as individual volumes even though they may be the same physical volume. Hope this helps other who may find this issue through a Google search like I did.