OpenWrt Forum Archive

Topic: Minidlna and ntfs auto-mounts

The content of this topic has been archived on 2 May 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hi all, I tried to search for some answer in the forum but only my own posts seems to come out, other are all too old and still use the legacy mounting.
I have an HooToo TM02 with openwrt-15.05.1-ramips-rt305x-ht-tm02-squashfs (sysupgrade) with a minidlna server setted and working on it.
Thanks to wiki I succesfully mounted my external 1TB NTFS drive on booting adding this lines to my  /etc/rc.local file, since, if I'm not mistaken, fstab cannot automount NTFS drives (see https://wiki.openwrt.org/doc/howto/writable_ntfs)

sleep 3
ntfs-3g /dev/sda1 /mnt/usb -o rw,sync
exit 0

The problem is that when I start my device mindlna boot first and cannot access the drive, since it is not mounted yet.
My questions are:

  • should I perform a minidlna restart on my rc.locale after mounting?

  • can I automount the drive earlier?

  • should I start minidlna later and how?

  • are there other script for mounting ntfs external drives that can do some checking and perform better (I am on windows mainly, so ext4 would be a nightmare)

  • is there a way to get block to see ntfs drives? I can see them through blkid but block info show nothing

root@OpenWrt:~# blkid
/dev/mtdblock5: TYPE="squashfs"
/dev/sda1: LABEL="Lila" UUID="3806BF2806BEE652" TYPE="ntfs" PARTUUID="246b5e7b-01"
root@OpenWrt:~# block info
/dev/mtdblock5: UUID="5b787d1d-07ecb2a8-28d49b60-054aeecf" VERSION="1024.0" TYPE="squashfs"
/dev/mtdblock6: TYPE="jffs2"

(Last edited by liladude on 29 Mar 2016, 06:51)

Modify /etc/init.d script for minidlna and add there mount commands or call your sh script which mounts. Also can disable dlna regular start, catch mounts in /etc/hotplug.d/block and start minidlna from there.

(Last edited by bolvan on 29 Mar 2016, 07:02)

bolvan wrote:

Modify /etc/init.d script for minidlna and add there mount commands or call your sh script which mounts. Also can disable dlna regular start, catch mounts in /etc/hotplug.d/block and start minidlna from there.

Thank you for your super fast reply.
I went to LUCI startup interface and disabled minidlna, than added start on rc.locale

sleep 3
ntfs-3g /dev/sda1 /mnt/usb -o rw,sync
/etc/init.d/minidlna start
exit 0

and worked perfectly after restart. I have my logs and db on the mount so I keep the database list, but I'm lost on the "catch mounts in /etc/hotplug.d/block and start minidlna from there" part on your message. Not sure I need this but I'm curious.

Hotplugging for block devices.

Max Hopper wrote:

Hotplugging for block devices.

Well, since hotplug does not work for ntfs devices, I cannot understand what you are suggesting... not with the new block mount...

The discussion might have continued from here.