在已有OpenStack集羣中部署Manila(二):部署Manila Share節點之模式一(driver_handles_share_servers=False)

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
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章