help-cfengine
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Detecting free disk space by percentage?


From: Bas van der Vlies
Subject: Re: Detecting free disk space by percentage?
Date: Tue, 9 Apr 2002 20:45:33 +0200 (MET DST)

> 
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Bas van der Vlies <basv@sara.nl> writes:
> 
> > You must use the % sign (Inside the function it is a negative number to
> > distinquish between kb and %)
> > 
> >  /home freespace=10% 
> 
> [...]
> 
> Ok, I tried it and it works, as long as the directory is directly
> under '/'.
> 
> So, for:
> 
> Filesystem           1k-blocks      Used Available Use% Mounted on
> /dev/sda2               350007     93964    237970  29% /
> /dev/sda1                23302      4817     17282  22% /boot
> /dev/vg00/lvol00        511980     41904    470076   9% /tmp
> /dev/vg00/lvol01        511980    101268    410712  20% /var
> /dev/vg00/lvol02       3145628   1809296   1336332  58% /usr
> /dev/vg01/lvol00       4194172   2799244   1394928  67% /home
> 
> I can NOT use it to check '/home', '/tmp', and so on.
> 
> I can use it to check: '/', or '/etc'.
> 
> I guess it is getting trapped at function:  CheckFreeSpace
> 
> 
> if (IsMountedFileSystem(&statbuf,file,1)) /* only do this on server */
>    {
>    return true;
>    }
> 
> 
> Running cfagent in debug mode "-d0", I think it is confirmed:
> 
>   Filesystem /home looks sensible
>   [/home is on a different file system, not descending]
>   Free space above -95, defining 
> 
> 
> Notice that '/home' is NOT above 95% free space.
> 
> Any ideas?
> 

I had the same problem. I solved it by creating a directory beneath
/home, namely cfengine and then it works. I know it is a ugly
construction and i think it is a bug! You must also set some
cfengine variables else cfengine thinks it is not a 'sensible' directory.

 /home/cfengine freespace=10%




reply via email to

[Prev in Thread] Current Thread [Next in Thread]