Open main menu

OpenVZ Virtuozzo Containers Wiki β

Changes

Automatically setting quotaugidlimit

265 bytes added, 14:26, 22 February 2013
+ploop
If you are using second-level user/group quota with simfs for your containers, you have to take care that the value at every moment is high enough. Otherwise, newly created users and groups within the VE CT won't be able to own files.'''Note this is not required for ploop layout, in which quotaugidlimit is enabled with any non-zero value.'''
Rather than checking these values from time to time by hand, you can use the shell script from below to automatically set the quotaugidlimit based on the needs of the individual containers. Just setup a cronjob for it.
for file in $FILES
do
STRING=""
VALUE=""
INT=""
CONFFILE=""
VEID=""
USERC=""
GROUPC=""
TOTAL=""
 
# source the config file
. $file
# set the new quotaugidlimit for container
vzctl set $VEID --quotaugidlimit $TOTAL --save
echo "New quotaugidlimit set to $TOTAL for VEID $VEID\n"
fi
fi