Samba issue concerning delay when copying files

  • Hello everybody,

    please excuse my bad english, i'm a german...

    My problem is that copying files from my PC to my Raspi via Samba has a delay before copying starts.

    The bigger the file the bigger the delay.

    The delay only occurs when copying files from PC to Raspi, from Raspi to PC there is no delay.

    I have 2 Raspberry PI (one is 3 the other 4) and I tried both Raspi's with several LE versions without any success.

    Any ideas what to do?

  • "Eigenlob stinkt" 8o your english is readable !

    Thanks for the flowers ;)

    I tried different Computers: win7 64bit, win7 32bit and my Laptop (win7 32bit)

    The Raspi's storages are: 5TB HD, 3TB HD and 120GB SSD all connected to a USB3 HUB with

    power supply. The hub was relativly expensive and is of good quality. LE is installed on SD-Card.

    But i also tried the HD's separately with and without the hub.

    Would it help to post my smb.conf?

  • I read this thread but sorry, i can't get any information that would be a help for my problem.

    Maybe there is a little more easy solution for my problem!?

    Some further information about my hardware:

    HD's are formatted in "exfat"

    I really spent a lot of time changing several parameters of smb.conf, LE, Cluster-Sizes etc.

  • We should dig deeper then. Activate debug logging and reproduce the issue by copying a file:

    Please provide a full debug log.

    How to post a log (wiki)

    1. Enable debugging in Settings>System Settings>Logging
    2. Restart Kodi
    3. Replicate the problem
    4. Generate a log URL (do not post/upload logs to the forum)

    use "Settings > LibreELEC > System > Paste system logs" or run "pastekodi" over SSH, then post the URL link
  • Hello,

    i copied 2 files. Here's the log:

    External Content pastebin.com
    Content embedded from external sources will not be displayed without your consent.
    Through the activation of external content, you agree that personal data may be transferred to third party platforms. We have provided more information on this in our privacy policy.

  • Hmm, I don't see any Samba errors. It has some server errors from "IPTV Simple" add-on, but I don't think that slows Samba down (you can deactivate that add-on for another test to be sure).

    You can post smb.conf, but I'm not familiar with Samba, so that's just for other users.

  • I suspect that the symptoms you describe are particular of exfat rather than samba. When copying large files to exfat, it seems to be a two step process, i.e. create a bucket, then fill it up. The creation of the bucket phase is the intial delay; copy progress is only shown during the filling up phase. I think the total transfer speeds are probably actually okay, but there is something odd about the way progress is reported. I found this feature of exfat (when used with samba) to be sufficiently problematic that I formatted my storage as ext4 instead.

  • @snaileyes

    You are my hero!!!

    I formatted the HD ext4 and all problems vanished!

    Thanks a lot!

    Also thanks to the others who tried to help me!!!

    PS: i had to format the HD with an external tool which reserved almost 4GB of diskspace for ???.

    Is there any possibility to format a HD within LE? I found nothing, and in a ssh session with putty to my Raspi, mkfs was not found...

    nevertheless i can live with this little issue.

    It'll take a while to backup, format and restore the other HDs, but this issue i will accept!!!

    regards

  • mkfs.ext4 is present in LE.

    You can use tune2fs (also present in LE) with the "-m 0" option to change the root reserved space to 0% - make sure you unmount the drive before doing that.

    so long,

    Hias

  • HiassofT

    maybe you are willing to give a "commandline is not my hobby"-user a little help?

    For example, the HD to be formatted with ext4 is "var/media/mxq", what should the command line look like?

    Help very appreciated ;)

    Thanks!

  • Be very, very careful if you are not familiar with it - if you do something wrong you could easily format the wrong drive, wiping all the data. So make sure you only connect this one drive and not others.

    First run "mount" to find the device node - it'll typically be /dev/sda1 or /dev/sdb1.

    Then unmount the partition with "umount /dev/sda1" - use the device node you found out above in this and the following commands.

    To make sure this worked, run "mount" again, the partition should no longer be listed.

    If the partition was already formatted as ext4 you can simply run tune2fs to change the reserved block count - eg "tune2fs -m 0 /dev/sda1".

    If you want to format it as ext4 run "mkfs.ext4 -m 0 -L MyVolumeLabel /dev/sda1" - Change MyVolumeLabel to the label you'd like to give the partition, it'll then show up with this name in the partition list in kodi.

    Now reboot LE and the freshly formatted drive should show up in kodi.

    BTW: if you run tune2fs with the "-l" (lower case "L") option it'll show details, including the label and reserved block count of the given partition. eg "tune2fs -l /dev/sda1". This won't alter the partition and it's safe to run it even if the partition is mounted.

    so long,

    Hias

  • @Hias

    Hi, i followed your instructions but unfortunately the mkfs command stucked at "creating journal".

    So i choosed my previously mentioned external method (booted my PC with a Linux USB stick with gparted on it). Thus i was able to prepare my 5TB HD, but with the disadvantage that it reserved 36GB (!) of diskspace, what is definitely to much for my likes ;)

    Here your tip with "tune2fs -m 0 /dev/sda1" came in handy. It worked and now i have my 5TB HD corresponding to my likes :)

    Right now i'm restoring the 5TB HD from my backup devices and everything should hopefully went ok (in about 14h).

    Thanks again to the others who tried to help me!

    GDPR-7

    I hope my english is still readable ;)

    Edited once, last by popelpenner (March 14, 2022 at 12:01 PM).