1

I have a pair of web servers running GlusterFS 3.3.0 providing a single replicated volume. Clients connect via NFS, and the web servers are also clients. Gluster gets very unhappy if the files it serves are written via the 'back door' (i.e. local file access), so I need to go through the NFS stack to go in through the 'front door'. Each server has an autofs config that is set to mount the volume from localhost. These are my config files:

/etc/auto.master:

#+auto.master
/- /etc/auto.nfs

/etc/auto.nfs:

/var/lib/sitedata -fstype=nfs,vers=3,hard,noexec,nosuid,nodev,rsize=32768,wsize=32768,intr,noatime,mountproto=tcp 127.0.0.1:/shared

(These mount values are what are suggested for gluster NFS clients, in particular the forcing of TCP; a more minimal config doesn't work either)

The problem I'm running into is that autofs (or NFS) seems to say "Hey, this is pointing at localhost so I can shortcut it by doing a local bind remount instead!", as if I had said mount --bind /shared /var/lib/sitedata. Unfortunately that fails completely as it's not the same thing at all.

This seems to be specific to localhost because a remote server connecting to one of these hosts doesn't have a problem with the same autofs config. I don't want each web server to mount the other - performance is bad enough already without introducing new failure modes!

How can I force autofs' NFS mount to go via TCP?

1 Answer 1

2

See manual of auto.master.

Under "Options" you can find "nobind", which does the trick.

1
  • That would be perfect if it was there in my autofs version! It was introduced in version 5.0.6 and I'm on 5.0.4. Thanks for the tip, I guess I need to look for a backport...
    – Synchro
    Nov 26, 2013 at 17:20

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .