I need a second filesystem inside one of my VEs in OpenVZ that I will want mounted with mandatory locking. Does anyone know how to do this?


This is normally done from /etc/vz/conf/vps.mount and vps.umount scripts

sample script


if [ -z "${VEID}" ]; then
        exit 1

[[ ! -f /etc/vz/vz.conf ]] && exit 1
[[ ! -f $VE_CONFFILE ]] && exit 1

. /etc/vz/vz.conf

mount --bind /some/where/mount_point $VE_ROOT/mount_point

see also manual around page 88


I solved same issue on machine with ploop and modern OpenVZ kernel in this way: http://www.stableit.ru/2013/11/how-to-mount-multiple-disks-to-openvz.html

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.