No dir structure shown for Media/Samba/NFS/FTP

  • ATTENTION! As of November 1, 2020, you are not able to reply to threads 6 months after the thread is opened if there are more than 500 posts in the thread.
    Threads will not be locked, so posts may still be edited by their authors.
    Just start a new thread on the topic to post if you get an error message when trying to reply to a thread.

edhaswell

New Around Here
I recently switched to Asuswrt-Merlin from Advanced Tomato after upgrading to a new router, when it turned out that my specific HW version didn't have a Advanced Tomato build. It's very easy to work with and I'm actually quite happy to have made the switch. (Thank you, @RMerlin!) I have everything set up the way I want except for-- or in spite of-- one thing.

When I go to the USB Application / Servers Center, no directory structure is ever shown for any of the tabs, such as when one chooses "Manual Media Server Path" and tries to choose a path. True also for Samba, NFS, and FTP. I assume the same code is behind each of these. I've fixed up what I need using scripts, but it would be nice to be able to set shares through the GUI. I can't find anyone else complaining about this, so I assume it is something I've done wrong.

The USB drive with my share and music on it was formatted/partitoned on a PC as MBR/ext2. It has a partition for swap and Entware and another for storage and shares. Everything works except for the dir display. I tried formatting another usb drive as ext4 in the other slot using amtm, then made a couple of directories on it, but it didn't show up either.

What am I missing?

RT-AC1900P
384.14_beta2 first flash, followed by beta3 and 384.14_0 dirty flashed
Entware
amtm
YazFi
scMerlin
a little custom iptables script to allow access from Guest to a printer
 

DonJoee

New Around Here
Hey Ed!

I have about the same issue with my friend's router.

It's a used Asus RT-AC66U (with the MIPS cpu). When he told me what did he buy I was prepared to install the latest (and last) Merlin FW on it, but to my surprise, there was the 380.70-0 installed on it. As far as I know, this is the last Merlin FW that supports this router. No problem, as I have the same on my RT-AC87U. At least most parts will be familiar...
So, I just gave it a full reset (long press during turn it on) and it seemed that everything cleared (but it seemed it was already prepared to sell, because there was no significant data (log files, scripts etc.) on it, either).

I have plugged in a brand new 16GB SanDisk Cruzer mini USB flash drive and I have installed Entware and Diversion through Amtm script, while I have set up a 2GB swap file, as suggested by others on this and other forums. The USB stick was formatted to ext3 with journaling enabled and I gave it the name 'ASUS_SYSTEM'. Everything seemed to be okay through SSH (Putty) client. I have set up a few aliases and installed MC to be more confortable through SSH.
Then I have plugged in his existing external USB HDD, a 500 GB Maxell (a low power consumption, no externally powered one) to the router's 2nd USB2 port. This HDD was already in use, formatted to NTFS and containing about 350-400 GB of SD movies, photos etc. It worked ok with his LG TV before.

Both the storages showed up in /mnt folder after a reboot and I've thought that I set up the 500GB Maxell as media storage, so I've started webUI and both the drives was there on their USB2.0 channels, HDD showed up as 'Maxell External USB 2.0' and the stick was under the name 'SanDisk' Cruzer Fit'. They were mounted and their usage were shown by the gauge under their names.

Great! I've thought everything is ok, let's move on by setting up media folders in MiniDLNA part of webUI. I went to USB applications / Media Services and Servers and as UPnP Media Server was already turned on (by default, I think) I have just gave it a new, more recognizable name and left the other settings alone (rebuild db at start - no, enable status webpage - no, Media server path setting - Manual). I have clicked the 'Media Server Directory' field and the new window that came up contained nothing except the router's name and a Cancel and an OK button...
I have also went to Network (Samba) shares of the webUI, but only the user rights could be set, no disks were shown.

Of course, I have tried all the usual magic (reboot etc.), but no result: disks are shown in /mnt folder only, but nothing in webUI.
I have also noticed that my /etc/smb.conf file is 52 kB instead of the usual 2 kB. I had a peek in it and saw that the new USB disk is under the name '[entware (at ASUS_SYSTEM)] instead of [ASUS_SYSTEM]. Also, there were all the directories mentioned as shares from the Maxell HDD. All the videos, photos everything, not just the disk. And all the entries were ended by '(at Maxell)'.
This is definitely not okay. I have not made those share set-ups.

Also, in /etc/mtab file the new, Amtm-formatted USB stick has the following entry:
/dev/sda1 /tmp/mnt/ASUS_SYSTEM ext3 rw,nodev,noatime,data=ordered 0 0

On my RT-AC87U, my manually formatted system USB drive looks like:
/dev/sdb1 /tmp/mnt/ASUS_SYSTEM ext4 rw,nodev,relatime,barrier=1,data=ordered 0 0

I think the significant difference here is 'noatime' vs. 'relatime' parameter (disk access time registration)

Also, the media HDD looks like:
/dev/sdb1 /tmp/mnt/MAXELL ufsd rw,nodev,noatime,nls=utf8,fmask=0,dmask=0,sparse,force 0 0

At me, my media HDD is:
/dev/sda1 /tmp/mnt/ASUS_HDD1 tntfs rw,nodev,relatime,uid=0,gid=0,umask=00,nls=utf8,min_prealloc_size=64k,max_prealloc_size=128M,readahead=1M,user_xattr,case_sensitive,nocache,fail_safe,hidden=show,dotfile=show,errors=continue,mft_zone_multiplier=1 0 0

The differences (apart from the more parameters) are 'ufsd' vs. 'tntfs' file system and also 'noatime' vs. 'relatime'.
As far as I know, ufsd file system is for handling ntfs read/write operations at a higher speed.

Any way, my guess is that Amtm script is playing with me (us).
Now, I try to make those Audio, Video, Photo directories in Maxell HDD through SSH, move the content into them and clear the mess in smb.conf file.

But if anyone else has a better idea about what happened and what is the real fix, I'm (we are) all ears... :)

Don
 

ColinTaylor

Part of the Furniture
I have also noticed that my /etc/smb.conf file is 52 kB instead of the usual 2 kB. I had a peek in it and saw that the new USB disk is under the name '[entware (at ASUS_SYSTEM)] instead of [ASUS_SYSTEM]. Also, there were all the directories mentioned as shares from the Maxell HDD. All the videos, photos everything, not just the disk. And all the entries were ended by '(at Maxell)'.
This is definitely not okay. I have not made those share set-ups.
That is OK. ASUS_SYSTEM is the volume label you gave the device, hence the "(at xxxx)" description. The router will automatically create a share entry for every directory in the root of the device.

As far as I know, ufsd file system is for handling ntfs read/write operations at a higher speed.
No, ufsd is the name of Paragon's NTFS driver for MIPS platforms. tntfs is Tuxera's driver for ARM.

I don't know why you don't see the shared folders in the GUI. It's possible that you have so many directories in the root that it is breaking the web page. Or maybe some of the folder names contain non-alphanumeric characters.
 

DonJoee

New Around Here
Thank you for your answer, Colin.

Yep, it seems smb.conf file was populated automatically and yes, there were many directories in the root of the drive (around 170). By now, I have made Audio, Photo and Video folders manually and moved the data accordingly.
I have also cleared up the smb.conf file and I have put the clean copy into /jffs/configs . At reboot, my smb.config file is loading, but there are still no storages present on webUI. :(
 

DonJoee

New Around Here
Even more, no shares present in Windows, either. Only RT-AC66U is showing up in Network section. I can look at its webpage and that's all.
Samba is enabled, guest login enabled, shares created through smb.conf file which is added to /jffs/configs and is loading correctly to /etc at reboot.
Yet no shares both in webUI and Windows.
I have no more ideas...

EDIT: in the meantime I'm trying to learn from an other SMB thread ( https://www.snbforums.com/threads/s...everal-hours-after-reboot-ac68u-384-14.60960/ ). Trying to find some obvious stupid errors, file remainders, misconfigurations that may affect Samba's job. By the way, Samba is running (by ps), no weird entries in log.smbd.
It might be the old Maxell, but yet then why the freshly formatted USB flash drive is not present in webUI ? Something is "generally" wrong here.
I keep sniffing around...
 
Last edited:

DonJoee

New Around Here
Ok, I have installed Amtm disk check script, cleaned syslog and rebooted the router.
I've attached both my syslog.log file to view what's going on during booting and the amtm-disk-check.log in one txt file.

EDIT: Hmmm, no file attachments allowed, no logfile contents insertion allowed (even in spoiler)... it's a bit of paranoid forum, isn't it? :)
Anyway, it's here: https://pastebin.com/QVdfv89V

In syslog there is a notice about unsuccessful mounting for the Maxell USB HDD, then at 2nd try it will be ok.

The Amtm disk check script was also just a half-success, as it didn't find the ntfsck utility itself.
Therefore I've done the check for the Maxell USB HDD within the webUI of the router:

Code:
GetMount: "/dev/sdb1"
GetMount: Device is not mounted
Checking Volume /dev/sdb1...
Type of the filesystem is NTFS.
Volume label is: MAXELL
Verifying 6656 records ...
  Verifying 352 folders ...
  Verifying files security...
$UpCase file is formatted for use in Windows 7
    334.46 GB in 5816 files
      2432 KB in 354 directories
         0 KB in bad blocks in 0 fragments
     89856 KB in use by the system
     65536 KB occupied by the log file
      4096 bytes in each allocation unit
 122095752 total allocation units on volume
  34396943 allocation units available on volume
The volume /dev/sdb1 appears to be OK.

chkntfs returns 1
So, everything looks ok, but nothing works... :(
 
Last edited:

ColinTaylor

Part of the Furniture
I've lost track of what router you're experiencing this problem on (RT-AC66U or RT-AC87U) and what firmware each is running (380.70 on both?).
 

DonJoee

New Around Here
380.70 is working ok on my RT-AC87U, which has no Amtm and Diversion installed. (Ok, it's another kind of animal.)
Anyway, if no other ideas coming up, I try a fresh restart with 380.70, without Amtm, with Entware, as it is working ok on my rig.
 
Last edited:

DonJoee

New Around Here
Ok, it seems the 'No dir structure shown for Media/Samba/etc.' issue was caused by an incompatible USB flash drive.
It's a 16GB miniature Sandisk Cruzer Fit. When I've plugged it in to the router, no more dir structures were shown within the router (media server and Samba parts) and also there were no more shares present if I've tried to list router's disks from Windows.
When the Sandisk was removed and the router rebooted, all the issues were gone, directories on the big USB HDD has reappeared within the router and also they appeared as shares in Windows.
I have tried the USB disk in Windows, formatted, copied to and from and it is working ok, has good speed etc.
I think the problem was caused either by an internal hardware mismatch or the USB drive's name that was read from the flash drive itself. It said Sandisk' Cruzer . I don't know, but a non-escaped aphostrophe (or single quotation mark) in a string could mean problem if that string is not handled properly.
Or whatever.
My solution was to use another USB flash disk for Amtm and Diversion and Entware.

Thanks for trying to help me.
Amtm and its scripts are still ok on Asus RT-AC66U with Merlin's fw 380.70. :)
 

ColinTaylor

Part of the Furniture
Thanks for the update. Good spot on that rogue apostrophe. I think you're correct in suggesting that is what is throwing out the web interface. I don't believe it's a hardware incompatibility in this case because we can see from your syslog that the device has been detected and mounted without any problems.
 

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