Setting Up NFS Server in Containers
To set up an NFS server in a Container, do the following:
- Make sure the
rpcbind , nfsd , and nfslock services are installed in the Container. - Enable the NFS server feature for the Container by running the
vzctl set --features nfsd:on command on the Hardware Node. For example:# vzctl set 101 --feature nfsd:on --save
Note: If the Container is running, restart it for the changes to take effect.
- Start the
rpcbind service in the Container.# service rpcbind start
Starting rpcbind: [ OK ]
- Start the
nfs and nfslock services in the Container.# service nfs start
Starting NFS services: [ OK ]
Starting NFS quotas: [ OK ]
Starting NFS mountd: [ OK ]
Starting NFS daemon: [ OK ]
# service nfslock start
Starting NFS statd: [ OK ]
You can now set up NFS shares in the configured Container.
Note: NFSv4 support may be disabled by default. For details on how to enable it, see Enabling NFSv4 Support for Containers.
|