Editing Mounting filesystems
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 5: | Line 5: | ||
* [[Bind mounts]] from Hardware Node | * [[Bind mounts]] from Hardware Node | ||
− | Also, you can grant a container an access | + | 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/bash | ||
+ | mount --bind /mnt/disk /vz/root/${VEID}/mnt/disk | ||
+ | exit ${?}</pre> | ||
+ | |||
+ | For unmounting filesystem file vps.umount can be used. | ||
+ | |||
+ | Example: | ||
+ | <pre>#!/bin/bash | ||
+ | umount /vz/root/${VEID}/mnt/disk | ||
+ | exit 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. |