1
0
Fork 0
mirror of https://github.com/pikvm/pikvm.git synced 2026-03-02 18:16:56 -05:00

Problem uploading large files to USB drive #1074

Open
opened 2026-02-20 14:10:44 -05:00 by deekerman · 13 comments
Owner

Originally created by @softfoot on GitHub (Sep 14, 2025).

Describe the bug
I have a V2 and have a samba share and usb drive in "fstab" setup to be available in the "disk" menu.
I can upload large files (2Gb) to "internal" and the "samba share" without problems. But, I unable to
upload anything bigger than ~400Mb to he USB drive - it times out at 1% and I get an error message
"cant upload file".

To Reproduce
Format a USB stick as exfat and put the following in fstab -
//192.168.2.4/MainArchive/PiKVM-images /var/lib/kvmd/msd/MainArchive cifs guest,_netdev,nofail 0 0
/dev/sda1 /var/lib/kvmd/msd/usb exfat auto,nofail,rw,umask=0000 0 0
and reboot.
Try to upload a file that is say 2Gb

Expected behavior
Should upload

Desktop (please complete the following information):

  • OS: Win7 or Win10
  • Browser Firefox]
  • Version [e.g. 24

PiKVM info:

Base: Raspberry Pi 4 Model B Rev 1.2 Platform: v2-hdmiusb-rpi4 Serial: 10000000F5F17D6E KVMD: 4.95 Streamer: 6.40 (ustreamer)

WITH_GPIO: Yes
WITH_JANUS: Yes
WITH_PDEATHSIG: Yes
WITH_PTHREAD_NP: Yes
WITH_PYTHON: Yes
WITH_SETPROCTITLE: Yes
WITH_SYSTEMD: Yes
WITH_V4P: Yes

Linux kernel:

Machine: aarch64
Release: 6.6.45-13-rpi
Version: #1 SMP PREEMPT Tue May 27 17:29:07 UTC 2025

Additional context
Add any other context about the problem here.

Originally created by @softfoot on GitHub (Sep 14, 2025). **Describe the bug** I have a V2 and have a samba share and usb drive in "fstab" setup to be available in the "disk" menu. I can upload large files (2Gb) to "internal" and the "samba share" without problems. But, I unable to upload anything bigger than ~400Mb to he USB drive - it times out at 1% and I get an error message "cant upload file". **To Reproduce** Format a USB stick as exfat and put the following in fstab - //192.168.2.4/MainArchive/PiKVM-images /var/lib/kvmd/msd/MainArchive cifs guest,_netdev,nofail 0 0 /dev/sda1 /var/lib/kvmd/msd/usb exfat auto,nofail,rw,umask=0000 0 0 and reboot. Try to upload a file that is say 2Gb **Expected behavior** Should upload **Desktop (please complete the following information):** - OS: Win7 or Win10 - Browser Firefox] - Version [e.g. 24 **PiKVM info:** Base: Raspberry Pi 4 Model B Rev 1.2 Platform: v2-hdmiusb-rpi4 Serial: 10000000F5F17D6E KVMD: 4.95 Streamer: 6.40 (ustreamer) WITH_GPIO: Yes WITH_JANUS: Yes WITH_PDEATHSIG: Yes WITH_PTHREAD_NP: Yes WITH_PYTHON: Yes WITH_SETPROCTITLE: Yes WITH_SYSTEMD: Yes WITH_V4P: Yes Linux kernel: Machine: aarch64 Release: 6.6.45-13-rpi Version: #1 SMP PREEMPT Tue May 27 17:29:07 UTC 2025 **Additional context** Add any other context about the problem here.
Author
Owner

@softfoot commented on GitHub (Sep 14, 2025):

I was advised by someone on discord to try EXT4 and I was able to get it to mount as R/W but it did not appear in the "disk" menu.
The fstab entry I used was "/dev/sda1 /var/lib/kvmd/msd/usb ext4 auto,nofail,rw 0 0" it mounted OK in .../msd without errors in the log.
I would prefer to avoid "EXT4" as I need to move files back and forth to windows systems.
Dave

@softfoot commented on GitHub (Sep 14, 2025): I was advised by someone on discord to try EXT4 and I was able to get it to mount as R/W but it did not appear in the "disk" menu. The fstab entry I used was "/dev/sda1 /var/lib/kvmd/msd/usb ext4 auto,nofail,rw 0 0" it mounted OK in .../msd without errors in the log. I would prefer to avoid "EXT4" as I need to move files back and forth to windows systems. Dave
Author
Owner

@mdevaev commented on GitHub (Oct 1, 2025):

Please check kvmd log right after the error: journalctl -u kvmd.

@mdevaev commented on GitHub (Oct 1, 2025): Please check kvmd log right after the error: `journalctl -u kvmd`.
Author
Owner

@softfoot commented on GitHub (Oct 1, 2025):

Attached ...

RequestedLog.zip

Regards, Dave

@softfoot commented on GitHub (Oct 1, 2025): Attached ... [RequestedLog.zip](https://github.com/user-attachments/files/22643043/RequestedLog.zip) Regards, Dave
Author
Owner

@mdevaev commented on GitHub (Oct 1, 2025):

Are you sure this is not a network problem? It's look like.

@mdevaev commented on GitHub (Oct 1, 2025): Are you sure this is not a network problem? It's look like.
Author
Owner

@softfoot commented on GitHub (Oct 8, 2025):

There is nothing wrong with the network, the problem doesnt occur when uploading the same (or much larger files) to the SDCard or the network share. It's gig ethernet via a netgear switch. I have also tried various sizes and makes of USB stick.
Sounds like a timeing issue to me.
Dave.

@softfoot commented on GitHub (Oct 8, 2025): There is nothing wrong with the network, the problem doesnt occur when uploading the same (or much larger files) to the SDCard or the network share. It's gig ethernet via a netgear switch. I have also tried various sizes and makes of USB stick. Sounds like a timeing issue to me. Dave.
Author
Owner

@intelfx commented on GitHub (Oct 9, 2025):

@softfoot As a test to validate (or disprove) one theory I'm having, try doing this in a root console prior to starting upload:

sysctl vm.dirty_background_bytes=1048576
sysctl vm.dirty_bytes=2097152

These commands change non-persistent configuration only, so rw is not required.

Then retry the upload.

@intelfx commented on GitHub (Oct 9, 2025): @softfoot As a test to validate (or disprove) one theory I'm having, try doing this in a root console prior to starting upload: ``` sysctl vm.dirty_background_bytes=1048576 sysctl vm.dirty_bytes=2097152 ``` These commands change non-persistent configuration only, so `rw` is not required. Then retry the upload.
Author
Owner

@softfoot commented on GitHub (Oct 9, 2025):

Promising, but no cigar.
It still worked for smaller files but now for a large file it sat there transfering the file (I was watching the file grow on the USB drive) and there was the ".incomplete" file beside it. But when it reached the end of the file the file disapeared (with the .incomplete file) and I got the error "Can't upload file". Also the progress bar was not shown.
The USB drive is 30x the file size so there should be oodles of room.
Dave

@softfoot commented on GitHub (Oct 9, 2025): Promising, but no cigar. It still worked for smaller files but now for a large file it sat there transfering the file (I was watching the file grow on the USB drive) and there was the ".incomplete" file beside it. But when it reached the end of the file the file disapeared (with the .incomplete file) and I got the error "Can't upload file". Also the progress bar was not shown. The USB drive is 30x the file size so there should be oodles of room. Dave
Author
Owner

@mdevaev commented on GitHub (Oct 26, 2025):

Could you try some fast USB3 flash with USB3 port on the Pi?

@mdevaev commented on GitHub (Oct 26, 2025): Could you try some fast USB3 flash with USB3 port on the Pi?
Author
Owner

@softfoot commented on GitHub (Oct 27, 2025):

OK, did a bit of an experiment and this is what I found ---
A Kingston Traveler 128G USB 3 drives work but ONLY in USB 3 ports.
A Kingston Traveler 259G USB 3 drive fails in either USB port type.

I was using a USB 2 drive before and no of the USB 2 exFat devices I have work un USB 2 or 3 sockets on the Pi.

It's interesting that the USB 3 drives wont work in a USB 2 socket - I thought USB 3 was backward compatible with USB 2 they certainly work in windows machines.

As an aside I notied that when I changed the drive the "drive" menu did not detect the new usb drive. "Reset" didnt bring it up and I had to do a reboot to register it.
My USB fstab line is "/dev/sda1 /var/lib/kvmd/msd/usb exfat auto,nofail,rw,umask=0000 0 0"

Regards, Dave

@softfoot commented on GitHub (Oct 27, 2025): OK, did a bit of an experiment and this is what I found --- A Kingston Traveler 128G USB 3 drives work but ONLY in USB 3 ports. A Kingston Traveler 259G USB 3 drive fails in either USB port type. I was using a USB 2 drive before and no of the USB 2 exFat devices I have work un USB 2 or 3 sockets on the Pi. It's interesting that the USB 3 drives wont work in a USB 2 socket - I thought USB 3 was backward compatible with USB 2 they certainly work in windows machines. As an aside I notied that when I changed the drive the "drive" menu did not detect the new usb drive. "Reset" didnt bring it up and I had to do a reboot to register it. My USB fstab line is "/dev/sda1 /var/lib/kvmd/msd/usb exfat auto,nofail,rw,umask=0000 0 0" Regards, Dave
Author
Owner

@mdevaev commented on GitHub (Nov 9, 2025):

A Kingston Traveler 128G USB 3 drives work but ONLY in USB 3 ports.
A Kingston Traveler 259G USB 3 drive fails in either USB port type.

Could you make some speed test on windows?

As an aside I notied that when I changed the drive the "drive" menu did not detect the new usb drive.

This happens because as soon as you have mounted the drive, the OS continues to assume that it is there. We do not have automatic media disconnection and connection. Reset will re-scan the existing file structure.

@mdevaev commented on GitHub (Nov 9, 2025): > A Kingston Traveler 128G USB 3 drives work but ONLY in USB 3 ports. > A Kingston Traveler 259G USB 3 drive fails in either USB port type. Could you make some speed test on windows? > As an aside I notied that when I changed the drive the "drive" menu did not detect the new usb drive. This happens because as soon as you have mounted the drive, the OS continues to assume that it is there. We do not have automatic media disconnection and connection. Reset will re-scan the existing file structure.
Author
Owner

@mdevaev commented on GitHub (Nov 16, 2025):

Sup?

@mdevaev commented on GitHub (Nov 16, 2025): Sup?
Author
Owner

@mdevaev commented on GitHub (Nov 23, 2025):

@softfoot sup?

@mdevaev commented on GitHub (Nov 23, 2025): @softfoot sup?
Author
Owner

@softfoot commented on GitHub (Nov 23, 2025):

I sent this on the 16th 👎

"In a USB 3 slot under WIN10 ... 256 Gb drive wr=16Gb/s rd=95Gb/s 128 Gb drive wr=34 rd=95"

@softfoot commented on GitHub (Nov 23, 2025): I sent this on the 16th 👎 "In a USB 3 slot under WIN10 ... 256 Gb drive wr=16Gb/s rd=95Gb/s 128 Gb drive wr=34 rd=95"
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/pikvm-pikvm#1074
No description provided.