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/03 Report--
Cinder is a component of openstack that provides block storage services, mainly providing virtual disks for virtual machine instances.
The way to attach a bare hard disk through a certain protocol (SAS,SCSI,SAN,iSCSI, etc.), then partition, format the created files, or directly use the bare hard disk to store data is called block storage, and each bare hard disk is often called Volume (volume).
Remote file systems that need to be mounted through protocols such as nfs,cifs are called file system storage.
First, understand block storage services
Openstack provides management of the entire lifecycle of volumes from creation to deletion, and from the perspective of virtual machine instances, each volume mounted is a hard disk. Openstack provides block storage service by cinder. The specific features are as follows:
Provide api to enable users to query and manage volumes, volume snapshots, and volume types
Provide scheuler scheduling volume creation request to optimize the allocation of storage resources reasonably
Support multiple back-end storage methods through driver architecture
1) cinder-api
Receive api request and call cinder-volume
2) cindere-volume
Services that manage volumes, coordinate with volume provider, manage the lifecycle of volume, and nodes that run cinder-volum services are called storage nodes
3) cinder-scheduler
Scheduler uses the scheduling algorithm to select the most appropriate storage node to create volumes.
4) volume provider
Data storage device that provides physical storage space for volume
5) Message Queue
Cinder sub-services communicate and cooperate with each other through message queuing.
6) database
Store some databases in cinder, generally using mysql
II. Cinder process
1) the user sends a request to API
2) after api has done some necessary processing to the request, send a message to messaging (rabbitmq) and ask scheduler to create a volume
3) scheduler obtains the message sent by api from messaging, and then executes the scheduling algorithm to select node A from several storage nodes.
4) scheduler sends a message to messaging, asking the storage node to create a volume
5) the volume of the storage node gets the message sent to it by scheduler from messaging, and then creates a volume on volume provider through driver
III. Detailed explanation of cinder components
1 、 cinder-api
Cinder-api is the portal of the whole cinder component. All cinder requests are first handled by nova-api. It exposes several HTTP REST API interfaces to the outside world. The endpoints of cinder-api can be queried in kesystone.
Openstack endpoint list-service cinder
The client can send the request to the address specified by endponits and request the operation from cinder-api. Most api requests can be made on dashboard.
The http api request received by cinder-api will be handled as follows:
Check whether the parameters passed by the client are valid
Call other cinder sub-services to process client requests
Return the result serial number returned by other cinder sub-services to the client
2 、 cinder-scheduler
When creating a volume, cinder-scheduler selects the most appropriate storage node based on capacity, volume type, and other conditions, and then asks it to create a volume
(1) filter scheduler
Filter scheduler is the default scheduler for cinder-schedule
In / etc/cinder/cinder.conf, cinder configures cinder-scheuler with three parameters schedulerdriver,schedulerdefault_filters and scheduler defaultweighers
The scheduler scheduling process is as follows:
Select storage nodes that meet the criteria through a filter (filter)
Select the best (largest weight) storage node through weight calculation (weighting)
(2) filter
When filter scheduler needs to perform scheduling operation, it will let filter judge the compute node, and filter will return true or false
The schedulerdefaultfilters option in the configuration file specifies the filter used by filter scheduler. The default is as follows
Filter scheduler will filter in the order in the list
AvailabilityZoneFilter
To improve disaster tolerance and provide isolation services, storage nodes and compute nodes can be divided into different Availability zone. When creating a volume, you need to specify the availability zone to which the volume belongs.
When filtering, the storage nodes that do not belong to the specified AvailabilityZone will be filtered out using AvailabilityZoneFilter
CapacityFilter
When you create a volume, the user specifies the size of the volume. The function of CapactiyFilter is to filter out the storage nodes whose storage space can not meet the requirements of volume creation.
CapabilitiesFilter
Different Volume Provider has its own characteristics, and the user specifies the type required by the type when creating the volume.
The volume type can be specified in the administrator-system-volume menu.
(3) weighter
Filter Scheduler specifies the weigher to calculate the weight through scheduler_default_weighers. The default is CapacityWeigher.
3 、 cinder-volume
In the end, the operation of volume on openstack is handed over to cinder-volume.
Cinder-volume itself does not manage the entire storage device. The storage device is managed by volume provider. Cinder-volume implements volume life cycle management together with volume provider. It supports a variety of volume provider through the dirver architecture.
Cinder-volume defines a unified interface for these volume provider, and volume provider only needs to implement these interfaces to plug and play in the form of Driver into the openstack system.
Use the volume_driver option to configure the driver used in the configuration file / etc/cinder/cinder.conf of the storage node
The default is to use LVM logical volumes
Cinder-volume reports periodically to cinder so that cinder can confirm that it knows the free capacity information of each storage node.
Cinder's lifecycle management of volume is ultimately done through cinder-volume, including volume's create,extend,attach,snapshot,delete, etc.
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
© 2024 shulou.com SLNews company. All rights reserved.