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 1: | Line 1: | ||
− | This page describes how to | + | This page describes how to mount NFS partition inside VE. |
− | + | == NFS server == | |
+ | Currently OpenVZ kernel doesn't include kernel NFS server support. Howether you are still able to use user space [[NFS server inside VE]]. | ||
− | + | == NFS client == | |
− | + | === Preparations === | |
− | == Preparations == | + | ==== Prerequisites ==== |
− | === Prerequisites === | ||
You will need the following software: | You will need the following software: | ||
− | # vzctl version 3.0.13 or higher | + | # [http://openvz.org/download/utils#vzctl vzctl] version 3.0.13 or higher |
− | # kernel version 2.6.18-028test006 or higher (2.6.18-028stab* will do), or any recent RHEL5-based or 2.6.20-based kernel. | + | # [http://openvz.org/download/kernel/ kernel] version 2.6.18-028test006 or higher (2.6.18-028stab* will do), or any recent RHEL5-based or 2.6.20-based kernel. |
− | |||
− | |||
+ | Note: In REL4 2.6.9-023stab044.4-smp kernel NFS support can be given to a VE by setting: | ||
sunrpc.ve_allow_rpc = 1 | sunrpc.ve_allow_rpc = 1 | ||
fs.nfs.ve_allow_nfs = 1 | fs.nfs.ve_allow_nfs = 1 | ||
kernel.ve_allow_kthreads = 1 | kernel.ve_allow_kthreads = 1 | ||
− | + | ==== Prepare the HN ==== | |
− | + | For NFS mounts to work in the VEs with the RHEL5-based kernels you must enable kernel threads in the VE by setting "kernel.ve_allow_kthreads=1" in /etc/sysctl.conf | |
− | + | <pre> | |
+ | # modprobe nfs | ||
+ | </pre> | ||
− | + | ==== Prepare the VE ==== | |
− | + | To allow a VE use NFS filesystem, you will need to start it with "nfs" feature enabled. If the VE is running while you set the --features "nfs:on", you will need to reboot it. | |
− | + | <pre> | |
− | + | # vzctl set 101 --features "nfs:on" --save | |
− | + | # vzctl start 101 | |
− | + | </pre> | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | === Prepare the | ||
− | To allow a | ||
− | |||
− | |||
− | |||
After this you may see nfs in <code>/proc/filesystems</code> | After this you may see nfs in <code>/proc/filesystems</code> | ||
Line 61: | Line 45: | ||
</pre> | </pre> | ||
− | == Mounting NFS == | + | === Mounting NFS === |
− | + | 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> | ||
<pre> | <pre> | ||
# vzctl enter 100 | # vzctl enter 100 | ||
Line 77: | Line 59: | ||
</pre> | </pre> | ||
− | For more details on how to setup NFS mount | + | For more details on how to setup NFS mount see [http://nfs.sourceforge.net/nfs-howto/ar01s04.htm NFS-client HOWTO] |
− | |||
− | |||
− | |||
− | |||
− | |||
− | == | + | === Known issues === |
− | + | There are quite a few parameters in NFS, so sometimes it doesn't work due to misconfiguration. We created a separate | |
+ | page for discribing such situation: [[ NFS doesn't work ]] | ||
[[Category: HOWTO]] | [[Category: HOWTO]] |