Mounting USB drive with NTFS (kmod-fs-ntfs3) on TD-W8970

Hi, my router is an old TD-W8970 with OpenWrt 23.05.5 (r24106-10cc5fcd00).

I connected 2 usb drives (after installing the required packages):

  • one for EXTROOT (sda/sda1)
  • one as external storage (sdb/sdb1) already formatted with NTFS

EXTROOT (sda/sda1) is working well.

The problem is that I cannot mount sdb/sdb1 with kmod-fs-ntfs3; instead, if I use ntfs-3g, I managed to mount it with no problem.

This is the error I get:

# mount -t ntfs3 -o rw /dev/sdb1 /mnt/sdb1
mount: mounting /dev/sdb1 on /mnt/sdb1 failed: Invalid argument
# dmesg | grep ntfs3
[   20.828517] ntfs3: Enabled Linux POSIX ACLs support
[   27.552509] ntfs3: sdb1: failed to replay log file. Can't mount rw!
[   31.129953] ntfs3: sdb1: failed to replay log file. Can't mount rw!
[36730.907752] ntfs3: sdb1: failed to replay log file. Can't mount rw!
[39261.090915] ntfs3: sdb1: failed to replay log file. Can't mount rw!
[39378.356187] ntfs3: sdb1: failed to replay log file. Can't mount rw!

I tried to follow the procedure described [here] to clear dirty page on the disk(https://openwrt.org/docs/guide-user/storage/writable_ntfs#trouble_shooting) with no positive result on mounting:

# ntfsfix -d /dev/sdb1
Mounting volume... OK
Processing of $MFT and $MFTMirr completed successfully.
Checking the alternate boot sector... OK
NTFS volume version is 3.1.
NTFS partition /dev/sdb1 was processed successfully.

This is the overall situation:

# lsusb -t
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=dwc2/1p, 480M
    |__ Port 1: Dev 2, If 0, Class=, Driver=usb-storage, 480M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=dwc2/1p, 480M
    |__ Port 1: Dev 2, If 0, Class=, Driver=usb-storage, 480M

# ls -al /dev/sd*
brw-------    1 root     root        8,   0 Jan  1  1970 /dev/sda
brw-------    1 root     root        8,   1 Jan  1  1970 /dev/sda1
brw-------    1 root     root        8,  16 Jan  1  1970 /dev/sdb
brw-------    1 root     root        8,  17 Jan  1  1970 /dev/sdb1

# block info | grep "/dev/sd"
/dev/sda1: UUID="7b7405e9-7ceb-42d2-a4af-144ae274d4fd" LABEL="extroot" VERSION="1.0" MOUNT="/overlay" TYPE="ext4"
/dev/sdb1: UUID="01DB6D1AAC9C66F0" LABEL="CACOHD" TYPE="ntfs"
# cat /etc/config/fstab

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

config mount
        option target '/overlay'
        option uuid '7b7405e9-7ceb-42d2-a4af-144ae274d4fd'
        option enabled '0'

config mount
        option target '/mnt/sdb1'
        option uuid '01DB6D1AAC9C66F0'
        option enabled '1'

What could be the problem?

Thanks in advance for the support.

You volume might be "dirty" in which case ntfs3 will not mount

Run chkdsk from windows or ntfsfix if available on the router

I had already tried to clean the drive with ntfsfix, but nothing changed.

Maybe you already did it, but... did you try to swap the usb drives?

Sorry, what do you mean exactly with "swap the usb drives"?

I have

  • one 1GB usb drive for EXTROOT (sda/sda1)
  • one 750 GB usb drive for external file storage (sdb/sdb1) with NTFS

I'm not sure why you are trying to so this. But NTFS on Linux is never going to be as stable or fast as a native file system. If you are planning to share files (with e.g. Samba or ksmbd) from the drive I would just suggest using ext4 or btrfs (checksums data and can detect silent corruption, unlike either ext4 or NTFS). Thanks to being shared over the network you can still access it from Windows.

One thing to try (if you insist on using NTFS for some reason) is to format the drive from Linux. Perhaps that will make a difference if modern Windows uses some new unsupported feature.

Another thing to try is with a more modern Linux kernel to see if there have been any relevant bug fixes (e.g. live boot a USB stick with a recent distro that has an up-to-date kernel and try to mount the disk from there).

3 Likes

I had the same device and got troubles with one usb port while the other worked well; so, besides what @Vorpal says about NTFS (I second), I meant to change the ports in which the drives are currently in, to exclude malfunction in the usb ports...

I tried to swap usb ports but nothing changed

This seemed to have a good impact but at the end did not work properly.
I performed the following steps:

  • create a partition with gdisk and filesystem type = 0700 (Microsoft)
  • format the partition with NTFS (mkfs.ntfs -f /dev/sdb1)
  • mount the usb disk/partition (mount -t ntfs3 -o rw /dev/sdb1 /mnt/sdb1)
    This time the command mount was executed with no error but, for some unknown reason, I cannot write to disk. I checked with dmesg and I found that the disk is dirty. So I performed a ntfsfix but the result did not change.
    So, I decided to change the filesystem type to EXT4 and install Samba as per @Vorpal suggestion .

Your router is of minimal spec, use anything but ntfs whivh is fatally memory hungry when you start to write files.

1 Like

Not OpenWrt, but they had the same error message here https: //forum. libreelec. tv/thread/26917-ext-hds-not-mounted-after-11-01-update/?postID=180395#post180395 and managed to solve https: //forum. libreelec. tv/thread/26917-ext-hds-not-mounted-after-11-01-update/?pageNo=5

I had already tried with MiniTool Partition Wizard but nothing changed.

However thanks a lot for the suggestion :slight_smile:

You are absolutely right.
I tried to switch to EXT4 but after installing SAMBA the router became super slow.