[Samba] File corruption with two Samba servers
I have two samba servers. One is "a proxy" for another; i.e. windows clients access to the first via the second. When i copy a file from "proxy" to the destination server via samba, everything is OK. However, when Windows (XP) users copy, let's say a word document, file becomes corrupted (probably, binary file is converted in 7-bit file, but i am not sure). Destination samba is 3.4 on 32bit Debian Sid with kernel 2.3.31 and "proxy" samba is 3.3 on 64bit Debian Sid with kernel 2.6.26. Samba configurations are very plain (after Debian defaults): * Destination * [storage] comment = storage 1 path = /storage read only = no hosts allow = 10.0.0.0/24 public = yes writable = yes browseable = no * Proxy * [archive] comment = archived material path = /srv/archive read only = no hosts allow = 10.0.0.0/24 public = yes writable = yes browseable = yes -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
Re: [Samba] file corruption
simo wrote: > If you are able to reliably reproduce the problem we can see if t is a > client or samba bug, if you can reproduce it only on a samba server but ok, i think i got the point. Now I've got oplock level one enabled (as default), i try to disable it on samba server and on client side. I found this: http://www.samba.org/samba/docs/man/Samba-HOWTO-Collection/locking.html but I don't know how to disable locking file on windows 98... thanks! urza -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
Re: [Samba] file corruption
simo wrote: > made the corruption. Differences even at the redirector level on how > oplocks are used may well account for shared files corruption. so it could be a samba problem? > not on a windows hosted share, we are really interested in seeing traces > and samba at debug level 10. ok, if the problem still persists, I'll run samba at debug level 10. thanks! urza -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
Re: [Samba] file corruption
HiHo! urza wrote: > Hi to all! > I've been using samba for about six months: I've set up a file server, > replacing a small windows 2000 server. I'm using samba 3.0.21c on a > linux slackware 10.2. It is used to share two spreadsheet programs and > file connected to them... > Everything runs fine, except for a file, which is processed and saved > several times in a day. After few weeks, this files got corrupted and is > no longer available to the software which is using it (an heavy-modified > spreadsheet): I need to replace it with a previous backup. Sorry for asking but which spreadsheet software are you using? Did you use exactly the same software on you old Windows 2000 server without any problems? I'm asking because I've experienced such problems quite often with MS Office when using the "Tracing changes" functionality (Sorry, I only know the menu entry of this function from the German version). Making heavy changes in such a documents finally leads to a corrupted document... Markus -- Senior Executive - Systemadministration Direct Phone: + 49 / 234 9787-57 Direct Fax: +49 / 234 9787-77 Viisage Technology AG Universitaetsstrasse 160 44801 Bochum Germany http://www.viisage.com -- -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
Re: [Samba] file corruption
On Mon, 2006-03-20 at 21:39 +0100, urza wrote: > Hi to all! > I've been using samba for about six months: I've set up a file server, > replacing a small windows 2000 server. I'm using samba 3.0.21c on a > linux slackware 10.2. It is used to share two spreadsheet programs and > file connected to them... > Everything runs fine, except for a file, which is processed and saved > several times in a day. After few weeks, this files got corrupted and is > no longer available to the software which is using it (an heavy-modified > spreadsheet): I need to replace it with a previous backup. > Samba's volume is a linux partition formatted in reiserfs: is it a good > file-system for my purpose? do you recommend me other filesystem? The > corrupted file is 4.3mb... > I used it with two smb clients: windows 2000 e windows 98. I set samba > as a master server, domain logon (for win98 box) and simply user > security. It doesn't seem to have any file permission problems... But, > anyway, is a very little server: it has only got two users! > Should I change filesystem? Maybe using fat volume could help? > Thanks for your feedbacks! I do not like reiserfs particularly, but I would not blame it yet. I would first check that the difference in platforms libraries and, perhaps, version of the program you are using is not the mixture that made the corruption. Differences even at the redirector level on how oplocks are used may well account for shared files corruption. If you are able to reliably reproduce the problem we can see if t is a client or samba bug, if you can reproduce it only on a samba server but not on a windows hosted share, we are really interested in seeing traces and samba at debug level 10. Simo. -- Simo Sorce Samba Team GPL Compliance Officer email: [EMAIL PROTECTED] http://samba.org -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
[Samba] file corruption
Hi to all! I've been using samba for about six months: I've set up a file server, replacing a small windows 2000 server. I'm using samba 3.0.21c on a linux slackware 10.2. It is used to share two spreadsheet programs and file connected to them... Everything runs fine, except for a file, which is processed and saved several times in a day. After few weeks, this files got corrupted and is no longer available to the software which is using it (an heavy-modified spreadsheet): I need to replace it with a previous backup. Samba's volume is a linux partition formatted in reiserfs: is it a good file-system for my purpose? do you recommend me other filesystem? The corrupted file is 4.3mb... I used it with two smb clients: windows 2000 e windows 98. I set samba as a master server, domain logon (for win98 box) and simply user security. It doesn't seem to have any file permission problems... But, anyway, is a very little server: it has only got two users! Should I change filesystem? Maybe using fat volume could help? Thanks for your feedbacks! urza -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
Re: [Samba] file corruption with write cache
Can you reproduce this with a different application than coreldraw ? One that ships with Windows maybe ? So far i know none, but i will test. When you save the new file what happens ? Does the app abort with an error report ? No, the app is perfectly happy. How do you know the file is corrupt ? The file is shorter, but not cut at the end. But it's not that only some Bytes miss, in some places there seems to be random replacements. -- To unsubscribe from this list go to the following URL and read the instructions: http://lists.samba.org/mailman/listinfo/samba
Re: [Samba] file corruption with write cache
On Tue, Jul 13, 2004 at 12:33:44AM +0200, Holger Krull wrote: > > >Can you tell me exactly how you reproduce this ? > > Open a file on the write cached share, in this case a coreldraw file (size > 24K). Save it with a different name, it only happens if a new file gets > created. Sometimes the first save succeds without error. After the first > one fails, no later write succeds. > How can i help you further? Can you reproduce this with a different application than coreldraw ? One that ships with Windows maybe ? When you save the new file what happens ? Does the app abort with an error report ? How do you know the file is corrupt ? Jeremy. -- To unsubscribe from this list go to the following URL and read the instructions: http://lists.samba.org/mailman/listinfo/samba
Re: [Samba] file corruption with write cache
Can you tell me exactly how you reproduce this ? Open a file on the write cached share, in this case a coreldraw file (size 24K). Save it with a different name, it only happens if a new file gets created. Sometimes the first save succeds without error. After the first one fails, no later write succeds. How can i help you further? you remove the write cache line Did this of course. Was experimenting. -- To unsubscribe from this list go to the following URL and read the instructions: http://lists.samba.org/mailman/listinfo/samba
Re: [Samba] file corruption with write cache
On Mon, Jul 12, 2004 at 10:17:57PM +0200, Holger Krull wrote: > Hello, > FYI, i noticed that using > write cache size = 131072 > on a share, leads to corrupted files from some applications. Only one > client is accessing the file. > In particular with coreldraw this can be reproduced. Can you tell me exactly how you reproduce this ? I need to have a simple way to see this in order to track it down. In the meantime I suggest you remove the write cache line - modern UNIXes don't need it, it was mainly added for slow Solaris filesystems. Jeremy. -- To unsubscribe from this list go to the following URL and read the instructions: http://lists.samba.org/mailman/listinfo/samba
[Samba] file corruption with write cache
Hello, FYI, i noticed that using write cache size = 131072 on a share, leads to corrupted files from some applications. Only one client is accessing the file. In particular with coreldraw this can be reproduced. Setup: Server: samba 3.0.4-SUSE Client: Windows XP Pro [raid1] comment = 1 path = /raid1 read only = No create mask = 0777 directory mask = 0775 write cache size = 131072 map system = Yes map hidden = Yes delete readonly = Yes -- To unsubscribe from this list go to the following URL and read the instructions: http://lists.samba.org/mailman/listinfo/samba
Re: [Samba] File corruption
On Tue, Jun 15, 2004 at 08:59:37AM -0400, [EMAIL PROTECTED] wrote: > > Of course, all those things really only help if you can reproduce > the problem to some degree. We had our hopes set high on strace, but after > having experienced a known kernel bug, we could not use it. Since we had > spent so much time on the problem, we upgraded to RedHat Enterprise > Edition...all the problems vanished immediately. Very interesting. What filesystem were you using on RH9.x and RHAS ? Jeremy. -- To unsubscribe from this list go to the following URL and read the instructions: http://lists.samba.org/mailman/listinfo/samba
RE: [Samba] File corruption
>Now, about once every week or so, we get a file corruption, and last week (even after >upgrading some NICs) seemed to be even worse, with 5 or 6 problems. >Because we had no problems before changing servers, I think hardware errors >are probably not to blame, Hi Warren! Unfortunately, I don't know that I have a good answer for you, but I thought I'd share this. We too have been experiencing EXACTLY what you have described this past two weeks...seemingly random file corruption. We're running Samba 3 on a RedHat Linux 9.0 box. We temporarily switched to NFS but that turned out to be more of a nightmare than Samba (for us anyway). Finally, after googling for hours and posting to this list, we decided to try and trouble shoot the problem on a lower level the best we knew how. There are three main things you can try that might reveal some clues as to what's going on. Maybe you've tried them already. 1) Use strace to start smbd or attach it to a already running child process. If you have a general idea of when or under what circumstances these corruptions occurr, that would be a good time to fire it off because it spits out a insane amount of data. 2) Turn Samba's log level to 3. Again, do that around the time you think corruptions may occurr. Logging level 3 is VERY intense on your server and will definately effect performance. 3) Use ethereal to capture and examine the network traffic. Look through the SMB packets and see what you can see. Of course, all those things really only help if you can reproduce the problem to some degree. We had our hopes set high on strace, but after having experienced a known kernel bug, we could not use it. Since we had spent so much time on the problem, we upgraded to RedHat Enterprise Edition...all the problems vanished immediately. Hope this helps a little! Matthew Connor -- To unsubscribe from this list go to the following URL and read the instructions: http://lists.samba.org/mailman/listinfo/samba
Re: [Samba] File corruption
On Sun, Jun 13, 2004 at 10:00:23PM -0500, Warren Odom wrote: > Postscript to my last message: I was hoping you could tell me if there ware > a "Samba exerciser" program that would simulate this sort of file activity, > and would report any errors along with the valuable information of which > workstation caused the problem. One or two of the archived threads I saw > referred to some such software used by the Samba team--might this be > available for others to test with? Or would it not be applicable to a > database environment? There is smbtorture, but this is to determine protocol correctness, and can simulate netbench tests. It doesn't simulate a multi-user db environment (they're all different). All this software (smbtorture) ships with the Samba source code. It's just not built by default as it's not an end-user tool. Jeremy -- To unsubscribe from this list go to the following URL and read the instructions: http://lists.samba.org/mailman/listinfo/samba
Re: [Samba] File corruption
Postscript to my last message: I was hoping you could tell me if there ware a "Samba exerciser" program that would simulate this sort of file activity, and would report any errors along with the valuable information of which workstation caused the problem. One or two of the archived threads I saw referred to some such software used by the Samba team--might this be available for others to test with? Or would it not be applicable to a database environment? -- Warren -- To unsubscribe from this list go to the following URL and read the instructions: http://lists.samba.org/mailman/listinfo/samba
Re: [Samba] File corruption
Thanks for answering my message so quickly. > I don't know of any reproducible data corruption > bugs in the current versions of the code (naturally if I did I'd be working > full time on fixing them immediately :-). Yes, that's the impression I got after perusing old discussion threads, including some messages with your name on them. > Have you updated to the latest redirector hotfixes on all your clients ? Well, we have updated the "vredir" files, if that's what you mean, on Win 95/98 to the version level specified by the 3rd-party software vendor. But they required that for the Novell client too, not just the MS client. Other than that, we haven't updated all systems, and that hadn't occurred to me. (I've been kept busy researching Samba options, scratching my head, rebuilding files, and upgrading NICs, also with the latest drivers downloaded from 3Com). All the MS updates I remember seeing are security-related. But if you think this is a realistic possibility, I can run Windows Update and see about service packs or networking updates. Which brings up a point: Do you know of any reason Win 98 (2nd Edition) shouldn't work in this environment? Put another way, does your experience, or what you've heard, give you any reason to think that Win 2K might succeed with Samba where Win 98 fails? (The software vendor does list win 98 as a supported client.) > Does your vendor have test code to ensure server/client correctness against > a particular server ? What recommendations does the vendor make when using > their software in an all-Windows (no Novell) environment ? Do they recommend > any changes in server or client settings ? Yes, they have specific recommendations, and they have a program to be run on all client workstations that tells you if anything is wrong, and sets the registry entries they want. They do support Novell and Windows servers. The registry entries vary according to the network client and the O/S; for instance, on the Windows client they turn off oplocks on Win2K clients but not on Win 98 because I guess Win 98 doesn't support oplocks anyway. On Win 98 they turn off something, I think it's write-behind caching. I have run this program on all clients (on some, several times just to make sure I didn't miss them). They have recommendations for the a Windows server: Disable network redirector file caching (MS article 163401), disable oplocks, and disable RFCB open cache limits--but I presume all these are covered by the Samba options I have set. If you want to see all their recommendations, they are at http://managemore.com/faq/networking.htm#NT . -- Warren -- To unsubscribe from this list go to the following URL and read the instructions: http://lists.samba.org/mailman/listinfo/samba
Re: [Samba] File corruption
On Sun, Jun 13, 2004 at 08:05:02PM -0500, Warren Odom wrote: > > Week before last we had 3 corruptions in 2 days. After the first two, > that's when I finally turned on #3 above, and then within a few hours had > the third corruption. The boss is really getting upset that I have to kick > everyone off the system to rebuild the problem file--some of these files are > > 300MB and take 2 hours or more to rebuild. He is saying another problem, > and Samba goes into the trash and we revert to the Novell server. Ok, the interesting thing here is that you've moved from using Novell client software on your Windows clients to depending on the Microsoft code shipped with Windows. The Microsoft code is noticeably poorer quality at doing things like multi-user database access than the Novell code. Note I'm not ruling out a bug in Samba, but I don't know of any reproducible data corruption bugs in the current versions of the code (naturally if I did I'd be working full time on fixing them immediately :-). Have you updated to the latest redirector hotfixes on all your clients ? Turning off oplocks and setting strict locking is the *minimum* you should to to attempt multi-user database access using the Windows client code. > 4. Does anyone know of some software I could run to actually test Samba for > problems? Something that would really exercise multi-user access.? Does your vendor have test code to ensure server/client correctness against a particular server ? What recommendations does the vendor make when using their software in an all-Windows (no Novell) environment ? Do they recommend any changes in server or client settings ? Jeremy. -- To unsubscribe from this list go to the following URL and read the instructions: http://lists.samba.org/mailman/listinfo/samba
[Samba] File corruption
We have moved our 3rd-party multiuser billing system database files from Novell NetWare to Samba (first 2.2.8a, and now, just last Friday evening, upgraded to 3.0.2a) on Mandrake Linux 9.2 (kernel version 2.4). Now, about once every week or so, we get a file corruption, and last week (even after upgrading some NICs) seemed to be even worse, with 5 or 6 problems. Because we had no problems before changing servers, I think hardware errors are probably not to blame, even though I've seen them implicated in Samba discussions. And because it only occurs when multiple users are in a file (never otherwise, even after many, many index rebuilds and other file repair operations done by a single user), my guess is that it stems from some sort of locking or other synchronization problem. Also, so far there does not seem to be a pattern as to which workstations have errors, except generally the most-used ones. We have a mix of Win 98 and Win 2K clients (mostly the former). We used to have two Win 95 workstations, but upgraded them to 98 to try to solve the problems. No Unix programs access these files (except for nightly backups), only the billing software using Samba. The workstations still login to NetWare as the primary network login, then use the Windows networking to map the drive to Samba. Our Samba configuration file is very simple, with only one share. I've tried various combinations of these three settings: 1. I turned off all oplocks, and that didn't fix it. 2. I set sync always = yes and strict sync = yes, and that didn't fix it either. (I have turned these off & on several times to see if there's any effect.) 3. Most recently I have set strict locking = yes. Week before last we had 3 corruptions in 2 days. After the first two, that's when I finally turned on #3 above, and then within a few hours had the third corruption. The boss is really getting upset that I have to kick everyone off the system to rebuild the problem file--some of these files are > 300MB and take 2 hours or more to rebuild. He is saying another problem, and Samba goes into the trash and we revert to the Novell server. I know it's hard to track down things like this, but here are some specific questions: 1. Are there any other options anyone can suggest trying? Also, apart from a server crash, would you expect #2 to be actually relevant to the problem or not? 2. I know Samba is supposed to re-read the config file periodically, and I'm counting on that when I change the various options. But how can I really tell whether or not Samba has changed the option--and more to the point, changed its behavior? Do any of the above options have inherent delays before Samba can change? The way some of the corruptions have come shortly after I changed a setting which would be expected to make the files MORE safe, not less, have me wondering whether Samba is really changing the settings. I can use smbstatus to confirm there are no oplocks, but what about the other settings? In other words, must I stop & restart Samba after changes such as these (thereby temporarily kicking everyone off the system, a real hassle)? 3. What debugging level would be required for a developer to investigate this? Would it be preferable to be a combined log, or would separate logs for each workstation be usable? Is there a way to get Samba logs to contain only the most recent stuff leading up to a non-reproducible-on-demand incident like this, without filling them up with hours or days of clutter? 4. Does anyone know of some software I could run to actually test Samba for problems? Something that would really exercise multi-user access.? Any help would be MUCH appreciated. I'm running out of time. Thanks -- Warren -- To unsubscribe from this list go to the following URL and read the instructions: http://lists.samba.org/mailman/listinfo/samba
Re: [Samba] File Corruption
On Sun, 3 Aug 2003, Jeremy Allison wrote: > On Sat, Aug 02, 2003 at 09:56:31PM -0400, Scott Sipe wrote: > > > > Ok, I added the auditing module to my main share. As a test I > > redownloaded the mozilla installer and put it in it's own directory on > > the samba share. I took a md5 immediately after downloading it. I then > > tried installing to several computers directly from the share, copied > > the file to client PC's and then back to the samba server, etc--it > > remained good. Then I added a cronjob that mailed me the md5 of the > > mozilla installer file every hour, and went home. The first email > > (mailed like 1 minute before I left work) was the correct md5, 1 hour > > later (I was not doing anything, nor was anyone else for that hour) the > > file is corrupt. The audit log shows no access to that file from samba. > > > > So I guess the only conclusion is that it's not Samba's fault? > > Seems to be so. If we had generic file corruption like this the > peasants with pickforks would have been storming Samba towers > demanding the head of Andrew Tridgell long before now :-). > > Try using the Linux "immutable" attribute to see if it really > is a process doing the damaging of the file. For information on how to do this see: man chattr The command to set this is: chattr +i 'filename' - John T. -- John H Terpstra Email: [EMAIL PROTECTED] -- To unsubscribe from this list go to the following URL and read the instructions: http://lists.samba.org/mailman/listinfo/samba
Re: [Samba] File Corruption
On Sat, Aug 02, 2003 at 09:56:31PM -0400, Scott Sipe wrote: > > Ok, I added the auditing module to my main share. As a test I > redownloaded the mozilla installer and put it in it's own directory on > the samba share. I took a md5 immediately after downloading it. I then > tried installing to several computers directly from the share, copied > the file to client PC's and then back to the samba server, etc--it > remained good. Then I added a cronjob that mailed me the md5 of the > mozilla installer file every hour, and went home. The first email > (mailed like 1 minute before I left work) was the correct md5, 1 hour > later (I was not doing anything, nor was anyone else for that hour) the > file is corrupt. The audit log shows no access to that file from samba. > > So I guess the only conclusion is that it's not Samba's fault? Seems to be so. If we had generic file corruption like this the peasants with pickforks would have been storming Samba towers demanding the head of Andrew Tridgell long before now :-). Try using the Linux "immutable" attribute to see if it really is a process doing the damaging of the file. Good luck, Jeremy. -- To unsubscribe from this list go to the following URL and read the instructions: http://lists.samba.org/mailman/listinfo/samba
Re: [Samba] File Corruption
Not only .exe files, also .CAB file for MS Office (the cab file is definitely changing). I agree with you that it definitely seems like a virus--I do regular scans on the samba share from FreeBSD with the McAfee scanner, "uvscan" and it never turns anything up more than the occasional, mostly benign macro virus (we get in tons and tons and tons of word files from basically computer illiterate people ;) Most of the PC's in the office have virus scanners as well. I downloaded ClamAV today and am currently doing a full scan of the samba share, but so far it's found nothing serious. thanks much, Scott Rashkae wrote: You've only seen corruption on files of .exe type, while you have data files regularly being copied back and forth? My first guess would be to check and double check for a virus on any pc that has access to that share. There is an older Dos virus I've seen around that will mess up installers and cause Windows to complain that that the file is not a valid Win32 Application, or some such error message. -- To unsubscribe from this list go to the following URL and read the instructions: http://lists.samba.org/mailman/listinfo/samba
Re: [Samba] File Corruption
Jeremy Allison wrote: On Fri, Aug 01, 2003 at 11:27:44PM -0400, Scott Sipe wrote: As another example, I had a mozilla installer sitting in a directory on the share--no one but me would have touched it. Last used ~1 month ago. Tried it today and it was corrupt. [snip] Does anyone have a clue what the problem might be, or what I can test? The problem with this is that it IS a sporadic problem, but it's happened to me enough times that I'm sure it's real. This will need more information to track down I'm afraid. What makes me very suspicious if the mozilla installer example. Can you try installing an audit vfs to track who wrote what to a file ? That way you can track if Samba has accessed the file at all or if it is another process on the machine. Jeremy. Ok, I added the auditing module to my main share. As a test I redownloaded the mozilla installer and put it in it's own directory on the samba share. I took a md5 immediately after downloading it. I then tried installing to several computers directly from the share, copied the file to client PC's and then back to the samba server, etc--it remained good. Then I added a cronjob that mailed me the md5 of the mozilla installer file every hour, and went home. The first email (mailed like 1 minute before I left work) was the correct md5, 1 hour later (I was not doing anything, nor was anyone else for that hour) the file is corrupt. The audit log shows no access to that file from samba. So I guess the only conclusion is that it's not Samba's fault? The thing I still don't understand is, if something is wrong with the system (disk corruption? something else weird?) then why I have had no other problems? This server has been running for maybe...2-3 years, is currently at 50 days uptime, has had the world built many times, built many ports, and I've never seen this corruption anywhere but on the samba share. I've set up some more tests to see if there really is corruption elsewhere, and to try to find out when/why it happens. Thanks for helping me get at least a little bit farther in my diagnostics :) thanks, Scott -- To unsubscribe from this list go to the following URL and read the instructions: http://lists.samba.org/mailman/listinfo/samba
Re: [Samba] File Corruption
You've only seen corruption on files of .exe type, while you have data files regularly being copied back and forth? My first guess would be to check and double check for a virus on any pc that has access to that share. There is an older Dos virus I've seen around that will mess up installers and cause Windows to complain that that the file is not a valid Win32 Application, or some such error message. On Sat, 2 Aug 2003, Jeremy Allison wrote: On Fri, Aug 01, 2003 at 11:27:44PM -0400, Scott Sipe wrote: > > As another example, I had a mozilla installer sitting in a directory on > the share--no one but me would have touched it. Last used ~1 month ago. > Tried it today and it was corrupt. > > I personally have only seen corruption in files of this type (installers > specifically) and am not sure if any other corruption exists. I've had > no complaints whnich is a good thing, and we regularly move a large > volume of files on and off the share via Netatalk (Quark and graphic > files) and they don't seem to get corrupt either. PC usage is generally > less intensive and limited to word files (I'm the only person that would > be installing stuff off the samba share) > > I should note that I don't believe the harddisks are bad--this server > has been very stable and never goes down except for power outages. I've > noticed no corruption in any system files, or any files stored anywhere > but on this one share. > > I should also add that I have a second smaller share (~2GB) on which our > accounting software runs--due to our accounting software requirements, > it has all oplocks turned off, and as far as i know there have been no > corruption issues. > > Does anyone have a clue what the problem might be, or what I can test? > The problem with this is that it IS a sporadic problem, but it's > happened to me enough times that I'm sure it's real. This will need more information to track down I'm afraid. What makes me very suspicious if the mozilla installer example. Can you try installing an audit vfs to track who wrote what to a file ? That way you can track if Samba has accessed the file at all or if it is another process on the machine. Jeremy. -- To unsubscribe from this list go to the following URL and read the instructions: http://lists.samba.org/mailman/listinfo/samba -- To unsubscribe from this list go to the following URL and read the instructions: http://lists.samba.org/mailman/listinfo/samba
Re: [Samba] File Corruption
On Fri, Aug 01, 2003 at 11:27:44PM -0400, Scott Sipe wrote: > > As another example, I had a mozilla installer sitting in a directory on > the share--no one but me would have touched it. Last used ~1 month ago. > Tried it today and it was corrupt. > > I personally have only seen corruption in files of this type (installers > specifically) and am not sure if any other corruption exists. I've had > no complaints whnich is a good thing, and we regularly move a large > volume of files on and off the share via Netatalk (Quark and graphic > files) and they don't seem to get corrupt either. PC usage is generally > less intensive and limited to word files (I'm the only person that would > be installing stuff off the samba share) > > I should note that I don't believe the harddisks are bad--this server > has been very stable and never goes down except for power outages. I've > noticed no corruption in any system files, or any files stored anywhere > but on this one share. > > I should also add that I have a second smaller share (~2GB) on which our > accounting software runs--due to our accounting software requirements, > it has all oplocks turned off, and as far as i know there have been no > corruption issues. > > Does anyone have a clue what the problem might be, or what I can test? > The problem with this is that it IS a sporadic problem, but it's > happened to me enough times that I'm sure it's real. This will need more information to track down I'm afraid. What makes me very suspicious if the mozilla installer example. Can you try installing an audit vfs to track who wrote what to a file ? That way you can track if Samba has accessed the file at all or if it is another process on the machine. Jeremy. -- To unsubscribe from this list go to the following URL and read the instructions: http://lists.samba.org/mailman/listinfo/samba
[Samba] File Corruption
Running FreeBSD 4.8 (and in the past have run versions of FreeBSD on this current server going back to 4.3 iirc) Samba 2.2.8a (in the past have run previous versions) Computer is a Athlon, with a highpoint raid controller, with 2 WD harddrives RAID: ar0 Master: ad4 ATA/ATAPI rev 5 Master: ad6 ATA/ATAPI rev 5 The entire system lives on this raid, with about 100GB being shared via Samba and Netatalk. All clients are XP and 2K. My problem is that, sporadically, files living on the Samba share seem to become corrupted. I've noticed this especially with large installer files and large compressed files used by installers. for instance, I was doing network installs of MS Office off the Samba share. I installed Office on two new computers fine, and on the third computer I get an error that Office1.cab (a roughly 290MB file) is corrupt. The file changed--I copy it from the CD to the share again and the install goes fine the next time i try it. the md5 of the two files is different so I'm absolutely sure that the file definitely changed. It went corrupt again after another install. As another example, I had a mozilla installer sitting in a directory on the share--no one but me would have touched it. Last used ~1 month ago. Tried it today and it was corrupt. I personally have only seen corruption in files of this type (installers specifically) and am not sure if any other corruption exists. I've had no complaints whnich is a good thing, and we regularly move a large volume of files on and off the share via Netatalk (Quark and graphic files) and they don't seem to get corrupt either. PC usage is generally less intensive and limited to word files (I'm the only person that would be installing stuff off the samba share) I should note that I don't believe the harddisks are bad--this server has been very stable and never goes down except for power outages. I've noticed no corruption in any system files, or any files stored anywhere but on this one share. I should also add that I have a second smaller share (~2GB) on which our accounting software runs--due to our accounting software requirements, it has all oplocks turned off, and as far as i know there have been no corruption issues. Does anyone have a clue what the problem might be, or what I can test? The problem with this is that it IS a sporadic problem, but it's happened to me enough times that I'm sure it's real. thanks much, Scott -- To unsubscribe from this list go to the following URL and read the instructions: http://lists.samba.org/mailman/listinfo/samba
Re: [Samba] file corruption problem - smb log informationwrittento files on shares
On Sun, 2003-03-16 at 01:37, Arva Clarke wrote: > Hi > > I am having a really strange problem with my samba server I am currently > running samba-2.2.1a-4 on a Redhat 7.2 box (dual PII processors, IDE raid > promise, I GB RAM). Its being operating more or less smoothly for the last 6 > months. Suddenly users started to complain about corrupted files on shares. > On examination of the files we noticed that smb log information was being > written to the top of the files (the same stuff was written to > log.machine_name in /var/log/samba Here is an example from an excel file > that has be zapped We have been chasing this one for a while, and I'm pretty sure we came to some resolution since 2.2.6 or 2.2.7. You should upgrade to 2.2.8 for the security fixes anyway, and see if the problem persists. Andrew Bartlett -- Andrew Bartlett [EMAIL PROTECTED] Manager, Authentication Subsystems, Samba Team [EMAIL PROTECTED] Student Network Administrator, Hawker College [EMAIL PROTECTED] http://samba.org http://build.samba.org http://hawkerc.net signature.asc Description: This is a digitally signed message part -- To unsubscribe from this list go to the following URL and read the instructions: http://lists.samba.org/mailman/listinfo/samba
[Samba] file corruption problem - smb log informationwritten to files on shares
Hi I am having a really strange problem with my samba server I am currently running samba-2.2.1a-4 on a Redhat 7.2 box (dual PII processors, IDE raid promise, I GB RAM). Its being operating more or less smoothly for the last 6 months. Suddenly users started to complain about corrupted files on shares. On examination of the files we noticed that smb log information was being written to the top of the files (the same stuff was written to log.machine_name in /var/log/samba Here is an example from an excel file that has be zapped 2003/03/13 12:14:37, 2] smbd/open.c:open_file(213) lprescott opened file Working Papers/Trade/Co info.xls read=Yes write=Yes (numopen=1) [2003/03/13 12:14:37, 5] smbd/nttrans.c:reply_ntcreate_and_X(1025) reply_ntcreate_and_X: fnum = 11331, open name = Working Papers/Trade/Co info.xls [2003/03/13 12:14:37, 5] lib/util.c:show_msg(285) size=103 smb_com=0xa2 smb_rcls=0 smb_reh=0 smb_err=0 smb_flg=136 smb_flg2=1 [2003/03/13 12:14:37, 5] lib/util.c:show_msg(293) smb_tid=2 smb_pid=260 smb_uid=100 smb_mid=21442 smt_wct=34 [2003/03/13 12:14:37, 5] lib/util.c:show_msg(302) smb_vwv[0]=255 (0xFF) [2003/03/13 12:14:37, 5] lib/util.c:show_msg(302) smb_vwv[1]=0 (0x0) [2003/03/13 12:14:37, 5] lib/util.c:show_msg(302) smb_vwv[2]=17152 (0x4300) [2003/03/13 12:14:37, 5] lib/util.c:show_msg(302) ---this goes on for many hundred lines (6000?!!) These is some remnant of the binary but I can't recover it. Lucky I had a back up This file was located on the users home share /home/blabla As I say this user had become pretty comfortable working with documents on the server. At we we blamed Excel as the problems started when we were forced to give some of our users MS Office instead of OO (compatibility issues they claimed). The first file that we noticed with the problem was a Ms Word file We did some reading and figured it was probably something to do with op locks. So we turned off all op locking (although this made downloading ofuser profiles lot slower slow but..) Unfortunately the problem keeps croping up sporadically and zapping theusers data. Yesterday, the librarian lost he NTUSER.DAT and thus could not log in with roaming profile examination of the file showed corruption with smb logs messed up the file We have been forced to tell users to edit documents on local Machines and just keep a backups on the server (data transfer (COPY/PASTE) seems go OK. It seems that the problem occurs when you open a file ind an application read/writeon a remote share) I am wondering if this has somting to do with buffer sizes?? Can any one out there help us? This is a real show stopper for us We were on the verge of migrating everbody (going from 10 - 20 users)to SAMBA before these problems occured. Chris Anyway, here is the samba.conf - [global] workgroup = CCMSUWI netbios name = ALLISTER server string = Samba PDC running %v encrypt passwords = Yes passwd program = /usr/bin/passwd unix password sync = Yes log level = 5 # to help with corruption problem log file = /var/log/samba/log.%m max log size = 50 socket options = TCP_NODELAY IPTOS_LOWDELAY SO_SNDBUF=8192 SO_RCVBUF=8192 logon script = netlogon.bat logon path = \\%L\profiles\%U logon drive = H: logon home = \\%L\%U\.profile domain logons = Yes os level = 64 preferred master = True domain master = True hosts allow = 127.0.0.1 192.168.1.0/255.255.255.0 oplocks = No level2 oplocks = No [homes] comment = Home Directories read only = No browseable = No [profiles] path = /home/samba/profiles read only = No create mask = 0600 directory mask = 0700 browseable = No [netlogon] comment = Network Logon Service path = /home/netlogon write list = root lprescott ssankarsingh cclarke rkarim agordon kaguillera mdass lcharles acaton browseable = No [research_data] path = /home/DATA read only = No create mask = 0664 directory mask = 0775 guest ok = Yes [CMS] path = /home/DATA/CMS valid users = lprescott acaton pjoseph mdass lcharles cclarke read only = No create mask = 0664 directory mask = 0775 [printers] comment = "All Printers" path = /var/spool/samba create mask = 0700 guest ok = Yes -- To unsubscribe from this list go to the following URL and read the instructions: http://lists.samba.org/mailman/listinfo/samba
RE: [Samba] file corruption problem, HELP
Kevin, I have this problem also. Running 2.2.1a and Win XP machines. I cannot save my Word files that reside on the Samba server (they become corrupted) and if I have Outlook open (.pst files reside on the Samba server) I get a "Delayed Write Fail" error from Windows. I read that upgrading to 2.2.6 or above takes care of this problem. Have not upgraded yet so I am still no sure -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Kevin Sent: Thursday, December 05, 2002 12:23 AM To: [EMAIL PROTECTED] Subject: [Samba] file corruption problem, HELP -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I am running Samba 2.2.2 with winbind authenticating to an NT 4.0 PDC. All of my clients are Windows XP Pro. This box has been running fine for several months. In fact my uptime was 185 days as of last night. However, for various reasons i upgraded the kernel from 2.4.18 to 2.4.19 and had to reboot last night. Everything appeared to come up fine, all daemons started up and connections could be made. However, this morning some people (note: not everyone) are complaining about MS Word corrupting some of their files upon saving (all these files are being served by Samba). Since we have not had any problems for months i am attributing this to something in my kernel upgrade or reboot. If anyone here has any input i would greatly appreciate it. Thanks, Kevin R. Marshall - -- keyserver: http://pgp.mit.edu/ -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.7 (GNU/Linux) iD8DBQE97uK24pH/bZtToq0RAjrUAJ9T+sxnxwS10p0SW3kf/zUpuA0QYQCgny4G /yqCMW8mAWHt1wbpQhqn+3c= =BXZh -END PGP SIGNATURE- -- To unsubscribe from this list go to the following URL and read the instructions: http://lists.samba.org/mailman/listinfo/samba -- To unsubscribe from this list go to the following URL and read the instructions: http://lists.samba.org/mailman/listinfo/samba
[Samba] file corruption problem, HELP
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I am running Samba 2.2.2 with winbind authenticating to an NT 4.0 PDC. All of my clients are Windows XP Pro. This box has been running fine for several months. In fact my uptime was 185 days as of last night. However, for various reasons i upgraded the kernel from 2.4.18 to 2.4.19 and had to reboot last night. Everything appeared to come up fine, all daemons started up and connections could be made. However, this morning some people (note: not everyone) are complaining about MS Word corrupting some of their files upon saving (all these files are being served by Samba). Since we have not had any problems for months i am attributing this to something in my kernel upgrade or reboot. If anyone here has any input i would greatly appreciate it. Thanks, Kevin R. Marshall - -- keyserver: http://pgp.mit.edu/ -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.7 (GNU/Linux) iD8DBQE97uK24pH/bZtToq0RAjrUAJ9T+sxnxwS10p0SW3kf/zUpuA0QYQCgny4G /yqCMW8mAWHt1wbpQhqn+3c= =BXZh -END PGP SIGNATURE- -- To unsubscribe from this list go to the following URL and read the instructions: http://lists.samba.org/mailman/listinfo/samba
Re: [Samba] File corruption with write cache enabled - patch included
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Mon, 11 Nov 2002, Bo Jacobsen wrote: > > Damn good call ! Very good bugfix. I've committed it to all > > Samba branches. Thanks a *lot* for this fix ! > > > > Jeremy. > > -- > > Is this patch included in 2.2.6. Yes > > >Perhaps you should warn users of current versions against using write > > > caching. > > Are we talking about oplocked files or has it also something to do with > "strict sync". We are talking about the write cache parameter which is disabled by default. cheers, jerry - Hewlett-Packard - http://www.hp.com SAMBA Team-- http://www.samba.org GnuPG Key http://www.plainjoe.org/gpg_public.asc ISBN 0-672-32269-2"SAMS Teach Yourself Samba in 24 Hours" 2ed "I never saved anything for the swim back." Ethan Hawk in Gattaca -BEGIN PGP SIGNATURE- Version: GnuPG v1.2.0 (GNU/Linux) Comment: For info see http://quantumlab.net/pine_privacy_guard/ iD8DBQE9z8ecIR7qMdg1EfYRArA+AJ4zxP0JnbizmyfIKFZ8HFfpPP+mggCfY4bw cCA35pzIJQkh04wbenEJa/E= =Lzf+ -END PGP SIGNATURE- -- To unsubscribe from this list go to the following URL and read the instructions: http://lists.samba.org/mailman/listinfo/samba
Re: [Samba] File corruption with write cache enabled - patch included
> On Thu, Oct 03, 2002 at 12:52:10PM +0200, Rasmus Borup Hansen wrote: > > I recently found out that write caching in samba sometimes leads to > > file corruption (the setup program for Sophos Antivirus generates > > corrupted files when making a "central installation" on a Samba > > share). > > > > This morning I tracked down the place in the Samba code that leads to > > corruption. Here is what happened to me: > > > > "write cache size" is 8192 bytes. A client opens a new file and writes > > byte no. 30959. This byte is cached. Then the program write byte > > no. 61919 which is written directly to the disk, since the cache > > doesn't go that far. The client then writes bytes no. 0 through > > 61920. Since these bytes don't fit into the cache they are written > > directly to the disk. However, the cached byte at position 30959 is > > not discarded. When this byte is later written to the disk, the file > > will get corrupted. > > > > The patch below detects this situation and discards the cached > > byte(s). I guess that some profiling code should also be added at some > > time. The patch is against version 2.2.5. > > > > Perhaps you should warn users of current versions against using write > > caching. > > > > I believe that this bug is the same as bug no. 24502 submitted by > > Henrik Qwinto <[EMAIL PROTECTED]>. > > > > Best regards, and thank you for making Samba, > > Damn good call ! Very good bugfix. I've committed it to all > Samba branches. Thanks a *lot* for this fix ! > > Jeremy. > -- Is this patch included in 2.2.6. > >Perhaps you should warn users of current versions against using write > > caching. Are we talking about oplocked files or has it also something to do with "strict sync". Bo. -- To unsubscribe from this list go to the following URL and read the instructions: http://lists.samba.org/mailman/listinfo/samba
Re: [Samba] File corruption with write cache enabled - patch included
On Thu, Oct 03, 2002 at 12:52:10PM +0200, Rasmus Borup Hansen wrote: > I recently found out that write caching in samba sometimes leads to > file corruption (the setup program for Sophos Antivirus generates > corrupted files when making a "central installation" on a Samba > share). > > This morning I tracked down the place in the Samba code that leads to > corruption. Here is what happened to me: > > "write cache size" is 8192 bytes. A client opens a new file and writes > byte no. 30959. This byte is cached. Then the program write byte > no. 61919 which is written directly to the disk, since the cache > doesn't go that far. The client then writes bytes no. 0 through > 61920. Since these bytes don't fit into the cache they are written > directly to the disk. However, the cached byte at position 30959 is > not discarded. When this byte is later written to the disk, the file > will get corrupted. > > The patch below detects this situation and discards the cached > byte(s). I guess that some profiling code should also be added at some > time. The patch is against version 2.2.5. > > Perhaps you should warn users of current versions against using write > caching. > > I believe that this bug is the same as bug no. 24502 submitted by > Henrik Qwinto <[EMAIL PROTECTED]>. > > Best regards, and thank you for making Samba, Damn good call ! Very good bugfix. I've committed it to all Samba branches. Thanks a *lot* for this fix ! Jeremy. -- To unsubscribe from this list go to the following URL and read the instructions: http://lists.samba.org/mailman/listinfo/samba
[Samba] File corruption with write cache enabled - patch included
I recently found out that write caching in samba sometimes leads to file corruption (the setup program for Sophos Antivirus generates corrupted files when making a "central installation" on a Samba share). This morning I tracked down the place in the Samba code that leads to corruption. Here is what happened to me: "write cache size" is 8192 bytes. A client opens a new file and writes byte no. 30959. This byte is cached. Then the program write byte no. 61919 which is written directly to the disk, since the cache doesn't go that far. The client then writes bytes no. 0 through 61920. Since these bytes don't fit into the cache they are written directly to the disk. However, the cached byte at position 30959 is not discarded. When this byte is later written to the disk, the file will get corrupted. The patch below detects this situation and discards the cached byte(s). I guess that some profiling code should also be added at some time. The patch is against version 2.2.5. Perhaps you should warn users of current versions against using write caching. I believe that this bug is the same as bug no. 24502 submitted by Henrik Qwinto <[EMAIL PROTECTED]>. Best regards, and thank you for making Samba, Rasmus -- Rasmus Borup Hansen, system adm. Email: [EMAIL PROTECTED] Institute for Mathematical Sciences Phone: +45 353 20759 Universitetsparken 5 Cell phone: +45 20829308 DK-2100 Ø, Denmark Office: E208 --- samba-2.2.5/source/smbd/fileio.c.orig Thu Oct 3 10:41:36 2002 +++ samba-2.2.5/source/smbd/fileio.cThu Oct 3 12:45:14 2002 @@ -438,7 +438,21 @@ if ( n <= wcp->alloc_size && n > wcp->data_size) { cache_flush_needed = True; } else { + ssize_t ret = real_write_file(fsp, data, pos, n); + + /* +* If the write overlaps the entire +* cache, then discard the cache. +*/ + + if ( (pos <= wcp->offset) && +(pos + n >= wcp->offset + wcp->data_size) ) { + DEBUG(9,("discarding invalidated write cache: +fd = %d, off=%.0f, size=%u\n", +fsp->fd, (double)wcp->offset, +(unsigned int)wcp->data_size )); + wcp->data_size = 0; + } DO_PROFILE_INC(writecache_direct_writes); if (ret == -1) -- To unsubscribe from this list go to the following URL and read the instructions: http://lists.samba.org/mailman/listinfo/samba
[Samba] File corruption using samba
Hello everyone, I am running Compaq/Dec Unix 4.0e with samba 2.0.0-beta1. The shares are being used for Lotus Domino 5.0, and every now and then we are getting file I/O errors and the mail files are getting corrupted. Has anyone seen this before or knows where I can go to get some information on this subject. I guess I could upgrade to the latest version of samba but I'm not sure if the latest version is supported on 4.0e of the OS. Any help is greatly appreciated Thanks Irfan -- To unsubscribe from this list go to the following URL and read the instructions: http://lists.samba.org/mailman/listinfo/samba