possible to build vzquota file after VE has started?
Hi, I want to start a new VE without vzctl invoking 'vzquota on VEID x x x x xx'. Is it possible to start the VE without any quota support and then build the quota while the VE is running, and have the quota be sane after it is built? The idea is to start a VE very quickly and not care about quota enforcement in the very short term but still have it enforced as normal later. Rick
Re: possible to build vzquota file after VE has started?
Rick, It looks like I do not understand your question correctly: Usually quota is saved into quota-file on VE stop and restored on next VE start. They are fast operations and as far as I understand your optimization is not required here. Quota is recalculated on the first VE boot and in some other rare cases when quota-file has not been saved correctly on VE stop. But IMHO it is really rare cases and therefore your optimization is not make big sense here too. Am I miss something? Could you plese explain your Idea to me more detailed? Thank you, Vasily Averin
Hi, on the very first VE start, after template unpacking, the quota is calculated on start, agree? I wish to skip the initial quota calculation and calculate it later, after the VE has been started for the first time. Rick
Ok, thank you, I'm understand. I'm agree, it looks reasonable thank you, Vasily Averin
Hi Vasily, do you have any suggestions on how I can accomplish my idea? Rick
Hi Rick, Currently it is not possible, and we cannot improve this feature quickly by some simple method. Therefore we'll keep your idea in mind and will think how to implement this feature in next versions of vzctl/vzquota. We cannot remove quota calls or move it to some other place -- because it is not help and it just move delay in other place. However it make sense to think how to make asynchronous the quota initialization procedure. Thank you, Vasily Averin
Excellent, thanks. One of my os templates is 2.5GB with tons and tons of files. It takes a while to calculate quota. Rick
vaverin, do you think it is possible to calculate the quota of the template, save it somewhere, then copy it to /var/vzquota/quota.VEID right before creating VEID? [root@nickel ~]# strings /var/vzquota/quota.9890031 /vz/private/9890031 [root@nickel ~]# can we replace that somehow? Rick