In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-29 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
This article is about how ceph implements a class that specifies OSD to create a pool. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.
Before we specified osd to create pool, the essence is to select part of the osd (suppose it is an osd with different attributes) to rebuild an osd logical tree, and then create a crush_rule for the new logical tree, and set the crush_rule of the pool to achieve the goal. But later it turns out that there is a more convenient way not to create a logical tree separately, but to add a new crush_rule and for a new disk class (if the disk has multiple class attributes, the child node host has multiple class).
[root@ceph-node1 opt] # cat decrushmap # begin crush maptunable choose_local_tries 0tunable choose_local_fallback_tries 0tunable choose_total_tries 50tunable chooseleaf_descend_once 1tunable chooseleaf_vary_r 1tunable chooseleaf_stable 1tunable straw_calc_version 1tunable allowed_bucket_algs 54# devicesdevice 0 osd.0 class hdddevice 1 osd.1 class ssddevice 2 osd.2 class hdddevice 3 osd.3 class ssddevice 4 osd.4 class hdddevice 5 osd.5 class ssddevice 6 osd.6 class hdddevice 7 osd.7 class hdddevice 8 osd.8 class hdddevice 9 Osd.9 class hdddevice 10 osd.10 class hdddevice 11 osd.11 class hdd# typestype 0 osdtype 1 hosttype 2 chassistype 3 racktype 4 rowtype 5 pdutype 6 podtype 7 roomtype 8 datacentertype 9 regiontype 10 root# bucketshost ceph-node1 {id-3 # do not change unnecessarily id-4 class hdd# do not change unnecessarily id-15 class ssd # do not change unnecessarily # weight 0.058 alg straw2 hash 0 # rjenkins1 item osd.0 weight 0.029 item osd.1 weight 0.029} host ceph-node2 {id-5 # do not change unnecessarily id-6 class hdd # do not change unnecessarily id-16 class ssd # do not change unnecessarily # weight 0.058 alg straw2 hash 0 # rjenkins1 item osd.2 weight 0.029 Item osd.3 weight 0.029} host ceph-node3 {id-7 # do not change unnecessarily id-8 class hdd # do not change unnecessarily id-17 class ssd # do not change unnecessarily # weight 0.058 alg straw2 hash 0 # rjenkins1 item osd.4 weight 0.029 item osd.5 weight 0.029} host ceph- Node4 {id-9 # do not change unnecessarily id-10 class hdd # do not change unnecessarily id-18 class ssd # do not change unnecessarily # weight 0.058 alg straw2 hash 0 # rjenkins1 item osd.6 weight 0.029 item osd.7 weight 0.029} host ceph-node5 {id-11 # Do not change unnecessarily id-12 class hdd # do not change unnecessarily id-19 class ssd # do not change unnecessarily # weight 0.058 alg straw2 hash 0 # rjenkins1 item osd.8 weight 0.029 item osd.9 weight 0.029} host ceph-node6 {id-13 # do not change unnecessarily id-14 class hdd # Do not change unnecessarily id-20 class ssd # do not change unnecessarily # weight 0.058 alg straw2 hash 0 # rjenkins1 item osd.10 weight 0.029 item osd.11 weight 0.029} root default {id-1 # do not change unnecessarily id-2 class hdd # do not change unnecessarily id-21 class ssd # Do not change unnecessarily # weight 0.354 alg straw2 hash 0 # rjenkins1 item ceph-node1 weight 0.059 item ceph-node2 weight 0.059 item ceph-node3 weight 0.059 item ceph-node4 weight 0.059 item ceph-node5 weight 0.059 item ceph-node6 weight 0.059} # rulesrule replicated_rule {id 0 type replicated min_size 1 Max_size 10 step take default class hdd step chooseleaf firstn 0 type host step emit} rule replicated_ssd {id 1 type replicated min_size 1 max_size 10 step take default class ssd step chooseleaf firstn 0 type host step emit}
Later, select the new crush_rule replicated_ssd when you create the pool
The problem will be solved.
Thank you for reading! This is the end of this article on "how to specify OSD to create pool class for ceph". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it out for more people to see!
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.