VZFASTBOOT-like behavior

  • Thread starter Thread starter lastguru
  • Start date Start date
L

lastguru

Guest
Hi,

Maybe a stupid question, but I don't think I am the only one with such problem. If anything breaks during restart (e.g. kernel panic or something like that) and VZ quotas need recalculation, it takes VERY long time to complete. Probably an hour or so. I discovered that there is a parameter called VZFASTBOOT in vz.conf, that starts each container without quotas first, then recalculate and then restart the containers with quotas - that way we don't lose uptime... but that only affects bootup, so using "vzctl start" I can't get this behavior if the containers are not started during bootup. Is there any way to start a container just as VZFASTBOOT does it?
 
Never mind. First of all, this parameter does not actually recalculate quotas on the fly - that was my mistake... I incorrectly interpreted the description. It just waits for all containers to start without quota and then restarts each of them with recalculating quota (which is better than nothing, of course, but it does not decrease downtime of each individual container). But hey, what could have changed during that unexpected reboot? The system do not add files there while CPU is offline, right? :D

So, if you are like me who stumbled upon this problem, just use "vzquota off" before starting the container (maybe some startup scripts needs to be modified - I use custom startup, so my startup is different) - it will save the quota and mark it to be consistent, and thus the container will be started without waiting for recalculation. However, it seems that quota information is not updated on the disk (anybody can confirm? is it a bug?), so I put a cron script that runs "vzquota stat" every few minutes to save current quota information. This is bad, and I do not have any solution for this part, unfortunately, so maybe somebody else could provide input. I even have no idea, how slow could "stat" be, so to be sure I will be starting it every 10 minutes... but maybe I can run it every minute to improve this behavior.

Hope, that helps...
 
Last edited by a moderator: