NFS storage

From ISPWiki
Jump to: navigation, search
Hierarchy: VMmanager KVM -> Cluster configuration
VMmanager Cloud -> Cluster configuration

NFS is a network storage. It is slower that a local storage, we recommend using it only for locating additional virtual disks.


Execute the following commands on the machine that is used as the NFS server:


apt-get install nfs-kernel-server nfs-common portmap


yum -y install nfs-utils nfs-utils-lib
service rpcbind restart
service nfs start
chkconfig rpcbind on
chkconfig nfs on

NFS configuration

On server

  • Edit the /etc/exports file to get the following record:
/export  <client_ip>(rw,sync,no_subtree_check,no_root_squash)


  • change "/export" into the path to the storage where virutal disk images will be kept;
  • change <client_ip> into a client's IP address.
    • execute the command to update the /etc/exports file:
exportfs -a
  • edit /etc/idmapd.conf: enter your domain name as "Domain";
  • execute the following commands to start idmapd and nfsserver:
/etc/init.d/idmapd start
/etc/init.d/nfsserver start

On clients

  • edit /etc/idmapd.conf: enter your domain name as "Domain";
  • execute the following command to start idmapd and nfsserver:
/etc/init.d/idmapd start
  • Mount the file system with the command:
mount -t nfs4 <servername>:/ <mntpath>

The client and NFSv4 server must bound to the same domain. Otherwise, it can lead to issues when creating and deleting virtual machines.


Make sure you allow access to the NFS-server in Firewall :

iptables -A INPUT -s <ip>/<mask> -m state --state NEW -p tcp --dport 2049 -j ACCEPT
service iptables save

where <ip>/<mask> - IP address of VMmanager with the mask (for example,