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?

link|improve this question

78% accept rate
feedback

1 Answer

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

sample script

#!/bin/bash

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

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

. /etc/vz/vz.conf
. $VE_CONFFILE

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

see also manual around page 88

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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