6,534
edits
Changes
* [[Bind mounts]] from Hardware Node
Also, you can grant a container an access a physical block device, and use that device from inside the container. Not all file systems are working inside a container; check /proc/filesystems inside a container to find out. =Mount filesystem on VE start= You need to create mount script in openvz configuration directory (/etc/vz/conf) with name <veid>.mount. If you need to mount filesystem to all containers than name of script should be vps.mount and inside script ${VEID} variable can be used. Example:<pre>#!/bin/bashmount --bind /mnt/disk /vz/root/${VEID}/mnt/diskexit ${?}</pre> For unmounting filesystem file vps.umount can be used. Example:<pre>#!/bin/bashumount /vz/root/${VEID}/mnt/diskexit 0</pre> ''Notice:''<veid>.umount scripts are not very necessary: everything will be umounted automatically on VE stop. But you should than mount with -n option in mount script.