Upgrade Samba from version 4.13.13 to version 4.17.12 (Bullseye Backports)

  • Hi everyone,

    I've recently uncovered a sort of bug with samba, where whenever I do a share-to-share copy with my Windows 10 client PC from a non-BTRFS drive to a BTRFS drive, samba crashes and the transfer is interrupted. I wanted to log a ticket on the samba bugzilla, but they said I should upgrade samba first, since 4.13 is quite old... I can see that Backports contain samba 4.17.12, but I can't install it:



    In my infinite wisdom, I tried `apt remove samba` and then installing the backport version of samba; that worked, but it also uninstalled openmediavault. =O

    Luckily reinstalling was fairly straightforward but it's a bit of a hassle that apparently omv is strongly dependent on samba and a lot of its dependencies...


    How would I best proceed to upgrade samba to the backports version without uninstalling openmediavault?

    • Offizieller Beitrag

    You would be better off to upgrade to OMV 7.x which will give you samba 4.17 in a supported way.

    omv 7.0.5-1 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.13 | compose 7.1.6 | k8s 7.1.0-3 | cputemp 7.0.1 | mergerfs 7.0.4


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • I see.

    Since this is my productive NAS I'll need to give it some thought...


    Where could I best track what works and what doesn't yet for OMV 7.x?

    RIght now I would definitely need access to:

    • openZFS Plugin
    • onedrive Plugin
    • omv-compose Plugin
    • samba
    • ftp plugin


    If these plugins/features work, I guess I could take the plunge and jump onto the betawagon.

    • Offizieller Beitrag

    If these plugins/features work

    OMV 7.x hasn't changed much from 6.x (just the OS and php really). So, all plugins have been ported. I see using OMV 7.x as just as stable as using a version of Samba from bullseye backports with OMV 6.x

    omv 7.0.5-1 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.13 | compose 7.1.6 | k8s 7.1.0-3 | cputemp 7.0.1 | mergerfs 7.0.4


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • Dixxy I wondered if this problem was reproduceable on another system. If you're getting an "Error: 0x800&003B" during file transfer, then I can reproduce this in Win10 attempting to copy from either a ext4 backed or zfs backed folder to a BTRFS backed folder. This is on a OMV7 install.


    The problem does not exist if you copy between the same SMB shares when they are accessed on a Linux desktop. There's no problem if you copy files around directly on the OMV server using the CLI tool mc, for example.


    I don't know why WIn10 is doing this. But upgrading from OMV6 to OMV7 doesn't look to be the answer.

  • Hi Krisbee,


    yes that is exactly the issue I am running into! I will test it on a more up to date samba in VM and report it upstream with samba after all. For now, the workaround posted in the link you provided would also be a good option for me (disable "shadow_copy2")... Perhaps just "shadow_copy" would work without errors... Will test this in the near future and report here/in the linked thread.

  • Hi, just a quick update: Removing just "shadow_copy2" or replacing it with "shadow_copy" does not work.

    The last statement here (The smb segfault only happens with shadow_copy2 enabled, which won't be enabled in anything other than btrfs.) led me to think that the shadow_copy function is actually the issue, but it seems to be caused by the "btrfs" vfs object.


    Removing just the "btrfs" from the vfs objects parameter resolves the issue when copying from a non-btrfs filesystem to a btrfs filesystem.

    This makes sense to me, as it seems the filesystem tries to use a cp --reflink sort of copy function and that might error out when it attempts it on a non-btrfs source. Not quite sure though. (https://www.samba.org/samba/do…man-html/vfs_btrfs.8.html)


    Hearing that 4.17 still seems to have this issue, I'll have to evaluate via VM if this issue is indeed solved in newer versions of Samba, otherwise I'll log a bug with Samba upstream and report back here. @Krissbee Could you provide the segfault from log of Samba and the exact version after all, if I manage to reproduce it on a more recent version (i.e. Samba 4.19)? That would give me more leverage to demonstrate to the maintainers, that the bug indeed still manifests in more recent Samba versions.

  • Dixxy Looks like this is a known issue: See: Samba Segfault when moving/copy file from a EXT4 partition to BTRFS partition


    The same behaviour is shown in OMV7 with samba 4.17


    I haven't bothered to attach an extracts from syslog showing the segfault.

    This is interesting as I have 1 (one) USB 4TB drive formatted in EXT4 (external USB OMV6 drive) and have absolutely no issue coping files from/to any of OMV internal BTRFS drives nor copy from/to Windows 11 using samba. what NIC/chip set are you using?. I exclusively use NIC`s with Intel chips.

    Linux Mint (Edge) EndeavourOS Arch Linux

    OMV7 NAS, bond0 LACP, Fractal Design Define R5 Case, Kodi "Omega", FreeBSD pfSense Plus firewall/router

    Einmal editiert, zuletzt von andrzejls ()

  • That's interesting indeed, because I recreated the issue in a virtual machine, too.


    On my PROD server I'm using a Mellanox ConnectX3 10Gbit NIC on the server side and on the client side it is either another ConnectX3, a realtekt 1gbit or 2.5gbit or an Intel AC9620 Wifi NIC. I really don't think it has anything to do with the NIC.


    Can you check your smb.conf? Does it have the `vfs objects = btrfs` set for the BTRFS shares?


    Edit: Reading your post again, I'm not sure you are actually doing what is needed to replicate this. Copying to and from the btrfs drives works fine in general. What does not work is copying between a non-btrfs drive and a btrfs drive via the smb client machine (windows). I.e. using Windows explorer, copy directly from your EXT4-Share to the BTRFS-Share and you should run into the same issue. Pretty sure this is a general samba issue at this point.

  • Edit: Reading your post again, I'm not sure you are actually doing what is needed to replicate this. Copying to and from the btrfs drives works fine in general. What does not work is copying between a non-btrfs drive and a btrfs drive via the smb client machine (windows). I.e. using Windows explorer, copy directly from your EXT4-Share to the BTRFS-Share and you should run into the same issue. Pretty sure this is a general samba issue at this point.

    Well, I think I stand corrected. I was and I am copying files from/to EXT4 drive to and from BTRFS drive from Linux box, in short I was copying from/to EXT4 to/from BTRFS remotely using Linux computer.. I do not use windows myself but my wife has 1 Windows 11 laptop, so I tried from there and you are right, no can do. It comes with error. So, again, you are right saying that there is a samba issue on Windows 11.

    Linux Mint (Edge) EndeavourOS Arch Linux

    OMV7 NAS, bond0 LACP, Fractal Design Define R5 Case, Kodi "Omega", FreeBSD pfSense Plus firewall/router

  • I'm seeing the same issue on a Windows 11 client.

    My NVMe SSD is EXT4, and I configured new HDD disks with BTRFS.


    Samba is crashing when trying to copy from SSD to HDD shares.

    OMV6. Oh dear.


    I'll try the workaround mentioned above.


    EDIT: The workaround works, but please note that this configuration will be overriden by OMV, either by an update or next time you apply configuration changes. /etc/samba/smb.conf is one of the files that OMV controls and we are not supposed to make manual changes.


    I know how to add custom SaltStack states, in fact I have a few, but I do not know to properly override a OMV config. Waiting for mods to comment.

    OMV BUILD - MY NAS KILLER - OMV 6.x + omvextrasorg (updated automatically every week)

    NAS Specs: Core i3-8300 - ASRock H370M-ITX/ac - 16GB RAM - Sandisk Ultra Flair 32GB (OMV), 256GB NVME SSD (Docker Apps), 2x16TB HDDs w/ SnapRAID - Fractal Design Node 304 - Be quiet! Pure Power 11 350W


    My all-in-one SnapRAID script!

    2 Mal editiert, zuletzt von auanasgheps ()


  • EDIT: The workaround works, but please note that this configuration will be overriden by OMV, either by an update or next time you apply configuration changes. /etc/samba/smb.conf is one of the files that OMV controls and we are not supposed to make manual changes.


    I know how to add custom SaltStack states, in fact I have a few, but I do not know to properly override a OMV config. Waiting for mods to comment.

    auanasgheps There's an example of how to reference a custom change to smb.config without it being overwritten in this thread:


Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!