OpenVZ Forum


Home » Mailing lists » Users » Skipping quota at start and doing it later?
Re: Skipping quota at start and doing it later? [message #30114 is a reply to message #30113] Mon, 12 May 2008 16:41 Go to previous messageGo to previous message
TheWiseOne is currently offline  TheWiseOne
Messages: 66
Registered: September 2005
Location: Pennsylvania
Member
Gregor Mosheh wrote:
> Matt Ayres wrote:
>> All you have to do is set VZFASTBOOT=yes in /etc/vz/vz.conf and VPS's 
>> will be started without quota and then will be restarted to calculate 
>> the quota after all have been started.
>
> I think I see where we're misconnecting. You say that FASTBOOT will 
> cause all VPSs to start, then those with fastboot will be re-started 
> later so their quota info can run?
>
> What I'd really like it to skip the quota recalculation entirely, 
> achieve the same effect I currently do with vzquota off (repairing 
> quota file without recalculating) and vzquota on (turning quota on).
>
VZFASTBOOT is the option.  /etc/vz/vz.conf is the main Virtuozzo config, 
not a VPS/Container config file -- it is a global option, it cannot be 
set per-Container.  If you set that option in vz.conf then you will 
achieve the effect you desire.

If you look at the code, it checks in VZFASTBOOT is set to yes, if it is 
then it starts the VPS with vzquota nocheck.  Once all VPS's are started 
it will iterate over all VPS's stopping them, calculating the quota, and 
starting the VPS back up. 

---
              if [ "x${VZFASTBOOT}" = "xyes" -a "x${DISK_QUOTA}" = 
"xyes" ];
               then
                       $VZQUOTA stat ${veid} >/dev/null 2>&1
                       if [ $? -eq 6 ]; then
                               if $VZQUOTA show ${veid} 2>&1 | grep 
"vzquota : (warning) Quota is running" >/dev/null 2>&1; then
                                       $VZQUOTA on ${veid} --nocheck 
 >/dev/null 2>&1
---

That does the check I stated above, VPS's are started with an 
out-of-sync quota.

---
                                       need_restart="${need_restart} 
${veid}"
---

This sets a flag that this VPS needs to be restarted normally later on 
in the script.  The normal restart will cause the quota to be fully checked.

I assure you this is the option you want enabled.

Thanks,
Matt
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: linux vlan + ipv6 tunnel
Next Topic: 2.6.24-ovz004 kernel BUG at net/8021q/vlan.c:182 with 'modprobe -r 8021q'
Goto Forum:
  


Current Time: Fri Oct 18 09:21:34 GMT 2024

Total time taken to generate the page: 0.05005 seconds