Minidlna not showing files => SOLVED

Ive just installed OpenWrt on my new nanopi R4S. It seems well except for Minidlna.
Architecture is two external USB drives > router > switch > clients. I only fire up a drive when I want to watch or listen to something. This set up worked perfectly on my old router.
Now when I fire up a drive Luii > minidlna shows
The miniDLNA service is active, serving 0 audio, 0 video and 0 image files.
Drives are mounted correctly and the files are present correctly on the m, if I SSH in at this point, I can see them all there,But If I open say VLC, it shows the two drives but as 'empty' because Minidlna isn't working correctly, it isn't checking to see if files are now available it seems.
If I restart minidlna in LuCi, it then shows the files, they can be used, and everything is well.
But as it is, to view anything I would have to open my laptop, logon to Luci, and restart minidlna every time. A total show stopper for my non-technical wife. Can anyone spot what the issue is? I don't really want to revert to my old router.......

my /etc/config/minidlna is

config minidlna 'config'
        option user 'minidlna'
        option port '8200'
        option interface 'br-lan'
        option friendly_name 'Mediaserve'
        option db_dir '/var/run/minidlna'
        option inotify '1'
        option notify_interval '900'
        option serial '12345678'
        option model_number '1'
        option root_container '.'
        option album_art_names 'Cover.jpg/cover.jpg/AlbumArtSmall.jpg/albumarts>
        option uuid 'bf3d8f2d-e2d7-4a6f-bba3-c69015a81785'
        option enabled '1'
        list media_dir '/mnt'

Let’s see the output of:

mount
df -h
ls /mnt/

thanks for super quick reply....it is..

root@OpenWrt:~# mount
/dev/mmcblk1p2 on /rom type squashfs (ro,relatime,errors=continue)
proc on /proc type proc (rw,nosuid,nodev,noexec,noatime)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,noatime)
cgroup2 on /sys/fs/cgroup type cgroup2 (rw,nosuid,nodev,noexec,relatime,nsdelegate)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev,noatime)
/mmcblk1p2 on /overlay type ext4 (rw,noatime)
overlayfs:/overlay on / type overlay (rw,noatime,lowerdir=/,upperdir=/overlay/upper,workdir=/overlay/work)
tmpfs on /dev type tmpfs (rw,nosuid,noexec,noatime,size=512k,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,noatime,mode=600,ptmxmode=000)
debugfs on /sys/kernel/debug type debugfs (rw,noatime)
bpffs on /sys/fs/bpf type bpf (rw,nosuid,nodev,noexec,noatime,mode=700)
/dev/sda on /mnt/usb01 type ext4 (rw,relatime,stripe=8191)
/dev/sdb on /mnt/usb02 type ext4 (rw,relatime,stripe=8191)
root@OpenWrt:~# df -h
Filesystem Size Used Available Use% Mounted on
/dev/root 5.3M 5.3M 0 100% /rom
tmpfs 1.9G 5.3M 1.9G 0% /tmp
/dev/loop0 87.0M 9.7M 70.4M 12% /overlay
overlayfs:/overlay 87.0M 9.7M 70.4M 12% /
tmpfs 512.0K 0 512.0K 0% /dev
/dev/sda 3.6T 2.4T 1.0T 70% /mnt/usb01
/dev/sdb 3.6T 1.4T 2.0T 42% /mnt/usb02
root@OpenWrt:~# ls /mnt/


Minidlna is working properly. Your drive is not mounted.

but SSH shows

root@OpenWrt:~# ls /mnt/
usb01  usb02

what am I missing here then?

Oh. That got cut off at the bottom of your last post.

You probably need to adjust this line:

such that it reflects the actual root of your media folder.

duh...sorry about that. co config is now

config minidlna 'config'
        option user 'minidlna'
        option port '8200'
        option interface 'br-lan'
        option friendly_name 'Mediaserve'
        option db_dir '/var/run/minidlna'
        option inotify '1'
        option notify_interval '900'
        option serial '12345678'
        option model_number '1'
        option root_container '.'
        option album_art_names 'Cover.jpg/cover.jpg/AlbumArtSmall.jpg/albumarts>
        option uuid 'bf3d8f2d-e2d7-4a6f-bba3-c69015a81785'
        option enabled '1'
        list media_dir '/mnt'

But Minidlna shows no files - I can see them through SSH Ok...


I don’t see any changes in the minidlna media directory config.

You may also need to restart the service to force it to scan.

your right, but the line you mentioned should now be correct. But when I try

root@OpenWrt:~# service minidlna restart
root@OpenWrt:~# service minidlna status
running
root@OpenWrt:~#

nothing happens, the service is running but no files are available

ls /mnt/usb01
la /mnt/usb02
root@OpenWrt:~# ls /mnt/usb01 aaa  bbb   ccc  lost+found ddd eee
root@OpenWrt:~# ls /mnt/usb02
Aaa Lost+found        bbb             cc

Change to:

list media_dir '/mnt/usb01'
list media_dir '/mnt/usb02'

done. it is now

config minidlna 'config'
        option user 'minidlna'
        option port '8200'
        option interface 'br-lan'
        option friendly_name 'Mediaserve'
        option db_dir '/var/run/minidlna'
        option inotify '1'
        option notify_interval '900'
        option serial '12345678'
        option model_number '1'
        option root_container '.'
        option album_art_names 'Cover.jpg/cover.jpg/AlbumArtSmall.jpg/albumarts>
        option uuid 'bf3d8f2d-e2d7-4a6f-bba3-c69015a81785'
        option enabled '1'
        list media_dir '/mnt/usb01'
        list media dir '/mnt/usb02'

but this causes a Luci RPC error

RPC call to uci/get failed with ubus code 9: Unspecified error
  at handleCallReply (http://192.168.1.1/luci-static/resources/rpc.js?v=git-24.086.45142-09d5a38:15:3)

restarting Minidlna now shows in VLC the files of usb01, but not usb02 and this survives a restart

Maybe minidlna doesn’t like two media folders? Try removing the usb02 entry.

no, cant be that, I had the two folders showing on my old Linksys router

Give it a shot to see if it resolves the luci issue.

yep - I changed the final line to
list media_dir '/mnt'
so it is in alignment with Luci, and now Luci shows ok

that only showed the files on usb01. So i switched it back to show both drives and committed. I turned both drives off to test. Still no files being displayed....
So I restarted and now files on both sets of drives are visible.
But when I turn the drives off again, and then on again, I think Minidlna will not pick up the fact that files are available again. I'll test...

well I was wrong, Minidlna did persist across drives being off, so when I restart I can instantly view.
I'll test again in the morning but it is looking encouraging. Thank you so much for your help and patience

Well....USB drivers switched off overnight bit minidlna still running!
So looks liked fixed and ill mark it as such. Thanks again