Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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?

share|improve this question

2 Answers 2

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

share|improve this answer

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

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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