Sanjiv Bawa
2002-May-13 10:48 UTC
[Samba] Lock file problems? smb_open and smb_readpage_sync issues
I have a samba 2.2.3a server running on Red Hat 7.2 There are several normal shares that are ok. I have one share on the samba box that is actually smbmounted from a Win2K machine. This share seems to be giving me lots of errors. It seems to work fine though. On at least one instance the smb processes crashed, so I would like to get this resolved. The errors are: My 13 11:43:50 localhost kernel: smb_open: ffdata/FF2000domain.db open failed, result=-26 My 13 11:43:50 localhost kernel: smb_readpage_sync: ffdata/FF2000domain.db open failed, result=-26 FF2000 is the directory on which the Win2k share has been mounted. domain is the name of the domain. I think that samba is trying to create normal locks on this file and is failing. Should I just turn locks off on this share? Is there a better way to do this? Thanks.
Urban Widmark
2002-May-13 11:17 UTC
[Samba] Lock file problems? smb_open and smb_readpage_sync issues
On Mon, 13 May 2002, Sanjiv Bawa wrote:> I have one share on the samba box that is actually smbmounted from a Win2K > machine. This share seems to be giving me lots of errors. It seems to work > fine though. On at least one instance the smb processes crashed, so I would > like to get this resolved. > > The errors are: > My 13 11:43:50 localhost kernel: smb_open: ffdata/FF2000domain.db open > failed, result=-26 > My 13 11:43:50 localhost kernel: smb_readpage_sync: ffdata/FF2000domain.db > open failed, result=-26 > > FF2000 is the directory on which the Win2k share has been mounted. domain is > the name of the domain. > > I think that samba is trying to create normal locks on this file and is > failing. Should I just turn locks off on this share? > > Is there a better way to do this?Yes, let the clients connect directly to the win2k box or move the files onto the samba server. smbfs does not implement fcntl locking, so it opens "FF2000domain.db" without any locks, even if samba tries to lock. In this case you get a -26 error which means -ETXTBSY or "Text file busy". I read that as some other process having the file open and that it does not allow smbfs to open it (with the really old smb that smbfs uses to open files). /Urban