This is a synonym for disks, See section disks.
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.
required: /filesystem freespace=size-limit define=class-list(,:.)
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 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.
required: any:: /$(site)/$(binserver)/local
If you set the freespace
variable to a value (the default units are kilobytes,
but you may specify bytes or megabytes), e.g.
required: /site/host/home1 freespace=50mb define=dotidy
then cfengine will warn when the filesystem concerned has less than this
amount of free space. By adding a define
tag, you can switch on
any number of classes if this happens. This allows you to activate special
measures for dealing with a filesystem which is in danger of becoming
full.
Go to the first, previous, next, last section, table of contents.