1

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?

2 Answers 2

1

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

0

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .