How to configure USB Hard Drive (NTFS) to hotplug auto-mount


System details as follows:

|Model|RavPower RP-WD03|
|Architecture|MediaTek MT7620N ver:2 eco:6|
|Firmware Version| OpenWrt 19.07.2 r10947-65030d81f3 / LuCI OpenWrt-19.07 branch (git-20.115.52331-39a8290|
|Kernel Version|4.14.171|

I am trying to set up the router to auto-mount a USB hard drive (NTFS) upon hot-plug. The hard drive is a 2TB Seagate Plus Portable Drive. The drive successfully mounts/un-mounts manually, and auto-mounts when connected and the router boots. However, the drive will not auto-mount when hot-plugged.

Recently upgraded the router firmware from OpenWrt 18.06 to OpenWrt 19.07.2. The same USB hard drive was previously able to successfully auto-mount when hot-plugged with the 18.06 OpenWrt firmware. However, has stopped working with the OpenWrt 19.07.2.

Software packages already installed:




IMPORTANT NOTE: kmod-fs-ntfs specifically NOT installed since it conflicts with ntfs-3g

System log when connecting the hard drive:

Tue May  5 20:19:54 2020 kernel: [  873.178127] usb 1-1.2: new high-speed USB device number 4 using ehci-platform
Tue May  5 20:19:54 2020 kernel: [  873.559267] scsi host1: uas
Tue May  5 20:19:54 2020 kern.notice kernel: [  873.563766] scsi 1:0:0:0: Direct-Access     Seagate  BUP Slim BK      0108 PQ: 0 ANSI: 6
Tue May  5 20:19:54 2020 kern.notice kernel: [  873.574618] sd 1:0:0:0: Attached scsi generic sg1 type 0
Tue May  5 20:19:57 2020 kern.notice kernel: [  875.117551] sd 1:0:0:0: [sdb] 3907029167 512-byte logical blocks: (2.00 TB/1.82 TiB)
Tue May  5 20:19:57 2020 kern.notice kernel: [  875.125492] sd 1:0:0:0: [sdb] 4096-byte physical blocks
Tue May  5 20:19:57 2020 kern.notice kernel: [  875.131410] sd 1:0:0:0: [sdb] Write Protect is off
Tue May  5 20:19:57 2020 kern.debug kernel: [  875.136410] sd 1:0:0:0: [sdb] Mode Sense: 53 00 00 08
Tue May  5 20:19:57 2020 kern.notice kernel: [  875.142794] sd 1:0:0:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
Tue May  5 20:19:57 2020 kern.warn kernel: [  875.152793] sd 1:0:0:0: [sdb] Optimal transfer size 33553920 bytes not a multiple of physical block size (4096 bytes)
Tue May  5 20:19:58 2020 kernel: [  875.283783]  sdb: sdb1
Tue May  5 20:19:58 2020 kern.notice kernel: [  875.295443] sd 1:0:0:0: [sdb] Attached SCSI disk

After connecting the drive it appears in the Mount Points, but will not appear in Mounted file systems. After reviewing the log it appears the ntfs-3g fails to load after the hard drive is hotplugged.

Thank you in advance for any assistance to help.

fstab shows the hard drive after manual mount:

# cat /etc/config/fstab

config global
        option anon_swap '0'
        option auto_swap '1'
        option auto_mount '1'
        option delay_root '5'
        option check_fs '0'
        option anon_mount '1'

config mount
        option enabled '1'
        option uuid '6026f4b1-ff5e-4a6b-856c-a966ec13bfae'
        option fstype 'ext4'
        option target '/overlay'

config mount
        option target '/mnt/sdb1'
        option uuid '5EBEFC11BEFBDF87'
        option enabled '1'
        option options 'rw,sync'
        option fstype 'ntfs-3g'

Still unable to auto-mount with hot plug.

Any assistance would be really appreciated, since there is nothing else I can think of.

Following up to see if anyone can provide assistance. Lost on this and can not figure it out.

In case you haven't run across this yet, there's a script you can try ( I haven't tried it, so not sure if it still works), other than that I haven't found a solution to auto mount my ntfs drive either and have just been using the rc.local method at the top of that linked page since I don't remove my drive. You do have all the correct packages installed.

edit - well never mind, I'm on 19.07.2 and just checked and there's already a script in that file, you could report this as a bug if you'd like.

@pikapben , did you ever figure out a solution? I couldn't even get mine to auto-mount on startup when it's already plugged in, so I just resorted to adding an ntfs-3g line to /etc/rc.local

remove kmod-fs-ntfs
install ntfs-3g

ln -s /usr/bin/ntfs-3g /sbin/mount.ntfs

1 Like