openstack中nfs最为nova的后端存储
运行一个可用的nfs服务:
[ ~]# showmount -e 192.168.100.10
Export list for controller:
/nfs *
查看openstack当前nova的后端存储位置:
我修改了默认云主机存储路径
[ ~]# cat /etc/nova/nova.conf | grep instances_path | grep -v "#"
instances_path=/data/nova/instances
如果是下面这样:
[ ~]# cat /etc/nova/nova.conf | grep "instances_path"
#instances_path=$state_path/instances
那么就是默认路径:/var/lib/nova/instances
找到了路径就简单了,挂载nfs到后端路径:
[ ~]# mount -t nfs 192.168.100.10:/nfs /data/nova/instances/
设置目录属性:
[ ~]# chown -R nova:nova /data/nova/instances/
验证:
重启openstack-nova-compute服务