In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly shows you "sample analysis of ceph-rbd environment configuration in linux kernel", which is easy to understand and clear. I hope it can help you solve your doubts. Let me lead you to study and learn "sample analysis of ceph-rbd environment configuration in linux kernel".
Ceph provides unified, high-performance, high-availability distributed storage services. The so-called unified storage supports object storage (OBS), block storage (EBS) and file storage. This chapter mainly introduces the environment construction of block storage. Block storage is called ceph-rbd. As shown in the figure above, rbd provides block device interface based on librados. There are two specific implementations: one is that Linux kernel calls librados directly to access the block device, and the other is to use kvm/qemu to call librbd to access the block device. Both methods require communication with the rados cluster, so you need to install ceph on client.
Client installs ceph
Without details here, you need to configure ceph.conf (mainly configure cluster id and mon address) and create keyring after installation. You can directly copy the configuration under the mon host to / etc/ceph/
Upgrade the client kernel
As Linux kernel supports a higher version of rbd, it is generally necessary to upgrade to a higher version (it is recommended to upgrade to 3.12.*) (see Appendix A for details). It takes a long time to compile. Restart the host after the upgrade is complete, and execute the following command: check if the kernel has rbd modules.
# lsmod | grep ceph libceph 221759 1 rbd libcrc32c 1220 1 libcephceph Block device Quick experience creating Block device Image
The block device image is placed in pool:rbd by default, or you can create a separate pool.
Command: rbd create pool-name/image-name-- size xxM/G [- m {mon-ip}] [- k / keyring-path] for example: # rbd create rbd01-size 1024m View Mirror in pool: # rbd ls Mapping Mirror to Block device Command: rbd map pool-name/image-name [--id admin-- keyfile secretfile] for example: # rbd map rbd01 View Mapping result: # rbd showmapped format Block device # mkfs.ext4-M0 / dev / rbd/rbd/rbd01 mount the device # mkdir / mnt/ceph-block# mount-t ext4 / dev/rbd/rbd/rbd01 / mnt/ceph-block# df-h Appendix A linux kernel source code compilation # tar-jxvf linux3.12.17.tar.bz / / decompress the linux kernel source code package # mv linux3.12.17 / usr/src/kernel (optional) / / move the source code to / usr/src/kernel# cd / usr/src/kernel/linux3 .12.Select make menuconfig / / Select the rbd kernel module # make# make modules# make modules_install# make install that needs to be compiled in menu mode
If there are no errors in the above steps, follow the following command
# vim / etc/grub.conf / / change default=1 to default=0# reboot / / restart the system, and check the kernel # uname-r / / to see all the contents of the article "sample Analysis of ceph-rbd Environment configuration in linux kernel" above the kernel version. Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more 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.
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.