OpenWrt Forum Archive

Topic: TP-Link MR3020 as Network USB Hub

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

Hi all,

I am proud owner of several  MR3020 routers with openwrt os on it but one is giving me a headache.
I am trying to configure it to be a "network usb hub" and failing to do so because of automounting.

Using: tp-link mr3020 + OpenWrt Attitude Adjustment 12.09 + lot of fat32 formatted usb flash drives.

To default configuration of openwrt i added:
kmod-fs-vfat
kmod-nls-cp437
kmod-nls-iso8859-1

but still failing to automount a drive.

I checked /etc/config/fstab and saw:

config mount
        option target '/mnt/cifs'
        option fstype 'ntfs-3g'
        option options 'uid=65534,gid=65534'
        option enabled '1'
        option device '/dev/sda1'

witch to my knowledge is saying that only ntfs partitions will be mounted... or something like that... it does mount ntfs partitions just fine.

I am able to manually mount vfat partition and able to see files inside but after reboot it will not mount automatically.

I am just trying to configure my router to automount any fat32 or ntfs partitioned drive so if anyone has any idea please do help.

Thanks in advance !

and what happens if you change that ntfs-3g with vfat???

with this setting in /etc/config/fstab

config mount
        option target '/mnt/cifs'
        option fstype 'vfat'
       option options 'uid=65534,gid=65534'
        option enabled '1'
        option device '/dev/sda1'

First flash drive (already used in numerous attempts) gets automounted

dmesg:

usb 1-1: new high-speed USB device number 3 using ehci-platform
scsi1 : usb-storage 1-1:1.0
scsi 1:0:0:0: Direct-Access     Kingston DataTraveler 2.0 1.00 PQ: 0 ANSI: 2
sd 1:0:0:0: [sda] 15673344 512-byte logical blocks: (8.02 GB/7.47 GiB)
sd 1:0:0:0: [sda] Write Protect is off
sd 1:0:0:0: [sda] Mode Sense: 23 00 00 00
sd 1:0:0:0: [sda] No Caching mode page present
sd 1:0:0:0: [sda] Assuming drive cache: write through
sd 1:0:0:0: [sda] No Caching mode page present
sd 1:0:0:0: [sda] Assuming drive cache: write through
sda: sda1
sd 1:0:0:0: [sda] No Caching mode page present
sd 1:0:0:0: [sda] Assuming drive cache: write through
sd 1:0:0:0: [sda] Attached SCSI removable disk

mount:

root@OpenWrt:~# mount
rootfs on / type rootfs (rw)
/dev/root on /rom type squashfs (ro,relatime)
proc on /proc type proc (rw,noatime)
sysfs on /sys type sysfs (rw,noatime)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev,noatime,size=14608k)
tmpfs on /dev type tmpfs (rw,noatime,size=512k,mode=755)
devpts on /dev/pts type devpts (rw,noatime,mode=600)
/dev/mtdblock3 on /overlay type jffs2 (rw,noatime)
overlayfs:/overlay on / type overlayfs (rw,relatime,lowerdir=/,upperdir=/overlay)
debugfs on /sys/kernel/debug type debugfs (rw,relatime)
none on /proc/bus/usb type usbfs (rw,relatime)
/dev/sda on /mnt/fat32 type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=cp437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)

New flash drive (fat32) nothing happens...

dmesg:

usb 1-1: new high-speed USB device number 2 using ehci-platform
scsi0 : usb-storage 1-1:1.0
scsi 0:0:0:0: Direct-Access     USB2.0   FlashDisk        0.00 PQ: 0 ANSI: 2
sd 0:0:0:0: [sda] 4030464 512-byte logical blocks: (2.06 GB/1.92 GiB)
sd 0:0:0:0: [sda] Write Protect is off
sd 0:0:0:0: [sda] Mode Sense: 00 00 00 00
sd 0:0:0:0: [sda] Asking for cache data failed
sd 0:0:0:0: [sda] Assuming drive cache: write through
sd 0:0:0:0: [sda] Asking for cache data failed
sd 0:0:0:0: [sda] Assuming drive cache: write through
sda:
sd 0:0:0:0: [sda] Asking for cache data failed
sd 0:0:0:0: [sda] Assuming drive cache: write through
sd 0:0:0:0: [sda] Attached SCSI removable disk

mount:

root@OpenWrt:~# mount
rootfs on / type rootfs (rw)
/dev/root on /rom type squashfs (ro,relatime)
proc on /proc type proc (rw,noatime)
sysfs on /sys type sysfs (rw,noatime)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev,noatime,size=14608k)
tmpfs on /dev type tmpfs (rw,noatime,size=512k,mode=755)
devpts on /dev/pts type devpts (rw,noatime,mode=600)
/dev/mtdblock3 on /overlay type jffs2 (rw,noatime)
overlayfs:/overlay on / type overlayfs (rw,relatime,lowerdir=/,upperdir=/overlay)
debugfs on /sys/kernel/debug type debugfs (rw,relatime)
none on /proc/bus/usb type usbfs (rw,relatime)

odd don't you think ?

(Last edited by HuLsH on 23 Feb 2014, 18:43)

You may want to use block-mount,
http://wiki.openwrt.org/doc/techref/block_mount

I used blkid in mount script to mount devices based on the label, that way the hot-plug doesn't change the mountpoint.

(Last edited by davinc.cnivad on 12 Mar 2014, 21:03)

The discussion might have continued from here.