Subject: Re: [vserver] dlimit refresher script for review :)
From: Ghislain <gadnet@aqueos.com>
Date: Tue, 28 Feb 2012 09:52:07 +0100
Tue, 28 Feb 2012 09:52:07 +0100
I can see one issue but i don't know which would be the way to correct this:

chxid -URx -c "$1" "$DIRECTORY";

  is done AFTER the usage is recorded with USED SPACE=$(vdu --xid 
"$1"      --space  "$DIRECTORY" | cut -d" " -f2);  so we will miss the 
file that would have been tagged by the chxid and therefor be inacurate.

   But if i do the reverse and that the tagged files exceed the limit 
then i will make the guest crash as it will not be able to write any 
files to this directory and if this directory is the root or any system 
important directory we can loose data. Then to get accurate result you 
will need to run it two times and be ready in case of warning to quickly 
do something about it.

regards,
ghislain.



["application/pkcs7-signature" not shown]