What's new

[Solved] Asuswrt-Merlin USB Mount Issue

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

mcmanigle

New Around Here
This is a bit of an odd one, and I think I've searched pretty thoroughly. Have been using my RT-AC86U with factory asuswrt for a little while, but recently installed Merlin for the ability to run cron jobs. After install, did a factory reset and aside from standard WAN settings left things pretty well at their defaults.

I have a 5TB USB drive plugged into the USB3 port of the router with two partitions. I intend to share one with SMB and use the other for Time Machine. (This problem arises before getting into the Time Machine part.) For what it's worth, the whole setup was working ok before installing Merlin.

Now, it seems the router is unable to mount the second partition. The drive has GPT partition table with two ext4 partitions, the first about 1.4GB and the second about 3GB.

In the web interface, only the first partition is listed when hovering over the green USB icon, or within the SMB configuration list.

By SSH, fdisk shows all partitions:
Code:
Disk /dev/sda: 4294967295 sectors, 2047G
Logical sector size: 512
Disk identifier (GUID): 0a53e242-e34a-417e-bac7-f9184e55dcaa
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 9767541133

Number  Start (sector)    End (sector)  Size       Code  Name
   1              40          409639        200M   0700  EFI System Partition
   2          411648      2930098175       1396G   0700  Time Machine
   3      2930098176      9767540735       3260G   0700  Nosflow

But mounting fails:
Code:
mcmanigle@ConstitutionDrv:/tmp/mnt# mkdir sda3
mcmanigle@ConstitutionDrv:/tmp/mnt# mount /dev/sda3 sda3
mount: mounting /dev/sda3 on sda3 failed: Invalid argument
mcmanigle@ConstitutionDrv:/tmp/mnt# mount -t ext4 /dev/sda3 sda3
mount: mounting /dev/sda3 on sda3 failed: Invalid argument

I did verify that the disk mounts on another computer without issues.

I understand that sometimes GPT and large disk support can be sketchy, but given that it was working fine on stock asuswrt, I wasn't expecting any problems with Merlin. Is this a known issue, or am I doing something wrong?
 
Try naming the disk something other than sda3. There could be conflict. (as it can be used by the system, when the volume isn't named). Name it something easy to test first.
 
Not sure how it happened, but it looks like the journal got corrupted on the ext4 filesystem, and that's why it refused to mount / wasn't recognized. Exploring the system log pointed in the right direction, and re-creating the filesystem from the router fixed things (though apparently the router software has an older version of tune2fs, which was interesting).
 
386.7_2 USB3
I can confirm this issue. My 2TB USB drive suddenly can no longer be accessible, but it is still on the USB menu.
fdisk -l can list the driver, but mount shows Invalid argument,
in Network Place (Samba) Share / Cloud Disk, when I click this drive it is circling and never ends.

Bash:
fdisk -l
Disk /dev/sda: 31.4 GB, 31406948352 bytes
64 heads, 32 sectors/track, 29952 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes

   Device Boot      Start         End      Blocks  Id System
/dev/sda1               1       29952    30670832  83 Linux

Disk /dev/sdb: 2000.3 GB, 2000367476736 bytes
255 heads, 63 sectors/track, 243197 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks  Id System
/dev/sdb1   *          62      242677  1948803072  83 Linux

Bash:
mount -vvvv /dev/sdb1 /tmp/mnt/BIG
mount: mount('/dev/sdb1','/tmp/mnt/BIG','vfat',0x00008000,'(null)'):-1: No such device
mount: mount('/dev/sdb1','/tmp/mnt/BIG','ext3',0x00008000,'(null)'):-1: Invalid argument
mount: mount('/dev/sdb1','/tmp/mnt/BIG','ext4',0x00008000,'(null)'):0

After rebooting the router, reinserted the USB several times, nothing changed.
I then I downloaded the GParted Live CD and start VirtualBox, attached the drive to virtual host, did fsck, and nothing was wrong.
Then I tested the drive on router, clicked the USB icon in the WebUI, the drive was not there.

But mount reported busy.
Bash:
mount -vvvv -t ext4 /dev/sdb1 /tmp/mnt/BIG
mount: mount('/dev/sdb1','/tmp/mnt/BIG','ext4',0x00008000,'(null)'):-1: Device or resource busy
mount: mounting /dev/sdb1 on /tmp/mnt/BIG failed: Device or resource busy

I though I could turn journal off in case it was corrupted, but I had to unmout first.
Bash:
tune2fs -O ^has_journal /dev/sdXY
tune2fs 1.45.6 (20-Mar-2020)
The has_journal feature may only be cleared when the filesystem is unmounted or mounted read-only.

trying to unmout failed.
Bash:
umount -f /dev/sdb1
umount: can't unmount /tmp/mnt/BIG(1): Device or resource busy

kernel won't let me unmout the drive, I had to force unplug it
Bash:
 fuser -vm /dev/sdb1
                  USER        PID ACCESS COMMAND
/dev/sdb1:  admin kernel mount /tmp/mnt/BIG
                  user1       11628 F.c.. smbd
                  admin 11687 f.c.. smbd

With GParted, turn off the journal, then connect USB back to the router, everything is OK now.
Bash:
tune2fs -l /dev/sdb1  | grep has_journal
 Filesystem features:      has_journal ext_attr resize_inode dir_index filetype needs_recovery extent 64bit flex_bg sparse_super large_file huge_file dir_nlink extra_isize metadata_csum

tune2fs -O ^has_journal /dev/sdb1
tune2fs 1.46.5 (30-Dec-2021)
Recovering Journal
 

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