3

I have a 64GB flash drive plugged into a router.

The router exposes the drive as a Windows share using Samba.

The drive is formatted as exFAT and mounted successfully at /mnt/routerusb:

mount.cifs //10.0.3.138/bezeq /mnt/routerusb -n -o vers=1.0

When I try to copy large files (>4GB), the copy fails with:

Error closing file: No space left on device

df reports only 43% usage on /mnt/routerusb.

I am running Fedora 27 64-bit.

How can I resolve this?

I know I can split and then merge the files, but I would prefer to copy directly.

Vlastimil Burián
  • 27,586
  • 56
  • 179
  • 309
Zev Spitz
  • 115
  • 1
  • 1
  • 13
  • Maybe your destination serveur is indeed full, or your exeding your quota ? without a bit more information it will be hard. smb seams to use /tmp or windows temporary folder to transfer files, might be your problem, maybe the smb /tmp is to small... – Kiwy Mar 19 '18 at 10:17
  • @Kiwy The destination drive appears to have enough space as reported by `df`. How can I check if `/tmp` is too small? – Zev Spitz Mar 19 '18 at 10:25
  • If exFat is like FAT32, you won't be able to manage any file larger than 4GB, like a 32bits OS wasn't able to manage more than 4GB Ram. But ExFat can manage way more than that, so, you must have mismounted your drive. – Carpette Mar 19 '18 at 10:25
  • 2
    Could be fat32, or mounted as fat32 (fat32 limit is 4GB files, exfat limit is much higher). – ctrl-alt-delor Mar 19 '18 at 10:27
  • @Carpette Updated to include the mount command. – Zev Spitz Mar 19 '18 at 10:30
  • @ZevSpitz if your box has a 4go /tmp folder and smb server is using this space , you wont be able to mount this. Do you have access to the full configuration of your router ? or is it a one on which you have no control ? No one should ever use smb v1. It is very much a bad protocol but if you can't change it I guess will have to find a way. – Kiwy Mar 19 '18 at 10:30
  • @Kiwy I can access the HTML administration interface, but AFAIK I don't have direct shell access to the router. AFAICT The router only exposes SMB v1; if I try to use any other version I get `mount error(112): Host is down` when I try to mount. – Zev Spitz Mar 19 '18 at 10:31
  • @ctrl-alt-delor How can I check if the filesystem is mounted as fat32? – Zev Spitz Mar 19 '18 at 10:38
  • @ZevSpitz what is the model of your router. My guess is that the problem lies in it and you wont be able to circumvent this issue. – Kiwy Mar 19 '18 at 10:41
  • 2
    Both the Samba server and client must be compiled with "lasrge file support" which they negotiate when they connect. If large files are not supported, file offsets are only 32 bit long. Maybe the router does not support 64-bit file offsets? – Johan Myréen Mar 19 '18 at 14:25
  • `cd /where-the-usb-is-mounted; findmnt $(stat "--printf=%m\n" .)` – ctrl-alt-delor Mar 19 '18 at 19:59

1 Answers1

0

I just started running Fedora 28 Live on a cheap new laptop. I went to dd my original disk so that I can run my Windows 10 Home license if I choose.

I formatted a 32 GB USB stick as exFAT, but it would not write a file larger than 4 GB.

WORKAROUND:

I pulled out an external HD, that is formatted as exFAT. I was successful at writing a large file there. Try formatting a drive or USB stick as exFAT using Windows. Then try to write a large file with Linux.

Vlastimil Burián
  • 27,586
  • 56
  • 179
  • 309
D.J.
  • 1
  • I’m not sure what your answer is.  “Try formatting a drive or USB stick as exFAT using Windows.” — is that your answer?  What makes you believe that the OP’s flash drive *wasn’t* formatted using Windows?  Also, I don’t really see how your story contributes to your answer.  Did you ever succeed at writing large files to your USB stick? – G-Man Says 'Reinstate Monica' Sep 17 '18 at 05:59
  • The flash drive was indeed formatted using Windows. – Zev Spitz Sep 17 '18 at 07:10
  • My understanding is that Microsoft open-sourced the ExFAT specification, and a compatible implementation is now available on Linux, so it shouldn't be necessary to format on Windows. – Zev Spitz Oct 28 '20 at 06:17