Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Sample Analysis of Block Devices and OpenStack

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)05/31 Report--

Editor to share with you a piece of equipment and OpenStack example analysis, I believe that most people do not know much about it, so share this article for your reference, I hope you will learn a lot after reading this article, let's go to know it!

Libvirt is configured with librbd's QEMU interface, which allows you to use Ceph block device mirroring in OpenStack. The Ceph block device image is treated as a cluster object, which means that it has better performance than stand-alone servers.

To use Ceph block devices in OpenStack, you must first install QEMU,libvirt and OpenStack. It is recommended that OpenStack be installed with separate physical nodes. The OpenStack node recommends a minimum of 8G RAM and quad-core processors. The following figure depicts the OpenStack and Ceph technology levels.

Important: to use Ceph in OpenStack, you must first run the Ceph storage cluster

There are three combination points of OpenStack and Ceph:

Mirroring: OpenStack Glance manages virtual machine images. The mirror image is constant. OpenStack treats images as binary objects and downloads them in this format.

Volume: a volume is a block device. OpenStack uses volumes to start virtual machines or to bind volumes to running virtual machines. OpenStack uses Cinder services to manage volumes.

Customer disk: the customer disk is the guest operating system disk. By default, when you start a virtual machine, its system disk appears as a file on the hypervisor system (usually / var/lib/nova/instances/). In previous versions of OpenStack Havana, the only way to start a virtual machine in Ceph was to use the boot-from-volume feature of Cinder. Now you can start a virtual machine directly in Ceph without relying on Cinder, which is very advantageous because it allows you to easily conduct hot migration of virtual machines. In addition, if the hypervisor hangs up, you can easily trigger the nova evacute and seamlessly continue to run the virtual machine elsewhere.

You can use OpenStack Glance to store the image in the Ceph block device, or you can use Cinder to start the virtual machine through write-time replication of the image.

The configuration process of Glance,Cinder and Nova is described in detail below, although they do not need to be used together. When the virtual machine is running using the local disk, the image can be stored in the Ceph block device, or vice versa.

Important:Ceph does not support virtual machine disks in QCOW2 format. So, if you want to start a virtual machine in Ceph (back-end file or boot from a volume), the Glance image must be in RAW format

Tip: the Ceph block devices described in this document are based on OpenStack Havana. For earlier versions, see Block Devices and OpenStack (Dumpling).

Create a pool

By default, Ceph block devices use rbd pools. You can use any pool that can be used. It is recommended that you create separate pools for Cinder and Glance. Make sure the Ceph cluster is running properly, and then create the pool.

Ceph osd pool create volumes 128ceph osd pool create images 128ceph osd pool create backups 128ceph osd pool create vms 128

See Create a Pool and Placement Groups for details on the number of pg for a given pool and how much pg should be specified for your pool.

Configure the OpenStack Ceph client

The nodes running glance-api,cinder-volume,nova-compute and cinder-backup are Ceph clients. Each node needs an ceph.conf file:

Ssh {your-openstack-server} sudo tee / etc/ceph/ceph.conf secret.xml

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.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report