Editing NFS
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 23: | Line 23: | ||
For NFS mounts to work in the containers with the RHEL5-based kernels you must enable kernel threads in the container by setting <code>kernel.ve_allow_kthreads=1</code> in <code>/etc/sysctl.conf</code>. | For NFS mounts to work in the containers with the RHEL5-based kernels you must enable kernel threads in the container by setting <code>kernel.ve_allow_kthreads=1</code> in <code>/etc/sysctl.conf</code>. | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
# modprobe nfs | # modprobe nfs | ||
Line 45: | Line 35: | ||
To allow a container to use NFS filesystem, you will need to start it with "nfs" feature enabled. If the container is running while you set the <code>--features nfs:on</code>, you will need to reboot it. | To allow a container to use NFS filesystem, you will need to start it with "nfs" feature enabled. If the container is running while you set the <code>--features nfs:on</code>, you will need to reboot it. | ||
− | # vzctl set 101 --features "nfs:on" --save | + | # vzctl set 101 --features "nfs:on nfsd:on" --save |
# vzctl start 101 | # vzctl start 101 | ||
Line 62: | Line 52: | ||
== Mounting NFS == | == Mounting NFS == | ||
− | Make sure that packages <code>nfs-utils</code> and <code>nfs-utils-lib</code> or similar are installed in a container | + | Make sure that packages <code>nfs-utils</code> and <code>nfs-utils-lib</code> or similar are installed in a container. |
Assuming that you already have NFS server set up at <code>192.168.0.1:/nfs_pub</code>, mounting will be simple | Assuming that you already have NFS server set up at <code>192.168.0.1:/nfs_pub</code>, mounting will be simple | ||
Line 82: | Line 72: | ||
* There are quite a few parameters in NFS, so sometimes it doesn't work due to misconfiguration. We've created a separate page describing such situations: [[NFS doesn't work]]. | * There are quite a few parameters in NFS, so sometimes it doesn't work due to misconfiguration. We've created a separate page describing such situations: [[NFS doesn't work]]. | ||
* Package nfs-common can not be installed. Make sure you start <code>portmap</code> before trying to install nfs-common. | * Package nfs-common can not be installed. Make sure you start <code>portmap</code> before trying to install nfs-common. | ||
− | |||
== See also == | == See also == |