OpenVZ Forum


Home » Mailing lists » Users » Skipping quota at start and doing it later?
Re: Skipping quota at start and doing it later? [message #30200 is a reply to message #30197] Thu, 15 May 2008 17:00 Go to previous message
Gregor Mosheh is currently offline  Gregor Mosheh
Messages: 62
Registered: April 2007
Member
Gregor wrote:
>> Sure, but we DO want quotas to be enforced. I just don't want to wait
>> for recalculating disk usage at startup, when I know that the
>> usage hasn't changed since the power went out.

Kir Kolyshkin wrote:
> It was suggested earlier in this thread that if you will comment out the 
> following line
> need_restart="${need_restart} ${veid}"
> in /etc/init.d/vz you get the exact behavior you ask for. Can you 
> confirm (or deny) this?

I did not try that mechanism. I didn't see "--nocheck" in the vzquota 
man page, and when running it manually during the initial steps of the 
problem, the flag had no effect (quota checking still ran). As such, I 
didn't accept that "vzquota on --nocheck" would accomplish my goal, even 
if the later step of restarting were skipped.

I already had in place a change to the init script, which runs "vzquota 
off" before running "vzquota on" in order to repair the quota file and 
then come back up.

It goes something like this, and I'd be glad to provide the complete script.
     # fastboot means to turn quota off,
     # effectively repairing the quota file or doing nothing
     if QUOTA and VZFASTBOOT; then vzquota off $VEID ; fi
     # now turn quota on as usual
     if QUOTA; vzquota on $VEID ; fi

I'm sure some folks actually like the current behavior, of their VPSs 
starting, then restarting over the course of an hour to recalculate disk 
usage, but this hack worked great for my needs.

-- 
Gregor Mosheh / Greg Allensworth, BS, A+
System Administrator
HostGIS cartographic development & hosting services
http://www.HostGIS.com/

"Remember that no one cares if you can back up,
  only if you can restore." - AMANDA
 
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: Tue Sep 17 09:17:10 GMT 2024

Total time taken to generate the page: 0.05268 seconds