Cfengine configuration directory

Mountables and the cfengine mount model

Relevant classes: any

mountables

The mountables declaration need only be used if you are using cfengine's model for mounting NFS filesystems. This declaration informs hosts of what filesystem resources are available for mounting. This list is used in conjunction with binservers and homeservers to determine which filesystems a given host should mount, according to the cfengine model.

The syntax of the list is:

mountables:

   class::
       "filesystem to mount"
	   readonly=false/off/true/on
	   mountoptions=nfs-options

readonly=/false/off/true/on
The default value of this option is false. So cfengine will mount the filesystem with mode readwrite and the default cfengine mount options for the platform it runs on. If it is set to true then it will still use the default cfengine mount options, but it will be mounted readonly.
mountoptions=nfs-options
In cfengine there are defaults mount options for all kind of platforms, but these options may not be valid in a heterogenous network or we want to use other options for better nfs performance. With this option we can change how cfengine will mount the filesystem. Note that that the default cfengine mount options work. The custom options you specify, mostly platform specific, are your own responsibility.

Here is an example script of a mountable definition.

mountables:

   server:/site/server/u1

   server:/site/server/local
     readonly=true

   linuxhost:/site/linuxhost/local
   linuxhost:/site/linuxhost/u1

   linux::
     server2:/site/server2/local
     readonly=true
   irix::
     server2:/site/server2/local
     readonly=true
     mountoptions=soft,bg,intr,rsize=8192,wsize=8192
This will mount:
  • server:/site/server/u1, linuxhost:/site/linuxhost/local, linuxhost:/site/linuxhost/u1 readwrite with the default mount options
  • server:/site/server/local readonly with the default mount options
  • server2:/site/server2/local on linux systems readonly with default mount options and on irix systems readonly with user supplied mount options.

Notice that binary and home-directory filesystems are mixed freely here. Cfengine determines which of the entries are homedirectories using the homepattern variable.

Every time you add a disk or a mountable partition to your network, you should add the partition to the list of mountables.

NOTE: This list is read in order, top down. Cfengine looks for the first filesystem matching a given binary server when expanding the variable $(binserver), so sometimes the ordering of filesystems matters.

You can only use classes that are known at runtime or that are declared in the groups action all other classes are ignored/skipped.

This list can be accessed in editfiles, to allow straightforward configuration of the automounter, using the command AutomountDirectResourc es.

Back to documentation