Usb3.0 copy file issue

I use 23.05, mr8300 routing, insert a USB flash drive into the usb3.0 interface, and when I pass in the 2g file, it says an error occurred, and unexpectedly I got a network error. Small files are no problem.

Is the drive formatted with a FAT filesystem?

If you plug the same drive directly into the computer that currently has the file, can you write it to the drive?

1 Like

The file system of the USB disk is exfat. There is no problem when plugging it into the computer. Moreover, I found that the copying speed on win10 is much faster than that on openwrt.

Does anyone know how to solve this problem?

any RAM warnings in the log?

Is it a USB drive issue or an issue of your network (Samba?) layer? e.g. what if you dd-create a large file on the drive directly via OpenWRT-SSH on the router? Or copy a large file from USB to USB via OpenWRT-SSH?

And you're not creating it in the root dir, are you ?

There are no warnings in the log.SSH can successfully transmit, but the speed is slow

it's /mnt/sda1

That doesn't answer the question...

yes of course

"yes of course" what ?

Not created in the root directory

And then?And then

Are you using samba4 or ksmbd? Any extra configs or the defaults?

samba4,According to the official website settings

1 Like

ksmbd and samba try to call truncate first before writing file. linux-exfat zero out hole range when truncating file. So truncate time is too long. So timeout happen at windows client. I will apply some patch to make truncate fast at exfat mainline. Need to wait more to apply it to mainline. Please use
temporarily the following out of tree exfat.

git clone https://github.com/namjaejeon/linux-exfat-oot

2 Likes

See related discussion at samba tech mailing list.

https://lists.samba.org/archive/samba-technical/2020-December/136083.html

1 Like

or format the disk as ext4 :slight_smile:

1 Like

Normally users use exfat or ntfs filesystem for usb storage. because exfat and ntfs is easily compatible with Windows. Recommending ext4 use for USB stick is not a solution.

but a workaround for certain