NFS config files?
Peter Flynn
peter at silmaril.ie
Tue Aug 11 10:38:08 UTC 2020
On 11/08/2020 10:42, Ken D'Ambrosio wrote:
> On 2020-08-10 22:13, Karl Auer wrote:
>> If anyone out there has a working NFS mount, I would very much
>> appreciate seeing
>>
>> - your /etc/exports
>> - the client's fstab entry
>> - "ls -lad" for the exported directory
>> - "ls -lad" for the client's mount point.
>
> One thing that I have learned over the years is that often the problem
> someone is having isn't what they think it is. An explanation of what
> you're expecting to see, and what's not happening, might be helpful in
> troubleshooting...
I no longer have access to the machines at work where we used NFS links
extensively to mount writable web root directories on all the machines
the CMS published sites to; so unfortunately I can't post them. In our
circumstances, traffic was strictly one-way, writing FROM the CMS server
TO each target machine, but the key lessons we learned early on were:
1. the UID under which the CMS executes (eg tomcat:999) MUST be the
same as the UID of the owner of the mount point on all machines
written to, otherwise nothing will work. This means creating that
user with that UID on all target machines, and establishing a
written procedure for all machines serving the web from the CMS.
2. the mounting is done from a script (typically /etc/rc.local) on
each target machine, NOT from the machine doing the writing (CMS
server in our case). If you're setting up a bidirectional write,
it probably doesn't matter. A standard parameterised script was
maintained by Systems and installed on every such server.
3. the server doing the writing MUST be up and running FIRST,
otherwise the mount will fail. The script in [2] MUST therefore
test that the other end of the link is running, before attempting
the mount. Ops had the order of boot written into their procedures
for restarting after an outage.
I think the CMS used a version of rsync to do the actual data transfer
so that it could act bisynchronously. Once we had the initial setup
working we never had any trouble.
P
More information about the ubuntu-users
mailing list