On 2/10/11 8:07 AM, "no-re...@cfengine.com" <no-re...@cfengine.com> wrote:
> Forum: Cfengine Help
> Subject: Re: Parsing fstab
> Author: Beto
> Link to topic: https://cfengine.com/forum/read.php?3,20565,20571#msg-20571
> 
> Obviously I'm not communicating the problem clearly.  Let's go back to my
> original post where I state the problem:
> 
> Ensure nfs file sytems in fstab are mounted.
> 
> In other words, I have an NFS client.  I need to ensure that all NFS mounts in
> fstab on the client are actually mounted.  Before I can run a mount promise on
> the client to ensure that they are indeed mounted I need to know the NFS
> server and NFS file sytem name.  The only place where this information exists
> is in fstab on the NFS client.  This is the information I want to get from the
> client's fstab.
> 
> We can assume the file systems are already exported on the NFS server and we
> don't need to worry about that - just ensuring they're mounted on the client.

We generally reverse this logic a bit...

New clusters have their configs checked into CVS, including fstabs.  The
fstabs in CVS don't include mounts set in our OS builds (those are standard
and rarely if ever change anyway), but rather just the additional cluster
specific mounts we want added.

This subset of fstab is copied locally to machines in the cluster, and each
line inserted into /etc/fstab if not already present.  Editfiles then sets a
class any time new lines must be appended to /etc/fstab, which causes
shellcommands to run "mount -a -tnfs" as someone else pointed out.

So CVS is still the authority, mount doesn't run unless there are edits, and
any edits result in cfengine ensuring all NFS filesystems are mounted.
Seems to work for us.  Good luck!  :)

_______________________________________________
Help-cfengine mailing list
Help-cfengine@cfengine.org
https://cfengine.org/mailman/listinfo/help-cfengine

Reply via email to