In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
Editor to share with you how to install block storage service in openstack-mitaka. I hope you will get something after reading this article. Let's discuss it together.
Overview of Block Storage Services
OpenStack Block Storage Service (cinder) adds persistent storage to virtual machines. Block storage provides an infrastructure for managing volumes and interacts with OpenStac computing services to provide volumes to cloud host instances. The service also enables the management of volume snapshots and volume types.
The block storage service consists of the following components:
Cinder-api
Accept API requests and route them to cinder-volume 's ation.
Cinder-volume
Interact directly with storage services and handle things such as cinder-scheduler. It also interacts with these processes through message queues. The Cinder-volume service feeds back read and write requests to the block storage service to maintain state. Through the driver structure, it can interact with various storage providers.
Cinder-scheduler daemon
Select the best storage provisioning node and create a volume on it. Similar to nova-scheduler.
Cinder-backup daemon
The cinder-backup service provides any type of volume backup for the backup storage provider. Such as cinder-volume services, which can interact with various storage providers through the driver architecture.
Messaging queue
Information is forwarded between various storage processes.
Install and configure the control node
This section describes how to install block storage services on the control node. This service requires at least one additional storage node to provide volumes to the CVM instance.
precondition
1. Complete the database creation in the following steps:
Log in to the database with root account
Mysql-u root-p
L create a cinder database
CREATE DATABASE cinder
L authorize the cinder database
GRANT ALL PRIVILEGES ON cinder.* TO 'cinder'@'localhost' IDENTIFIED BY' cinder';GRANT ALL PRIVILEGES ON cinder.* TO 'cinder'@'%' IDENTIFIED BY' cinder'
L exit the database
two。 Load admin credential
. Admin-openrc
3. Create service credential
L create cinder user
Openstack user create-domain default-password-prompt cinder
L add admin roles to cinder users
Openstack role add-project service-user cinder admin
L create cinder and cinderv2 service entities
Openstack service create-name cinder-description "OpenStack Block Storage" volume
Openstack service create-name cinderv2-description "OpenStack Block Storage" volumev2
Note: block storage service requires two services
4. Create Block Storage Service API endpoints
Openstack endpoint create-- region RegionOne volume public http://controller:8776/v1/%\(tenant_id\)s
Openstack endpoint create-region RegionOne volume internal http://controller:8776/v1/%\(tenant_id\)sopenstack endpoint create-region RegionOne volume admin http://controller:8776/v1/%\(tenant_id\)s
Openstack endpoint create-- region RegionOne volumev2 public http://controller:8776/v2/%\(tenant_id\)s
Openstack endpoint create-- region RegionOne volumev2 internal http://controller:8776/v2/%\(tenant_id\)s
Openstack endpoint create-- region RegionOne volumev2 admin http://controller:8776/v2/%\(tenant_id\)s
Note: block storage requires that a corresponding endpoint be created for each of the two service entities.
Install and configure components
1. Install the package
Yum install openstack-cinder
two。 Edit the / etc/cinder/cinder.conf file and modify the operation:
L in the [database] section, configure database access
[database]... connection = mysql+pymysql://cinder:CINDER_DBPASS@controller/cinder
Replace CINDER_DBPASS with the correct password
Configure RabbitMQ message queuing access in the [DEFAULT] and [oslo_messaging_rabbit] sections
[DEFAULT]... rpc_backend = rabbit
[oslo_messaging_rabbit]... rabbit_host = controllerrabbit_userid = openstackrabbit_password = RABBIT_PASS
Replace RABBIT_PASS with the correct password
In the [DEFAULT] and [keystone_authtoken] section, configure Identity service access
[DEFAULT]... auth_strategy = keystone
[keystone_authtoken]... auth_uri = http://controller:5000auth_url = http://controller:35357memcached_servers = controller:11211auth_type = passwordproject_domain_name = defaultuser_domain_name = defaultproject_name = serviceusername = cinderpassword = CINDER_PASS
Replace CINDER_PASS with the correct password
In the [default] section, my_ip is the IP address of the management network of the control node
[DEFAULT]... my_ip = 192.168.213.81
L in the [oslo_concurrency] section, configure lock path
[oslo_concurrency]... lock_path = / var/lib/cinder/tmp
3. Synchronize database
Su-s / bin/sh-c "cinder-manage db sync" cinder configure the computing service to use block storage
1. Edit the / etc/nova/nova.conf file and add the following
[cinder] os_region_name = RegionOne complete installation
1. Restart the computing API service
Systemctl restart openstack-nova-api.service
two。 Start block storage service and configure boot
Systemctl enable openstack-cinder-api.service openstack-cinder-scheduler.servicesystemctl start openstack-cinder-api.service openstack-cinder-scheduler.service installs and configures storage nodes
This section describes how to install block storage services on a storage node. For simplicity, this configuration will reference a storage node with an empty local storage device. This guide uses / dev/sdb, but you can replace it with different values for your specific node.
The service provides logical volumes on this device using the LVM driver and provides them to the cloud host instance through the iSCSI port. You can follow these guidelines to make minor changes to scale your environment and additional storage nodes horizontally.
precondition
You must prepare the storage device before the storage node begins to install and configure the block storage service.
1. Install the support kit
L install LVM package
Yum install lvm2
Start the LVM metadata service and configure boot self-startup
Systemctl enable lvm2-lvmetad.servicesystemctl start lvm2-lvmetad.service
two。 Create LVM physical volume / dev/sdb
Pvcreate / dev/sdb
3. Create LVM volume group cinder-volumes
Vgcreate cinder-volumes / dev/sdb
The block storage service creates logical volumes in this volume group.
4. Only CVM instances can access block storage volumes. However, the underlying operating system manages the devices associated with the volume. By default, the LVM Volume scan tool scans the / dev directory for block storage devices that contain volumes. If a project uses LVM on their volumes, the scanner detects the volumes and attempts to cache them, which can lead to a series of problems related to the underlying operating system and engineering volume. You must reconfigure LVM to scan only devices that contain cinder-volume volume groups. Edit the / etc/lvm/lvm.conf file and complete the following steps.
In the devices section, add a filter to accept / dev/sdb devices and reject all other devices
Devices {... filter = ["a/sdb/", "rrhythmo.charts /"]
Each item in the filter array starts with a for acceptance, r for rejection, and contains a regular expression device name. The array must end with rUnip. Reject / to reject any remaining devices. You can test filters with the vgs-vvvv command.
Warning: if your storage node uses LVM on the operating system disk, you must also add related devices to filter. For example, if the / dev/sda device contains the operating system: filter = ["a/sda/", "a/sdb/", "rUnip. Desktop /"].
Similarly, if your computing nodes use LVM on the operating system disk, you must also modify the filter in the / etc/lvm/lvm.conf file of those nodes to include the operating system disk. For example, if the / dev/sda device contains the operating system: filter = ["a/sda/", "rUnip .steps /"]
Install and configure components
1. Install the package
Yum install openstack-cinder targetcli
two。 Edit / etc/cinder/cinder.conf file
L in the [database] section, configure database access
[database]... connection = mysql+pymysql://cinder:CINDER_DBPASS@controller/cinder
Change the correct password of CINDER_DBPASS
L in [DEFAULT] and [oslo_messaging_rabbit] sections, RabbitMQ message queuing
[DEFAULT]... rpc_backend = rabbit
[oslo_messaging_rabbit]... rabbit_host = controllerrabbit_userid = openstackrabbit_password = RABBIT_PASS
Change the correct password of RABBIT_PASS
In the [DEFAULT] and [keystone_authtoken] sections, configure Identity service access
[DEFAULT]... auth_strategy = keystone
[keystone_authtoken]... auth_uri = http://controller:5000auth_url = http://controller:35357memcached_servers = controller:11211auth_type = passwordproject_domain_name = defaultuser_domain_name = defaultproject_name = serviceusername = cinderpassword = CINDER_PASS
Change the correct password of CINDER_PASS
L in the [default] section, configure my_ip
[DEFAULT]... my_ip = MANAGEMENT_INTERFACE_IP_ADDRESS
Replace MANAGEMENT_INTERFACE_IP_ADDRESS with the storage node management network interface IP address.
L in the [lvm] section, configure
[lvm]... volume_driver = cinder.volume.drivers.lvm.LVMVolumeDrivervolume_group = cinder-volumesiscsi_protocol = iscsiiscsi_helper = lioadm
L in the [default] section, configure
[DEFAULT]... enabled_backends = lvm
L in the [default] section, configure
[DEFAULT]... glance_api_servers = http://controller:9292
L in the [oslo_concurrency] section, configure
[oslo_concurrency]... lock_path = / var/lib/cinder/tmp complete installation
The startup block storage volume service includes its dependencies and configures boot
Systemctl enable openstack-cinder-volume.service target.servicesystemctl start openstack-cinder-volume.service target.service authentication operation
The following operations are performed at the control node
1. Load admin credential
. Admin-openrc
two。 List service components to verify that each process started successfully
Cinder service-list has read this article, I believe you have a certain understanding of "how to install block storage service in openstack-mitaka". If you want to know more about it, welcome to follow the industry information channel. Thank you for reading!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
Mysql instance shell: docker run-- name mysql-server-t\-e MYSQL_DATABASE= "zabbix"\-e MYSQL_US
© 2024 shulou.com SLNews company. All rights reserved.