What's new

Two USB disks connected to router - drive mapping

  • 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!

pete007

New Around Here
Hello, i have some experiences with RMerlin firmware, i am running it on my router (AC68U). Till last month i have connected only one external harddisc, formatted to EXT3 and running Entware.
But i have bought second external 4TB drive, which i must leave formatted in NTFS. First drive was reformatted and i've installed Optware-NG. Everything worked fine, intil first restart. Until restart drives were mapped : sda1 - EXT3 2TB with Optware-NG and second NTFS 4TB as sdb1.

After restart, the drive mapping swapped, so i don't have Optware, no media server :(
If i turn off router and connect drives manually, the drive mapping is correct, i see it on network, but miniDLNA server won't work.

My question is - is it possible to map ext3 drive as sda1 and NTFS drive as sdb1 automatically, or by script?
I'm not good at programming, so if it will be with description what to do and where.

Thanks a lot.
Peter
 
When formatting the device, give it a name (I believe you can do that on the router).
Then modify the entware start scripts in /jffs/scripts/ to look for the device name instead of 'sda'.
This'll work 100%.
 
I searched how to label drives -
tune2fs -L /dev/sda1 or tune2fs -L /dev/sda1 - for example tune2fs -L Disk1 /dev/sda1 - it was accepted and correctly written in EXT3 drive, but not in NTFS. So I try to make disk label in Windows, when i connect it to computer.

Then i must add some code to /jffs/scripts/post-mount or in which script...? I'm linux & programming noob, so please could you please white me here an example.

Thanks a lot.
 
Plug your NTFS drive into your PC, right click on drive in Explorer > Properties > rename device at the top of the General tab.
Safely unplug it form your PC and you're good to go.

For entware, edit the file /jffs/scripts/post-mount
You need to change <your device> in this line:
Code:
if [ "$1" = "/tmp/mnt/<your device>" ];then
to the new name of your EXT3 disk name.
Make sure the edited file is still unix formatted after the change.
Reboot the router after that.
 
So, i've renamed EXT3 disc to Disc1 and edited post-mount script. After restart, EXT3 disc with optware-ng is correctly mapped as Disk1.
After return from work (i'm doing it through putty from work), i'll try to rename NTFS drive - and it's done.
Yesterday i see some kind of manual, how to force miniDLNA to store DB on EXT3 disc and data on NTFS, so i'll edit it's config to make it perfectly working.

Then i will post result - to close the thread.
Thanks :)
 
also using 68u with 2 x 1tb drives connected. i've noticed that usb3.0 port always assigns sdax while usb2.0 uses sdbx, so no issues for me even without label.
 

Latest threads

Sign Up For SNBForums Daily Digest

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