Rowland Penny
2024-Oct-11 15:17 UTC
[Samba] Compressed archives randomly corrupted on a Linux share
On Fri, 11 Oct 2024 15:46:23 +0200 "lnj.sam--- via samba" <samba at lists.samba.org> wrote:> Hi, > > We have a NAS server with OpenMediaVault on a Debian system. > > Mainly we work directly with documents from the LibreOffice and > Office tools. > > Sometimes we note at the opening of a LO document that the file is > corrupted and not repairable. > > We know LO documents are a bunch of files embeded in a compressed ZIP > archive. > > The most of time we can repair them in replacing the corrupted > elements (in my case, often I have to replace one image), sometimes > what is corrupted is the content.xml which contains all the text data > (and too we lose all the text). > > Note : to recover the lost data we also tried to repair ZIP archives > without success with different tools like in this thread > <https://superuser.com/questions/23290/terminal-tool-linux-for-repair-corrupted-zip-files> > but even if this would working this will not resolve the problem. > > As the problem is random, we do not know what is the cause : Samba > server, Samba protocols, OMV, clients ? > > We do not know the way to identify the source of problem, but we > observe the problem was noted when we work directly on Samba Linux > shares (not from Windows) and with the LO tool. > > What can we do to identify what is causing the problem and after > remedy it ? > > --- > > We search before posting and discovered that there is a CIFS client > parameter which possibly could be related to our problem, *nobrl* > (source > <https://askubuntu.com/questions/1410548/intermittent-problems-saving-libreoffice-documents-to-samba-share/1410802#1410802>), > but we are not sure and as the problem is random we can not confirm > it for now. > > --- > > Configuration NAS server: > > root at server:~# uname -a > Linux server 4.15.18-15-pve #1 SMP PVE 4.15.18-40 (Tue, 21 May 2019 > 17:43:20 +0200) x86_64 GNU/Linux > > root at server:~# cat /etc/os-release | grep PRETTY_NAME > PRETTY_NAME="Debian GNU/Linux 9 (stretch)" > > root at server:~# smbstatus -p > Samba version 4.5.16-Debian > > PID???? Username???? Group Machine?????????????????????????????????? > Protocol Version Encryption?????????? Signing > ---------------------------------------------------------------------------------------------------------------------------------------- > 3471??? user1????????? users??????? LAN_IP (ipv4:LAN_IP:49215) > SMB2_10?????????? -??????????????????? - > 15460?? user2 ????? users??????? LAN_IP (ipv4:LAN_IP:39208) > NT1?????????????? -??????????????????? - > 7290??? nobody?????? nogroup??????LAN_IP (ipv4:LAN_IP:48972) > SMB3_11?????????? -??????????????????? - > 3602??? user3 ??? users??????? LAN_IP (ipv4:LAN_IP:40750) > SMB2_02?????????? -??????????????????? - > > => many protocols from different clients (Windows 7 and 10 and Debian > 9, 10 and 12) : SMB2_02, SMB2_10, SMB3_11, NT1 > > root at server:~# dpkg -l | grep openmediavault > ii? openmediavault 4.1.23-1?????????????????????? all????????? > openmediavault - The open network attached storage solution > ii? openmediavault-keyring 1.0??????????????????????????? all > GnuPG archive keys of the OpenMediaVault archive > ii? openmediavault-omvextrasorg 4.1.15???????????????????????? > all????????? OMV-Extras.org Package Repositories for OpenMediaVault > ii? openmediavault-zfs 4.0.4????????????????????????? amd64??????? > OpenMediaVault plugin for ZFS > > > A configuration client configuration which is related to this bug : > > user at client:~$ libreoffice --version > LibreOffice 6.1.5.2 10(Build:2) > > # both from Debian 10 and Debian 9 > > --- > > Thank you for the time you will spend helping us :) ! > > With adelphity, > > lnjI feel you already know whats coming, you should upgrade EVERYTHING, it doesn't really matter which of your components is at fault (if any), the 'fault' may have been fixed in later versions and if it hasn't, then you will have little chance (if any) of getting it fixed in your current versions. Debian Stretch (9) has been replaced by Debian Bookworm (12) The latest Samba is 4.21.0 The latest OMV is 7.4.1 The latest LO is 24.2 Rowland
Kris Lou
2024-Oct-11 17:01 UTC
[Samba] Compressed archives randomly corrupted on a Linux share
> > => many protocols from different clients (Windows 7 and 10 and Debian 9, > 10 and 12) : SMB2_02, SMB2_10, SMB3_11, NT1A long time ago, we had a problem with oplocks causing system hangs. It COULD be related, and I think we ended up downgrading the kernel to 4.9. https://bugzilla.kernel.org/show_bug.cgi?id=198349#c42 But I've since upgraded to OMV 6+ without any problems. Debian Stretch (9) has been replaced by Debian Bookworm (12)> The latest Samba is 4.21.0 > The latest OMV is 7.4.1 > The latest LO is 24.2 > >While not ideal, I would recommend sticking with Bookworm's native Samba 4.17.x. It would make future upgrades easier as the OMV upgrade scripts have not handled backports and individual package updates well.
lnj.sam at gmail.com
2024-Oct-14 12:32 UTC
[Samba] Compressed archives randomly corrupted on a Linux share
Thank you Rowland for your help :D We forgot to say the data which are stored in NAS use the filesystem OpenZFS. root at nas:~# modinfo zfs | grep version version:??????? 0.7.13-pve1~bpo1 srcversion:???? 909F99977EB0376A4C4A91C vermagic:?????? 4.15.18-15-pve SMP mod_unload modversions root at nas:~# zdb | egrep "(name|version)" ??? version: 5000 ??? name: 'datastore' ??? hostname: 'nas' root at nas:~# zpool status -vx all pools are healthy => OK, the problem would not be at the filesystem layer itself Le 11/10/2024 ? 17:17, Rowland Penny via samba a ?crit?:> On Fri, 11 Oct 2024 15:46:23 +0200 > "lnj.sam--- via samba"<samba at lists.samba.org> wrote: > >> We have a NAS server with OpenMediaVault on a Debian system. >> >> Mainly we work directly with documents from the LibreOffice and >> Office tools. >> >> Sometimes we note at the opening of a LO document that the file is >> corrupted and not repairable. > I feel you already know whats coming, you should upgrade EVERYTHING, it > doesn't really matter which of your components is at fault (if any), > the 'fault' may have been fixed in later versions and if it hasn't, > then you will have little chance (if any) of getting it fixed in your > current versions.Obviously build a new NAS would be a solution and in fact this migration is planned but 1) at this time this is not a priority for us as there are many things more urgent and 2) nothing garentee us that the time we will spend on this subject resolves the initial problem (the reason of corruption). From past I learnt that update things can give more troubles that this resolves. The problem could be an application bug but from my humble experience I suspect the solution is in client side configuration (I suggested the nobrl parameter) which would gives an unstable connection (and sometimes some lost bytes or something similar). Furthermore we do not want to have a fix dedicated for our current Samba version but we want to attest the problem source : Samba, OMV, protocols, LibreOffice, ZFS How to log the problem when it occurs ? Is it possible to increase the verification level or having an ackownledgement the data are well written (an equivalence of TCP connected handshake mode) ? Would it be possible to have a feedback when the documents are corrupted at write ? Thanks