www.delorie.com/gnu/docs/cfengine/cfengine-Reference_88.html   search  
Buy GNU books!

GNU cfengine

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.12 disks

This is a synonyn for required, See section 3.28 required. This action tests for the existence of a file or filesystem. It should be called after all NFS filesystems have been mounted. You may use the special variable $(binserver) here.


    /filesystem freespace=size-limit define=class-list(,:.) 

     inform=true log=true force=true

Files or filesystems which you consider to be essential to the operation of the system can be declared as `required'. Cfengine will warn if such files are not found, or if they look funny.

Suppose you mount your filesystem /usr/local via NFS from some binary server. You might want to check that this filesystem is not empty! This might occur if the filesystem was actually not mounted as expected, but failed for some reason. It is therefore not enough to check whether the directory /usr/local exists, one must also check whether it contains anything sensible.

Cfengine uses two variables: sensiblesize and sensiblecount to figure out whether a file or filesystem is sensible or not. You can change the default values of these variables (which are 1000 and 2 respectively) in the control section. See section 3.8 control.

If a file is smaller than sensiblesize or does not exist, it fails the `required' test. If a directory does not exist, or contains fewer than sensiblecount files, then it also fails the test and a warning is issued.



If you set the freespace variable to a value and set inform=true, cfagent issues warnings when free disk space falls below this threshold. Any define-classes also become defined in this instance. (the default units are kilobytes, but you may specify bytes or megabytes), e.g.

If the option force=true is used, cfengine will parse filesystems even on NFS mounted filesystems. Normally it does not make sense to check filesystems that are not native to the local host, but occasionally ne would like to force such a check in order to set a class, based on the result, for instance.

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

  webmaster   donations   bookstore     delorie software   privacy  
  Copyright 2003   by The Free Software Foundation     Updated Jun 2003