Mount locally hosted samba share.

I’ve been encountering some very odd behavior with Samba 3.2.7-11.4.1 running on Kernel 2.6.32-38-pae.

Background:

Server A hosts a samba share for other servers in our environment. To enforce uniform access to the files hosted on the share, all servers ( including Server A ) need to access the files via the share. Technically, since the files are hosted on Server A, the files could be accessed directly but as mentioned above, to ensure uniform access, Server A needs to access these files via the share just like all the other servers.

Problem:

All other servers in our environment are able to access the share without issue. Server A is able to mount the share locally and via basic “cat” & “touch” tests I can confirm that files are being read/modified with the appropriate permissions.

The files hosted on the share are used by an application that runs on all of the servers. Every server, other than Server A is able to run the application and access the files without issue. However, when running the application on Server A, it hangs while attempting to access the files on the locally mounted share.

I’ve increased Samba’s logging level to 2 but no obvious problems seem to be reported. The client application starts accessing files on the share to a certain point and seems to “stop”.

Summary:

Has anyone else experienced a problem accessing files via a locally mounted share when the share is hosted on the same server as the mount point?

I tried to keep the above explanation as general as possible since the issue doesn’t seem to be related to the application ( VMware ) that uses the files hosted via Samba.

If any additional info is needed, just let me know.

Thanks in advance for any input.

I am not a SAMBA guru (look for Swerdna), but reading your post I came to the following.

When your share (must be a windows word :frowning: ) is at /databaases/share and you mount it on the other systems also at /databases/share, that would mean that when you do this on systemA, you would create a kind of loop.

I always see the most silly things in my mind.

Sorry if this is of no help to you.

Thanks for the reply.

I’m not mounting the samba share to the same location that the files exist on the system. The following example should illustrate my point.

Excerpt from smb.conf on Server A:
[shared_files]
path = /mnt/int/files

The above share (shared_files) is being mounted locally on Server A to:
/files

I hope this illustrates that the mount location is different from the folder’s location associated with the share.

Any other ideas?

Thanks again.

Quick update.

As it turns out, the issue I was experiencing did not have anything to do with locally mounting a samba share on the server hosting the share. The problem resided in using server-side inode numbers. To work around this, I simply disabled server-side inode numbers and relied on the client to dynamically create them.

Working Example:
mount.cifs //127.0.0.1/files /files -o noserverino

Thanks.