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

What is the use of ceph block storage rbd

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

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

This article mainly introduces the use of ceph block storage rbd, the article is very detailed, has a certain reference value, interested friends must read it!

After the ceph cluster is set up, block storage, object storage and file system storage can be carried out on the ceph cluster. Architecturally, on top of the ceph cluster is the rados protocol, which provides necessary support for users using the ceph cluster (ceph users use the ceph cluster by calling the rados protocol). For block storage, you can use ceph clusters in the form of kernel modules or ceph clusters by calling librbd libraries in user mode. The kernel page cache mechanism can be fully utilized through the kernel module mode, and the performance can also be improved by calling librbd in user mode using the cache mode provided by librbd in user mode.

1. Snapshot related.

1) create a snapshot.

# rbd snap create {pool-name} / {image-name} @ {snap-name}

Generally speaking, snapshots are created based on an existing image. Snapshots created are read-only.

2) View existing snapshots.

# rbd snap ls {pool-name} / {image-name}

View snapshots that exist on existing image

3) snapshot roolback.

# rbd snap roolback {pool-name} / {image-name} @ {snap-name}

Write back the contents of the snapshot to image

4) Delete the snapshot.

# rbd snap rm {pool-name} / {image-name} @ {snap-name}

Deletes a snapshot with the specified name on the specified image

5) Delete all snapshots on image.

# rbd snap purge {pool-name} / {image-name}

2. Hierarchical correlation.

Tiering in ceph refers to clone a new image on a read-only and protected snapshot and the image is replicated on write. After clone produces a new image, there is a child-parent relationship between the image and that read-only snap.

1) protect a snapshot.

# rbd snap protect {pool-name} / {image-name} @ {snap-name}

2) clone a protected snapshot.

# rbd clone {pool-name} / {image-name} @ {snap-name} {newpool-name} / {newimage-name}

After clone produces a protected image, you can use the image after the clone according to the normal image.

3) release a protected snapshot.

# rbd snap unprotect {pool-name} / {image-name} @ {snap-name}

Only when the snapshot is unprotected can the snapshot be deleted, otherwise the snapshot cannot be deleted.

4) check if the snapshot is clone.

# rbd children {pool-name} / {image-name} @ {snap-name}

This command can see the image information based on the snap-name clone

5) de-stratification technology.

The relationship between the image based on a snapshot clone and that snapshot is a child-parent relationship (which can be thought of as a hierarchical relationship). De-layering technology refers to completely copying the contents of parent to child, so that child and parent have no relationship after de-layering.

# rbd flatten {pool-name} / {image-name}

3. Related to rbd cache.

Rbd cache refers to the use of cache technology on the client side to improve the performance of accessing the ceph cluster on the client side when using the librbd library to access the ceph cluster in the user mode environment. For kernel module access to the ceph cluster, page cache technology in the linux kernel is used for caching instead of rbd cache technology.

Rbd cache needs to configure the corresponding properties in the ceph configuration file on the ceph client side to enable rbd cache. The ceph configuration file on the ceph client side is located in / etc/ceph/ceph.conf, in which you need to add a client node and a specific configuration item outside the client node. The details of the rbd cache configuration items are as follows:

Rbd cache = true | whether rbd cache is enabled for false

Rbd cache size = rbd cache size

Rbd cache max dirty = the maximum number of bytes of cache in writeback mode. Default is 24MB. When the value is 0, the writethrough mode is used

Rbd cache target dirty = the bytes threshold written by cache to the ceph cluster in writeback mode. Default is 16MB. Note that the value must be less than the rbd cache max dirty value

Rbd cache max dirty age = the maximum number of seconds that dirty data exists in cache

Rbd cache writethrough until flush = true | false is in writethrough mode until the kernel triggers flush cache to ceph cluster, until rbd cache changes to writeback mode after flush

The above is all the content of the article "what is the use of ceph Block Storage rbd". Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!

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