zziyuann 2020-01-29
在nfs 服务器共享数据卷
[ ~]# showmount -e
Export list for controller:
/cinder 192.168.15.201/24
/data 192.168.15.201/24
在cinder节点挂载共享卷
[ ~]# df -h
文件系统 容量 已用 可用 已用% 挂载点
/dev/mapper/centos-root 300G 1.7G 299G 1% /
devtmpfs 479M 0 479M 0% /dev
tmpfs 489M 4.0K 489M 1% /dev/shm
tmpfs 489M 19M 470M 4% /run
tmpfs 489M 0 489M 0% /sys/fs/cgroup
/dev/sda1 497M 109M 389M 22% /boot
tmpfs 98M 0 98M 0% /run/user/0
/dev/sda4 48G 33M 48G 1% /swift/node
192.168.15.200:/data 498G 2.6G 495G 1% /data/nova/instances
192.168.15.200:/cinder 498G 2.6G 495G 1% /home/nfsshare
修改cinder节点的配置文件
[ ~]# vim /etc/cinder/cinder.conf
[DEFAULT]
enabled_backends = lvm,nfs
[nfs]
volume_driver=cinder.volume.drivers.nfs.NfsDriver
nfs_shares_config = /etc/cinder/nfsshare.conf
nfs_mount_point_base = /home/nfsshare
volume_backend_name = nfs
最后重新启动openstack-cinder-volume.service
systemctl restart openstack-cinder-volume.service