Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Permission errors when trying to move transcodes from cache to library #724

Closed
zolointo opened this issue Jan 9, 2023 · 1 comment
Closed

Comments

@zolointo
Copy link

zolointo commented Jan 9, 2023

Describe the bug
I noticed a cache drive full error in unraid, and then discovered that my tdarr docker's 100 file staging area was full.

Every file had a Status of Copy failed . Not certain on how long this had been going on for.

There seems to be a permissions issue based on the Copy Failed log output, but I am unable to recreate it in a console connection or troubleshoot further.

Attempted Troubleshooting

  1. Tried re-queueing everything. Same Copy Failed error
  2. Tried changing the PUID and PGID, but no impact
  3. Ran container in Priviledged mode. No impact.
  4. Verified I am able to ls/mk/rm/cp in the cache and media folders

Environment
Unraid 6.11.5
tdarr docker latest, shows up-to-date

Please provide the following information:
Docker run command
docker run
  -d
  --name='tdarr'
  --net='br0'
  --ip='192.168.1.121'
  --privileged=true
  -e TZ="America/New_York"
  -e HOST_OS="Unraid"
  -e HOST_HOSTNAME="server"
  -e HOST_CONTAINERNAME="tdarr"
  -e 'serverIP'='192.168.1.121'
  -e 'TCP_PORT_8266'='8266'
  -e 'TCP_PORT_8265'='8265'
  -e 'PUID'='99'
  -e 'PGID'='100'
  -e 'internalNode'='false'
  -e 'nodeIP'='0.0.0.0'
  -e 'nodeID'='MyInternalNode'
  -e 'TCP_PORT_8264'='8264'
  -e 'TCP_PORT_NODEPORT'='8264'
  -e 'NVIDIA_VISIBLE_DEVICES'='GPU-8b3a0c88-d852-6fc2-ccb1-cc60591ad36a'
  -e 'NVIDIA_DRIVER_CAPABILITIES'='all'
  -l net.unraid.docker.managed=dockerman
  -l net.unraid.docker.webui='http://[IP]:[PORT:8265]'
  -l net.unraid.docker.icon='https://raw.githubusercontent.com/selfhosters/unRAID-CA-templates/master/templates/img/tdarr.png'
  -v '/mnt/user/appdata/tdarr/server':'/app/server':'rw'
  -v '/mnt/user/appdata/tdarr/configs':'/app/configs':'rw'
  -v '/mnt/user/appdata/tdarr/logs':'/app/logs':'rw'
  -v '/mnt/user/media/':'/mnt/media':'rw'
  -v '/mnt/cache/tdarr_cache/':'/temp':'rw'
  --runtime=nvidia 'haveagitgat/tdarr'

Copy Failed log:
2023-01-09T13:47:24.810Z dcRz2RtKg:[Step S02] Beginning move/copy operation
2023-01-09T13:47:24.811Z dcRz2RtKg:Calculating old and new sizes of the following files
2023-01-09T13:47:24.811Z dcRz2RtKg:/mnt/media/TV/this & show/Season 5/episode folder/episode.mkv
2023-01-09T13:47:24.812Z dcRz2RtKg:/temp/episode-TdarrCacheFile-5DRWpLzWfJ.mkv
2023-01-09T13:47:24.812Z dcRz2RtKg:Old size 0.49176764115691185. New size 0.3193208696320653
2023-01-09T13:47:24.813Z dcRz2RtKg:Folder to folder conversion is off
2023-01-09T13:47:24.813Z dcRz2RtKg:New file path /mnt/media/TV/this & show/Season 5/episode folder/episode-TdarrCacheFile-8BxXkYFWJ0.mkv
2023-01-09T13:47:24.814Z dcRz2RtKg:Ensuring output folder path exists /mnt/media/TV/this & show/Season 5/episode folder
2023-01-09T13:47:25.815Z dcRz2RtKg:Calculating cache file size in bytes
2023-01-09T13:47:25.815Z dcRz2RtKg:342868173
2023-01-09T13:47:25.816Z dcRz2RtKg:Attempting to move cache file to output folder, method 1
2023-01-09T13:47:25.817Z dcRz2RtKg:File move error: Error: EXDEV: cross-device link not permitted, rename '/temp/episode-TdarrCacheFile-5DRWpLzWfJ.mkv' -> '/mnt/media/TV/this & show/Season 5/episode folder/episode-TdarrCacheFile-8BxXkYFWJ0.mkv'
2023-01-09T13:47:25.817Z dcRz2RtKg:File move error: Cache file /temp/episode-TdarrCacheFile-5DRWpLzWfJ.mkv (342868173 bytes) does not match size of new cache file /mnt/media/TV/this & show/Season 5/episode folder/episode-TdarrCacheFile-8BxXkYFWJ0.mkv (0 bytes)
2023-01-09T13:47:25.818Z dcRz2RtKg:Attempting to move cache file to output folder, method 2
2023-01-09T13:47:25.818Z dcRz2RtKg:File move error: Error: EACCES: permission denied, copyfile '/temp/episode-TdarrCacheFile-5DRWpLzWfJ.mkv' -> '/mnt/media/TV/this & show/Season 5/episode folder/episode-TdarrCacheFile-8BxXkYFWJ0.mkv'
2023-01-09T13:47:25.819Z dcRz2RtKg:File move error: Cache file /temp/episode-TdarrCacheFile-5DRWpLzWfJ.mkv (342868173 bytes) does not match size of new cache file /mnt/media/TV/this & show/Season 5/episode folder/episode-TdarrCacheFile-8BxXkYFWJ0.mkv (0 bytes)
2023-01-09T13:47:25.820Z dcRz2RtKg:Attempting to copy

@zolointo
Copy link
Author

zolointo commented Jan 9, 2023

Found the solution on Discord.

Some of the sub-folders in my Media folder didn't have write permissions.

I did this:

  • opened a console session in unraid to the tdarr docker
  • switched to the media folder: /mnt/media
  • applied a chmod -R 777
  • applied a chown -R abc:users
  • clicked the Retry Copy button (or whatever it was called)

Success! The files moved over immediately and the next round of transcodes were queued up without issue.

@zolointo zolointo closed this as completed Jan 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant