A Configuring the NFS service for the control node--NFS server
1. Configuring NFS Services on the control node 192.168.15.180
# yum Install nfs-utils Portmap
# yum-y Install nfs-utils Rpcbind
To create a directory for NFS services:
#mkdir/root/nfs_dir
Change configuration:
[Email protected] Nfs_dir (keystone_admin)]# cat/etc/exports
/var/nfs * (Rw,sync,no_root_squash)
# Exportfs-r
# service Rpcbind Start
#service NFS Start
[Email protected] Nfs_dir (keystone_admin)]# showmount-e 192.168.15.180
Export list for 192.168.15.180:
/root/nfs_dir 192.168.15.*
In the COMPUTE node test:
Turn off The firewall of the:
Shutdown command: service iptables Stop
Permanently shut down the firewall:chkconfig iptables off
[Email protected] nfs]# Exportfs-r
[Email protected] nfs]# service Rpcbind restart
Redirecting To/bin/systemctl restart Rpcbind.service
[[Email protected] nfs]# Service NFS Restart
Redirecting To/bin/systemctl restart Nfs.service
OK, Mount the NFS success on 182 :
[Email protected] ~]# mount-t NFS 192.168.15.180:/var/nfs./nfs
[Email protected] ~]#
# Mount |grep NFS
192.168.15.180:/var/nfs On/root/nfs type NFS4 (Rw,relatime,vers=4.0,rsize=524288,wsize=524288,namlen=255,hard, proto=tcp,port=0,timeo=600,retrans=2,sec=sys,clientaddr=192.168.15.182,local_lock=none,addr=192.168.15.180)
Two Compute node backend configured for NFS Storage-compute node CINDER.CONF configuration
configuration in cinder.conf:
[DEFAULT]
Enabled_backends=nfs
[NFS]
Volume_driver=cinder.volume.drivers.nfs.nfsdriver
Nfs_shares_config =/etc/cinder/nfs_shares
Nfs_mount_point_base =/var/nfs/
Volume_backend_name = NFS1
Then mount the configuration file:
[Email protected] cinder]# Cat/etc/cinder/nfs_shares
192.168.15.180:/var/nfs
Restart cinder-volume:
To create a volume:
Files Created:
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
OpenStack: Configuring the Cinder-volume backend for NFS storage