OpenVZ Forum


Home » Mailing lists » Users » Skipping quota at start and doing it later?
Re: Skipping quota at start and doing it later? [message #30117 is a reply to message #30116] Mon, 12 May 2008 17:42 Go to previous messageGo to previous message
Gregor Mosheh is currently offline  Gregor Mosheh
Messages: 62
Registered: April 2007
Member
Matt Ayres wrote:
> What you want is not possible with any existing options.  You could 
> possibly edit the vz init script and removed the needs_restart line.

Ahhhh, okay. Then I guess my hack to /etc/init.d/vz is the best way to 
accomplish what I want. We already have a policy of never bypassing the 
tmpfs, so the quota stats before a power outage are good enough for our 
needs.


FYI, the fix I have applied is probably not the best, but here it is for 
posterity:

start_ves()
{
         local veid
         local velist
         local msg
         local need_restart

         need_restart=""
         cd ${CONFIG_DIR} || return
         velist=`grep -l '^ONBOOT=yes\|^ONBOOT=\"yes\"' [0-9]*.conf 
2>/dev/null |
                 sed -e 's/.conf//g' | sort -n`
         cd - >/dev/null
         sysctl -q -w net.ipv4.route.src_check=0
         for veid in $velist; do
                 [ "${veid}" = "0" ] && continue
                 __echo "Starting VE ${veid}: "
                 if [ "x${VZFASTBOOT}" = "xyes" -a "x${DISK_QUOTA}" = 
"xyes" ]; then
                         $VZQUOTA off ${veid} >/dev/null 2>&1
                 fi
                 msg=`$VZCTL start ${veid} 2>&1`
                 print_result "$msg"
         done
}



-- 
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: Fri Oct 18 11:20:15 GMT 2024

Total time taken to generate the page: 0.06441 seconds