Install and configure a storage node
prepare the storage device.
# apt install lvm2
Create the LVM physical volume /dev/sdb :
# pvcreate /dev/sdb
Create the LVM volume group cinder-volumes :
# vgcreate cinder-volumes /dev/sdb
You must reconfigure LVM to scan only the devices that contain the cinder-volumes volume group.
/etc/lvm/lvm.conf
devices {
...
filter = [ "a/sdb/", "r/.*/"]
Warning: If your storage nodes use LVM on the operating system disk, you must also add
the associated device to the filter. For example, if the /dev/sda device contains the operating
system:
filter = [ "a/sda/", "a/sdb/", "r/.*/"]
Similarly, if your compute nodes use LVM on the operating system disk, you must also modify
the filter in the /etc/lvm/lvm.conf file on those nodes to include only the operating system
disk. For example, if the /dev/sda device contains the operating system:
filter = [ "a/sda/", "r/.*/"]
# apt install cinder-volume
/etc/cinder/cinder.conf
[database]
# ...
connection = mysql+pymysql://cinder:cinder@10.0.3.16/cinder
DEFAULT]
# ...
transport_url = rabbit://openstack:RABBIT_PASS@controller
auth_strategy = keystone
my_ip = MANAGEMENT_INTERFACE_IP_ADDRESS
enabled_backends = lvm
glance_api_servers = http://controller:9292
[keystone_authtoken]
# ...
auth_uri = http://controller:5000
auth_url = http://controller:35357
memcached_servers = controller:11211
auth_type = password
project_domain_name = default
user_domain_name = default
project_name = service
username = cinder
password = CINDER_PASS
[lvm]
# ...
volume_driver = cinder.volume.drivers.lvm.LVMVolumeDriver
volume_group = cinder-volumes
iscsi_protocol = iscsi
iscsi_helper = tgtadm
[oslo_concurrency]
# ...
lock_path = /var/lib/cinder/tmp
# service tgt restart
# service cinder-volume restart
Verify operation
$ . admin-openrc
$ openstack volume service list
cinder-manage service list
vgdisplay
No comments:
Post a Comment