Editing NFS server inside container
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 7: | Line 7: | ||
== Kernel NFS server == | == Kernel NFS server == | ||
− | Kernel-space NFS server is supported by latest RHEL5 and RHEL6 based kernels and since vzctl-3.0.24. | + | Kernel-space NFS server is supported by latest RHEL5 and RHEL6 based kernels and since vzctl-3.0.24. NB! Currently only NFSv3 is supported - no NFSv4 support yet. |
− | |||
− | |||
− | |||
In order to run an NFS server inside a container, make sure: | In order to run an NFS server inside a container, make sure: | ||
− | * | + | * nfsd kernel module is loaded on host system before starting a container |
− | * | + | * nfsd feature for a container is turned on (<code>vzctl set $CTID --feature nfsd:on --save</code>) |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | Setup NFSv3 inside RHEL6/CentOS6/SL6 container: | |
− | <pre>chkconfig rpcbind on && service rpcbind start</pre> | + | * Make sure that rpcbind service is started before nfs service: <pre>chkconfig rpcbind on && service rpcbind start</pre> |
− | + | * Disable NFSv4 and nfsd module loading warnings in /etc/sysconfig/nfs: | |
− | + | <pre>vi /etc/sysconfig/nfs | |
− | + | --- MODIFY --- | |
− | <pre> | + | MOUNTD_NFS_V3="yes" |
− | + | RPCNFSDARGS="-N 4" | |
− | + | NFSD_MODULE="noload" | |
− | + | --- MODIFY --- | |
− | |||
− | |||
− | |||
− | |||
</pre> | </pre> | ||
− | + | * Start NFS service:<pre>chkconfig nfs on && service nfs start</pre> | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | <pre> | ||
− | |||
− | |||
− | |||
− | |||
− | </pre> | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
== User-space NFS server == | == User-space NFS server == |