1、部署说明
本部署实践中,share节点和Manila控制节点共节点
share节点为Manila提供存储后端服务
2、部署share节点
2.1、安装升级rpm包
# yum install openstack-manila-share python2-PyMySQL -y
# yum install lvm2 nfs-utils nfs4-acl-tools portmap targetcli -y
2.2、创建vg
1、环境中有个可用分区/dev/sdb2
# fdisk -l /dev/sdb
Disk /dev/sdb: 1200.2 GB, 1200243695616 bytes, 2344225968 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk label type: dos
Disk identifier: 0xf8f5420f
Device Boot Start End Blocks Id System
/dev/sdb1 2048 1048578047 524288000 8e Linux LVM
/dev/sdb2 1048578048 2344225967 647823960 83 Linux
2、将/dev/sdb2改为 Linux LVM
# fdisk /dev/sdb
t
2
8e
# partprobe
3、创建pv和vg
# pvcreate /dev/sdb2
# vgcreate manila-volumes /dev/sdb2
#vgs
VG #PV #LV #SN Attr VSize VFree
centos 1 2 0 wz--n- <49.00g 0
centos 4 5 0 wz--n- <1.09t 293.10g
cinder-volumes 1 6 0 wz--n- <500.00g 24.76g
manila-volumes 1 0 0 wz--n- <617.81g <617.81g
2.3、修改配置
配置文件需要新增[lvm]段
# vi /etc/manila/manila.conf
[DEFAULT]
enabled_share_backends = lvm
enabled_share_protocols = NFS
[lvm]
share_backend_name = LVM
share_driver = manila.share.drivers.lvm.LVMShareDriver
driver_handles_share_servers = False
lvm_share_volume_group = manila-volumes
lvm_share_export_ips = 192.168.166.180
2.4、启动服务
# systemctl enable openstack-manila-share.service
# systemctl start openstack-manila-share.service