[Devel] vzctl PRE_CREATE hook

Nikolay Tenev tenev.nikolay at gmail.com
Tue May 12 02:36:09 PDT 2015


Hello devs,

In my project I wanted to make every OpenVZ container to use for a private
directory (VE_PRIVATE) separated block device (HDD partition, lvm volume,
NFS share, etc.). To use wrapper script over vzctl was one option, but
PRE_CREATE hook, in which to create, mkfs and mount LVM volume would be
even better.

So, I'm not a developer, but using code from POST_CREATE hook I was able to
create the PRE_CREATE one, which can be used as the other hooks e.g.

add in /etc/vz/dists/ default
PRE_CREATE = precreate.sh

and during
vzctl --create ...

it will call /etc/vz/dists/scripts/precreate.sh with VEID as argument

Currently I have a patch to vzctl master branch which implements this
PRE_CREATE hook and I'm ready to share it.

So my questions are:
- Do you find this for interesting and/or useful?
- If 'yes', what is the right way to send this patch: here, by email; or to
create pull request in git repo?

Best regards!

Nikolay Tenev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openvz.org/pipermail/devel/attachments/20150512/290affcc/attachment-0001.html>


More information about the Devel mailing list