Can't see external drive in Sonarr or Radarr

I installed the latest Coreelec on my brand new Odroid N2+, and I’ve also installed Sonarr and Radar using Docker.

Now I have an exFat external drive connected just fine, KODI has no problems detecting it and i can browse it in the kodi file manager just fine, it should be mounted in var/media, but I can’t see that folder in either Sonarr or Radarr. I can see the var folder but the folder containing the USB isn’t there.

What could be going on here? Should I use data to mount the disk or something, and if so, is there a guide for that somewhere? I’m not very used to using linux, but I can manage the basics with accessing the box using SSH etc.

You need to mount the folder into your Docker containers, because you don’t have access to the host file system from within the container itself.
The whole point of docker/containers is to keep the containers isolated from the host system.

2 Likes

I’ve used the following guide for Sonarr for instance: “Install Sonarr using Docker – Automatic TV Show Downloads” https://www.smarthomebeginner.com/install-sonarr-using-docker/amp/

It says how I can define the configuration during installation, but not how I can adjust it later on. Where can I adjust the configuration to define the right folder? By just adjusting the path here, it’s mounted correctly right?

You will need to stop the current instance (see docker stop), remove it (see docker rm) and then create it again, as per instructions, but add the mounts as needed. (see the docker create -v flag)

1 Like

Allright, so I have removed everything, and installed it again using the following rules:

   docker create --name=sonarr \
--restart=always \
-p 8989:8989 \
-e PUID=1001 -e PGID=1001 \
-v /dev/rtc:/dev/rtc:ro \
-v /storage/docker/sonarr/config:/config \
-v /var/media/USBDISK/tv:/tv \
-v /var/media/USBDISK/Downloads:/Downloads \
linuxserver/sonarr

docker create --name=radarr \
--restart=always \
-v /storage/docker/radarr/config:/config \
-v /var/media/USBDISK/Downloads:/Downloads \
-v /var/media/USBDISK/Movies:/Movies \
-e PGID=1001 -e PUID=1001 \
-e TZ=Europe/London \
-p 7878:7878 \
linuxserver/radarr

docker create --name=transmission \
--restart=always \
-v /storage/docker/transmission/config:/config \
-v /var/media/USBDISK/Downloads:/Downloads \
-v /storage/docker/transmission/watch:/watch \
-v /var/media/USBDISK/Movies:/Movies \
-v /var/media/USBDISK/tv:/tv \
-e PGID=1001 -e PUID=1001 \
-e TZ=Europe/London \
-p 9091:9091 -p 51413:51413 \
-p 51413:51413/udp \
linuxserver/transmission

The downloads get sent to Transmission properly, however Transmission says ‘error: permission denied’ to the /var/media/USBDISK/Downloads folder. I’ve installed these containers as root in Putty, maybe that has something to do with it? I dont know the login/password for a default normal user in Coreelec.

Hmm yes. I think that the external USB media gets mounted as read-only volume by CoreELEC itself.
I remember having this issue in the past, but can’t currently recall what I did to solve it. @vpeter any ideas?

Interesting! Isn’t mounting with write permissions a basic thing for a mediacentre, that should be enabled by default, or am I doing it via a very unconvential way?

CoreELEC mounts USB drives with RW permission. But if there are some errors on a filesystem then it could be mounted to RO.

You could try to unmount it and mount it from command line. Maybe even journalctl shows some errors.

1 Like

Im not sure how to (un)mount it via command line, so I just did it by disconnecting and reconnecting the usb cable, while looking at journalctl:

Oct 31 13:25:14 MaricMediaCentre kernel: usb 2-1.4: USB disconnect, device number 3
Oct 31 13:25:14 MaricMediaCentre systemd[1]: Stopping Udevil mount service...
Oct 31 13:25:14 MaricMediaCentre systemd[1]: var-media-USBDISK.mount: Succeeded.
Oct 31 13:25:14 MaricMediaCentre mount.exfat[4152]: failed to write super block
Oct 31 13:25:14 MaricMediaCentre systemd[1]: udevil-mount@-dev-sda1.service: Succeeded.
Oct 31 13:25:14 MaricMediaCentre systemd[1]: Stopped Udevil mount service.
Oct 31 13:25:18 MaricMediaCentre kernel: usb 2-1.4: new SuperSpeed USB device number 4 using xhci-hcd
Oct 31 13:25:18 MaricMediaCentre kernel: usb 2-1.4: New USB device found, idVendor=1058, idProduct=10b8
Oct 31 13:25:18 MaricMediaCentre kernel: usb 2-1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=5
Oct 31 13:25:18 MaricMediaCentre kernel: usb 2-1.4: Product: Elements 10B8
Oct 31 13:25:18 MaricMediaCentre kernel: usb 2-1.4: Manufacturer: Western Digital
Oct 31 13:25:18 MaricMediaCentre kernel: usb 2-1.4: SerialNumber: 575853314538343259563852
Oct 31 13:25:18 MaricMediaCentre kernel: usb-storage 2-1.4:1.0: USB Mass Storage device detected
Oct 31 13:25:18 MaricMediaCentre kernel: scsi host1: usb-storage 2-1.4:1.0
Oct 31 13:25:20 MaricMediaCentre kernel: scsi 1:0:0:0: Direct-Access     WD       Elements 10B8    1012 PQ: 0 ANSI: 6
Oct 31 13:25:20 MaricMediaCentre kernel: sd 1:0:0:0: [sdb] Spinning up disk...
Oct 31 13:25:20 MaricMediaCentre kernel: sd 1:0:0:0: Attached scsi generic sg0 type 0
Oct 31 13:25:26 MaricMediaCentre kernel: ......ready
Oct 31 13:25:26 MaricMediaCentre kernel: sd 1:0:0:0: [sdb] 976707584 512-byte logical blocks: (500 GB/466 GiB)
Oct 31 13:25:26 MaricMediaCentre kernel: sd 1:0:0:0: [sdb] Write Protect is off
Oct 31 13:25:26 MaricMediaCentre kernel: sd 1:0:0:0: [sdb] Mode Sense: 47 00 10 08
Oct 31 13:25:26 MaricMediaCentre kernel: sd 1:0:0:0: [sdb] No Caching mode page found
Oct 31 13:25:26 MaricMediaCentre kernel: sd 1:0:0:0: [sdb] Assuming drive cache: write through
Oct 31 13:25:26 MaricMediaCentre kernel:  sdb: sdb1
Oct 31 13:25:26 MaricMediaCentre kernel: sd 1:0:0:0: [sdb] Attached SCSI disk
Oct 31 13:25:26 MaricMediaCentre systemd[1]: Starting Udevil mount service...
Oct 31 13:25:26 MaricMediaCentre udevil[7900]: FUSE exfat 1.2.8
Oct 31 13:25:26 MaricMediaCentre udevil[7900]: WARN: volume was not unmounted cleanly.
Oct 31 13:25:26 MaricMediaCentre mount.exfat[7931]: volume was not unmounted cleanly
Oct 31 13:25:26 MaricMediaCentre udevil[7900]: Mounted /dev/sdb1 at /var/media/USBDISK
Oct 31 13:25:26 MaricMediaCentre systemd[1]: Started Udevil mount service.

Fsck comes up with this:

MediaCentre:~ # fsck /dev/sdb
fsck from util-linux 2.33.2
e2fsck 1.45.3 (14-Jul-2019)
ext2fs_open2: Bad magic number in super-block
fsck.ext2: Superblock invalid, trying backup blocks...
fsck.ext2: Bad magic number in super-block while trying to open /dev/sdb

The superblock could not be read or does not describe a valid ext2/ext3/ext4
filesystem.  If the device is valid and it really contains an ext2/ext3/ext4
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
    e2fsck -b 8193 <device>
 or
    e2fsck -b 32768 <device>

The e2fsck commands provided dont seem to do anything though. The disk is an exFAT filesystem, should I maybe convert it to ext4 or something like that?

Try

umount /var/media/USBDISK
fsck /dev/sdb1
mount /dev/sdb1 /var/media/USBDISK
mount | grep sdb1

Weird:

MaricMediaCentre:~ # umount /var/media/USBDISK
MaricMediaCentre:~ # fsck /dev/sdb1
fsck from util-linux 2.33.2
e2fsck 1.45.3 (14-Jul-2019)
fsck.ext2: No such file or directory while trying to open /dev/sdb1
Possibly non-existent device?
MaricMediaCentre:~ # mount /dev/sdb1 /var/media/USBDISK
mount: mounting /dev/sdb1 on /var/media/USBDISK failed: No such file or directory
MaricMediaCentre:~ # mount | grep sdb1
MaricMediaCentre:~ # mount /var/media/USBDISK
mount: can't find /var/media/USBDISK in /etc/fstab
MaricMediaCentre:~ # umount /var/media/USBDISK
MaricMediaCentre:~ # fsck /dev/sdb1
fsck from util-linux 2.33.2
MaricMediaCentre:~ # fsck /dev/sdb
fsck from util-linux 2.33.2
e2fsck 1.45.3 (14-Jul-2019)
ext2fs_open2: Bad magic number in super-block
fsck.ext2: Superblock invalid, trying backup blocks...
fsck.ext2: Bad magic number in super-block while trying to open /dev/sdb

The superblock could not be read or does not describe a valid ext2/ext3/ext4
filesystem.  If the device is valid and it really contains an ext2/ext3/ext4
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
    e2fsck -b 8193 <device>
 or
    e2fsck -b 32768 <device>

MaricMediaCentre:~ # mount /dev/sdb1 /var/media/USBDISK
mount: mounting /dev/sdb1 on /var/media/USBDISK failed: Device or resource busy

Reboot and see if still mounted at least RO.

The disk seems to be mounted, I’m not sure how to check the RO status, however I still get the permission denied error in Transmission.

MaricMediaCentre:~ # parted -l
Model: WD Elements 10B8 (scsi)
Disk /dev/sda: 500GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:

Number  Start   End    Size   File system  Name                  Flags
 1      1049kB  500GB  500GB               Basic data partition  msftdata


Model: SD SC16G (sd/mmc)
Disk /dev/mmcblk1: 15.9GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:

Number  Start   End     Size    Type     File system  Flags
 1      4194kB  541MB   537MB   primary  fat16        boot, lba
 2      541MB   15.9GB  15.4GB  primary  ext4

mount command will show you how it is mounted.

Mount command:

MaricMediaCentre:~ # mount
devtmpfs on /dev type devtmpfs (rw,relatime,size=1893224k,nr_inodes=473306,mode=755)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,relatime)
/dev/mmcblk1p1 on /flash type vfat (ro,noatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,errors=remount-ro)
/dev/loop0 on / type squashfs (ro,relatime)
/dev/mmcblk1p2 on /storage type ext4 (rw,noatime,data=ordered)
securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /run type tmpfs (rw,nosuid,nodev,mode=755)
tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec,mode=755)
cgroup2 on /sys/fs/cgroup/unified type cgroup2 (rw,nosuid,nodev,noexec,relatime)
cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,xattr,name=systemd)
bpf on /sys/fs/bpf type bpf (rw,nosuid,nodev,noexec,relatime)
cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer)
cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpu,cpuacct)
cgroup on /sys/fs/cgroup/pids type cgroup (rw,nosuid,nodev,noexec,relatime,pids)
cgroup on /sys/fs/cgroup/debug type cgroup (rw,nosuid,nodev,noexec,relatime,debug)
cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices)
cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpuset)
cgroup on /sys/fs/cgroup/memory type cgroup (rw,nosuid,nodev,noexec,relatime,memory)
debugfs on /sys/kernel/debug type debugfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /var type tmpfs (rw,relatime)
mqueue on /dev/mqueue type mqueue (rw,nosuid,nodev,noexec,relatime)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev)
configfs on /sys/kernel/config type configfs (rw,nosuid,nodev,noexec,relatime)
/dev/sda1 on /var/media/USBDISK type fuseblk (rw,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096)
fusectl on /sys/fs/fuse/connections type fusectl (rw,nosuid,nodev,noexec,relatime)
overlay on /storage/.kodi/userdata/addon_data/service.system.docker/docker/overlay2/f66e97cf4725b1a95bd7ad51f2f8672c3f627df7e7325bdeb201a2bd1e98f231/merged type overlay (rw,relatime,lowerdir=/storage/.kodi/userdata/addon_data/service.system.docker/docker/overlay2/l/NTIWTC2EBWKXWCHLERVCISWQXP:/storage/.kodi/userdata/addon_data/service.system.docker/docker/overlay2/l/MJTFB2H2VQJZNNPQBXAR5I2PA3:/storage/.kodi/userdata/addon_data/service.system.docker/docker/overlay2/l/WXWANDXNU6MVKRKNXRYIOT5R4W:/storage/.kodi/userdata/addon_data/service.system.docker/docker/overlay2/l/V2KWBUSHAXDWEDZKXDXOUKZZ5K:/storage/.kodi/userdata/addon_data/service.system.docker/docker/overlay2/l/JRS3LHB7K6PP45EZWJWX4DODIB:/storage/.kodi/userdata/addon_data/service.system.docker/docker/overlay2/l/PGYS6MLC4RNTTZXR4YRDTJY43M,upperdir=/storage/.kodi/userdata/addon_data/service.system.docker/docker/overlay2/f66e97cf4725b1a95bd7ad51f2f8672c3f627df7e7325bdeb201a2bd1e98f231/diff,workdir=/storage/.kodi/userdata/addon_data/service.system.docker/dock)
overlay on /storage/.kodi/userdata/addon_data/service.system.docker/docker/overlay2/5b6b1f0312a4a40045eac4bbdda06f95aa55757ba1e6014f2329582920dc67f2/merged type overlay (rw,relatime,lowerdir=/storage/.kodi/userdata/addon_data/service.system.docker/docker/overlay2/l/HDTS4BLFZ5RMEBDFJOV45SBNBJ:/storage/.kodi/userdata/addon_data/service.system.docker/docker/overlay2/l/STP5PFWGTZUPKD4WDM65EDQEPG:/storage/.kodi/userdata/addon_data/service.system.docker/docker/overlay2/l/NV54LZAMFKSHEDWY5NJYSJWLVN:/storage/.kodi/userdata/addon_data/service.system.docker/docker/overlay2/l/YBSSKEYMH6B2I5JPZYG5DXRNP2:/storage/.kodi/userdata/addon_data/service.system.docker/docker/overlay2/l/DOZ2PIBXAMULCGS2FYEZ5XDSPZ:/storage/.kodi/userdata/addon_data/service.system.docker/docker/overlay2/l/RMHHGOO7DTMXAKA535R6GUA7S2:/storage/.kodi/userdata/addon_data/service.system.docker/docker/overlay2/l/BIBFDPFH663TUJ2TSBQNNVGGTI:/storage/.kodi/userdata/addon_data/service.system.docker/docker/overlay2/l/BLH5SSYVTTBEUIEELWTPRXEGM2,upperdir=/storage)
overlay on /storage/.kodi/userdata/addon_data/service.system.docker/docker/overlay2/d99bcc578da71e36fe96bf2a85324c4cccbf87358cd8b9aa6e59831e926d335d/merged type overlay (rw,relatime,lowerdir=/storage/.kodi/userdata/addon_data/service.system.docker/docker/overlay2/l/VMDTHMGDMQRQXB6L4JHKXGQIPE:/storage/.kodi/userdata/addon_data/service.system.docker/docker/overlay2/l/XFD2ZNHIXWI2JF72AP6WAXG2SO:/storage/.kodi/userdata/addon_data/service.system.docker/docker/overlay2/l/POJJETLHMML5CHXQIHJBFCOJTU:/storage/.kodi/userdata/addon_data/service.system.docker/docker/overlay2/l/YBSSKEYMH6B2I5JPZYG5DXRNP2:/storage/.kodi/userdata/addon_data/service.system.docker/docker/overlay2/l/DOZ2PIBXAMULCGS2FYEZ5XDSPZ:/storage/.kodi/userdata/addon_data/service.system.docker/docker/overlay2/l/RMHHGOO7DTMXAKA535R6GUA7S2:/storage/.kodi/userdata/addon_data/service.system.docker/docker/overlay2/l/BIBFDPFH663TUJ2TSBQNNVGGTI:/storage/.kodi/userdata/addon_data/service.system.docker/docker/overlay2/l/BLH5SSYVTTBEUIEELWTPRXEGM2,upperdir=/storage)
shm on /storage/.kodi/userdata/addon_data/service.system.docker/docker/containers/dec50c004db67995a49ef812b854854f484b934903fa48500de97b46084c0595/mounts/shm type tmpfs (rw,nosuid,nodev,noexec,relatime,size=65536k)
shm on /storage/.kodi/userdata/addon_data/service.system.docker/docker/containers/9cea068c73954361df0ff141de2119218f50172bafe3fba4073c41f8c0bd38a6/mounts/shm type tmpfs (rw,nosuid,nodev,noexec,relatime,size=65536k)
shm on /storage/.kodi/userdata/addon_data/service.system.docker/docker/containers/88d32299eb951f4eecf44edd8b479db3b51213766a2062cd66dbd330d2baacb2/mounts/shm type tmpfs (rw,nosuid,nodev,noexec,relatime,size=65536k)
nsfs on /run/docker/netns/b580c92d913d type nsfs (rw)
nsfs on /run/docker/netns/b3e5539cdde1 type nsfs (rw)
nsfs on /run/docker/netns/605bc115e72b type nsfs (rw)

After that I still get the same:

MaricMediaCentre:~ # umount /var/media/USBDISK
MaricMediaCentre:~ # fsck /dev/sdb1
fsck from util-linux 2.33.2
e2fsck 1.45.3 (14-Jul-2019)
fsck.ext2: No such file or directory while trying to open /dev/sdb1
Possibly non-existent device?
MaricMediaCentre:~ # mount /dev/sdb1 /var/media/USBDISK
mount: mounting /dev/sdb1 on /var/media/USBDISK failed: No such file or directory

It’s possible that inside the container, the transmission user is not root, therefore it has no write permissions onto the volume.

I dont feel tied to Transmission, could you recommend another program that works well with Coreelec?

The problem is not the program, but the user it’s running under inside of the docker container.