What's new

Minidlna with EXT3 USB stick and media on NTFS

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

ChrisR

Regular Contributor
As mentioned in many threads, mediaserver in asus router and usb ntfs disk are not really compatible. After collecting information from these threads, I decided to insert an USB stick, format in EXT3 and store the minidlna DB file here. I run Merlin FW 270.24.

Below the steps I followed.
• NTFS HDD with media files is /mnt/Elements
• Router-UI USB application - Server Centers 'Disable DNLA media server'

• Router-UI Administration-System: 'Enable JFFS Partition'

• Reboot

• Router-UI Administration-System: 'Format JFFS Partition at next reboot'

• Reboot

• Insert USB Flash

• Telnet session: (create 1 partition on USB Flash)
fdisk /dev/sdc (check if sda, sdb or sdc)
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-1020, default 1):
Using default value 1
Last cylinder, +cylinders or +size{K,M,G} (1-1020, default 1020):
Using default value 1020

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.

• Reboot

• Telnet session:
mke2fs -t ext3 /dev/sdc1

• Reboot

• Telnet session:
mkdir /mnt/sdc1/minidlna (folder where minidlna DB will be stored)
cp /tmp/etc/minidlna.conf /jffs/configs/
vi /jffs/configs/minidlna.conf (vi test editor - change: db_dir=/mnt/sdc1/minidlna)
nvram set dms_dbdir="/mnt/sdc1/minidlna"
nvram commit
mkdir /mnt/sdc1/configs
cp /jffs/configs/minidlna.conf /mnt/sdc1/configs (backup of updated minidlna.conf on USB Flash)

• Reboot
• Nvram get dms_dbdir (check if dms_dbdir is /mnt/sdc1/minidlna)

• Router-UI USB application - Server Centers
Check media server directory if correct (folder where media is stored)
Enable DLNA media server

After I finished the whole configuration, I streamed videos to 3 devices without any problem. Better performance compared to previous configuration where minidlna was stored on ntfs disk.

However, when I reboot, the media was not accessible anymore.
minidlna.conf and dms_dbdir are still referring to EXT3 minidlna folder.

Hope you can advise what I do wrong or what I should check...
 

Attachments

  • Minidlna EXT3 stick v1.txt
    1.7 KB · Views: 1,205
Try this steps:
Eliminate the usb flash from this ecuation.
Insert usb hdd in pc's usb port and with MiniTool Partition Wizard Home Edition resize the ntfs partition just a little bit to leave only about 1 gb or less of free space, for example..
Create a new ext3 partition from free space.
Now you have the first partition ntfs formatted with about 499 gb and a ext3 partition at the end of the drive with about 1 gb space.
Plug the drive to the router
With the "mount" command verify how is mounted
Reboot
Verify again if is mounted with the same letter, ntfs should be sda1 and ext3 should be sda2.

Or, when formatting, give a label to partitions, ntfs as "elements" and ext3 as "minidlna", after every router reboot should be mounted as /mnt/elements and /mnt/minidlna.
Now set db_dir and media_dir in /jffs/configs/minidlna.conf according to your drive letters.

Maybe is not the best explanations but I hope you get the point.
 
Thanks TeHashX, explanation clear and followed your steps, Used the tool to create new EXT3 partition on the usb hdd.
Created labels "Elements" and "Minidlna". Mounted to sda1 and sda5 by router. Not sure sda5 can be remounted to sda2 and how.

Media server was working properly, but when I reboot the router it mount sda5 to /tmp/mnt/Minidlna(1)

Following is copy of system log:

Jan 1 01:00:13 kernel: sd 0:0:0:0: [sda] 1953519616 512-byte hardware sectors (1000202 MB)
Jan 1 01:00:13 kernel: sd 0:0:0:0: [sda] Write Protect is off
Jan 1 01:00:13 kernel: sd 0:0:0:0: [sda] Assuming drive cache: write through
Jan 1 01:00:13 kernel: sd 0:0:0:0: [sda] Assuming drive cache: write through
Jan 1 01:00:13 kernel: sda:<6>device eth2 entered promiscuous mode

Jan 1 01:00:13 kernel: sda1 sda2 < sda5 >
Jan 1 01:00:13 kernel: sd 0:0:0:0: [sda] Attached SCSI disk
Jan 1 01:00:13 kernel: sd 0:0:0:0: Attached scsi generic sg1 type 0

Jan 1 01:00:14 hotplug[533]: USB /dev/sda1(ntfs) failed to mount at the first try!

Jan 1 01:00:19 kernel: ufsd: sda1 without journal
Jan 1 01:00:19 hotplug[533]: USB ntfs fs at /dev/sda1 mounted on /tmp/mnt/Elements
Jan 1 01:00:19 kernel: EXT3-fs: Unrecognized mount option "umask=0000" or missing value
Jan 1 01:00:19 hotplug[528]: USB /dev/sda5(ext3) failed to mount at the first try!
Jan 1 01:00:19 kernel: kjournald starting. Commit interval 5 seconds
Jan 1 01:00:19 kernel: EXT3 FS on sda5, internal journal
Jan 1 01:00:19 kernel: EXT3-fs: mounted filesystem with ordered data mode.
Jan 1 01:00:19 hotplug[528]: USB ext3 fs at /dev/sda5 mounted on /tmp/mnt/Minidlna(1)

Any idea why it mounts to Minidlna(1) and how to resolve this?

THANKS!
 
Dunno why but try to reboot again for 2-3 times and see mount results, If it's still minidlna(1) change db_dir in minidlna.conf, don't forget linux is case sensitive.

Sent from my HTC One S using Tapatalk 2
 
Reboot router a few times, but still minidlna(1).
Systems sometimes add xxxx(1) in case the name already in use.
I will rename the label to "Mediadb" and check if this solves it :cool:
 
Have renamed the EXT3 label to "Mediadb".

New setup with media files on ntfs partition and minidlna folder on ext3 partition is running very stable now.

When adding new media, minidlna db file updated instantly and media accessible through dlna within seconds.

Thank you TeHashX!


Summary:
Problem definition: NTFS usb hdd was not running stable as media server.

Following are the steps I took with assistance from TeHashX:

* Disable media server on router
* plug usb hdd into laptop
* add ext3 partition of 1 GB to the hdd and give it a label using MiniTool Partition Wizard Home Edition
* Insert usb hdd into router

* create minidlna folder in ext3 partition
* Use Merlin FW
* Enable and partition JFFS

* copy minidlna.conf to /jffs/configs
* edit minidlna.conf:
db_dir=/mnt/Mediadb/minidlna (label + minidlna folder on ext3)
media_dir=/mnt/Elements/Media (label + media folder on ntfs)
* nvram set dms_dbdir="/mnt/Mediadb/minidlna"
* nvram commit

* reboot

* Enable media server (make sure directory is correct)
 
Last edited:
Have renamed the EXT3 label to "Mediadb".
New setup with media files on ntfs partition and minidlna folder on ext3 partition is running very stable now.

When adding new media, minidlna db file updated instantly and media accessible through dlna within seconds.
Thank you TeHashX!
Summary:
Problem definition: NTFS usb hdd was not running stable as media server.

Following are the steps I took with assistance from TeHashX: ...

Well done. I added a link to this post in the wiki.
 
Manual - Media server running on USB NTFS HDD (RT-N66U)

Hope this helps. (I have this in Word, but cannot upload to this post)


Media server running on USB NTFS HDD (RT-N66U)

1. Facing following issues:
• Minidlna db is not updated automatically, have to remove Minidlna Database file and start Media server again
• Media server unstable; have to reboot, disable/enable media server to make it work again
• Performance issues streaming videos over 2.4GHz

2. Solution: Create an EXT3 partition on the usb ntfs hdd

3. Benefits:
• New media added to Minidlna Database file automatically (within seconds)
• Media server keeps stable and accessible
• Improved performance over both 2.4 and 5GHz

4. Instructions:
• Decide on label and directory names (I used following/Linux is case sensitive):
o NTFS label: “Elements”
o EXT3 label: “Mediadb”
o Media files in “/mnt/Elements/Multimedia”
o Minidlna files in “/mnt/Mediadb/minidlna
• Router
o If not done already install custom FW, such as Asuswrt-Merlin
o Disable Media server
o Unmount usb hdd safely
o Enable and partition JFFS
• Windows PC
o Insert usb hdd in Windows PC’s usb port
o With MiniTool Partition Wizard Home Edition resize ntfs 1 GB or less

Asus Resize.png

o Create new EXT3 partition for same size; 1 GB or less


Asus Resize ext3.png

o Make sure both NTFS and EXT3 partitions have a LABEL
o Can be any name, except a “system name or command” used by router/Linux. If your label name in router has “xxxx(1)” added to the name, put hdd back into PC and rename the label name.


Asus label.png

Asus overview.jpg

o Click on ”APPLY” to make all changes to the HDD

o Create directories and copy your media files in ntfs partion to:
 \Multimedia\Audio
 \Multimedia\Fotos
 \Multimedia\Video
• Router
o Insert usb hdd into router usb port
o Check in system log if “/tmp/mnt/Elements” and “/tmp/mnt/Mediadb mounted properly
• Start terminal session:
o mkdir /mnt/Mediadb/minidlna (directory to store minidlna database file)
o cp /tmp/etc/minidlna.conf /jffs/configs (copy system minidlna.conf to /jffs partition)
o vi /jffs/configs/minidlna.conf (vi editor or use other editor, google for vi commands)

Asus terminal.png

o mkdir /mnt/Mediadb/configs (directory to backup updated jffs config files)
o cp /jffs/configs/minidlna.conf /mnt/Mediadb/configs
o nvram set dms_dbdir=”/mnt/Mediadb/minidlna”
o nvram commit

o Reboot

o Router UI – USB application – Servers Center
 Update Media server directory to “/mnt/Elements/Multimedia”
 Enable DLNA Media Server
 
Last edited:
o With MiniTool Partition Wizard Home Edition resize ntfs 1 GB or less

o Create new EXT3 partition for same size; 1 GB or less

Hi Chris,

I'm having the same problems and will be going through the step by step process mentioned above (Thanks for it!). I just have questions about partitioning the hard drive to have the NTFS 1 TB (I believe you meant TB not GB) or less and the EXT3 1 GB or less. Why do you have the NTFS as 1 TB or less? Can this partition be more than 1 TB. I want to store all my media in ext HDD and I have a 2 TB drive. I won't be utilizing the whole hard drive if I partition the NTFS under 1 TB.

Thanks in advance.

Tan
 
The ext3 partition should be 1 gb or less, the ntfs one should be the remaining space.

Sent from my HTC One S using Tapatalk 2
 
The ext3 partition should be 1 gb or less, the ntfs one should be the remaining space.

Sent from my HTC One S using Tapatalk 2
...and do not forget to add a swap partition onto the drive - in case you run multiple applications (e.g. download server and media server) on it... :rolleyes:
 
...and do not forget to add a swap partition onto the drive - in case you run multiple applications (e.g. download server and media server) on it... :rolleyes:

Hi. I'll be running the download sever.
Can you point me somewhere where I can learn about how to create and configure the swap partition?
Should I create another EXT3 partition in the drive? logical or primary? with a particular label? How to instruct the download server to use it?
Many thanks!
 
I'm experiencing problems with my DLNA server with the latest Asus firmware on my AC-R66U. I use a NTFS usb ssd. Does changing the partitions as described in this thread also work with the stock Asus firmware?

Another concern that I have is, doesn't installing the custom firmware made by RMerlin void the warranty?

Is it possible to revert back to the Asus firmware if the custom doesn't work?
 
Hi Guys,

I'm looking into this as a viable option for running the dlna server using NTFS drives for easy storage. Now my main issue is that I'm using a 4 drive drive enclosure which works great with the N66u on stock firmware. If I were to use this method would it still scan the other 3 NTFS drives properly or is there any additional setup required.

My next question is would it be possible to simply keep all 4 drives NTFS and simply use a smaller USB drive formatted to EXT3 in the other USB port? would that method perhapse work with the standard firmware? rather than splitting a single drive?

I'd love to hear some opinions - I just don't wanna go ahead and try something on my drives as I have alot of info I can't afford to lose (well don't wanna anyway) and nowhere to back the amount of info up to at this time.
 
Disable Media server
cp /jffs/configs/minidlna.conf /mnt/Mediadb/configs
Firmware: 3.0.0.4.372.31
cp: can't stat '/tmp/etc/minidlna.conf': No such file or directory
I can't copy minidlna.conf while it turned off. When started Media Server it copies perfect. How to copy minidlna.conf?
Code:
> ls /tmp/etc/
TZ
cert.pem
dnsmasq.conf
e2fsck.conf
ethertypes
fstab
group
group.custom
gshadow
hosts
hotplug2.rules
key.pem
l7-protocols
ld.so.conf
motd
mtab
openssl.cnf
passwd
passwd.custom
ppp
profile
protocols
resolv.conf
samba
server.pem
services
shadow
smb.conf
static_routes
upnp
usb_modeswitch.conf
vsftpd.conf
web
 
Bump - same here:

cp: can't stat '/tmp/etc/minidlna.conf': No such file or directory

Although on FW 3.0.0.4.372.31 minidlna seems ok no real issues connected to 2TB NTFS, except long scan times.
 

Similar threads

Latest threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top