ceph如何实现指定OSD创建pool之class
发表于:2026-11-03 作者:千家信息网编辑
千家信息网最后更新 2026年11月03日,这篇文章给大家分享的是有关ceph如何实现指定OSD创建pool之class的内容。小编觉得挺实用的,因此分享给大家做个参考,一起跟随小编过来看看吧。前面我们做指定osd创建pool本质是选择部分os
千家信息网最后更新 2026年11月03日ceph如何实现指定OSD创建pool之class
这篇文章给大家分享的是有关ceph如何实现指定OSD创建pool之class的内容。小编觉得挺实用的,因此分享给大家做个参考,一起跟随小编过来看看吧。
前面我们做指定osd创建pool本质是选择部分osd(假设为不同属性的osd)重新构建一个osd逻辑树,再针对新的逻辑树创建一个crush_rule,设置pool的crush_rule 就可以到达目的。但是后面发现还有一种更为方便的办法不需要单独创建逻辑树,只需要添加一个新的crush_rule 并对于到新的磁盘class(磁盘有多个class属性,子节点host就有多个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}后面在创建pool的时候选择新的crush_rule replicated_ssd
问题就解决了
感谢各位的阅读!关于"ceph如何实现指定OSD创建pool之class"这篇文章就分享到这里了,希望以上内容可以对大家有一定的帮助,让大家可以学到更多知识,如果觉得文章不错,可以把它分享出去让更多的人看到吧!
逻辑
内容
多个
属性
更多
磁盘
篇文章
选择
不同
不错
实用
办法
文章
时候
本质
目的
看吧
知识
节点
部分
数据库的安全要保护哪些东西
数据库安全各自的含义是什么
生产安全数据库录入
数据库的安全性及管理
数据库安全策略包含哪些
海淀数据库安全审计系统
建立农村房屋安全信息数据库
易用的数据库客户端支持安全管理
连接数据库失败ssl安全错误
数据库的锁怎样保障安全
华服互联网科技靠谱吗
互联网与科技发展
互联网科技缩写
互联网科技美容
富国互联网科技创新基金
互联网汽车科技小镇
温州喔噻互联网科技有限公司
剑昆互联网络科技有限公司临桂
华服互联网科技官网
彤创互联网科技有限公司
天津腾达互联网科技有限公司
卓翼科技产业互联网合作
烟台灵鸽互联网科技有限公司
山东子淼互联网科技有限公司
互联网科技年终奖
北京军民互联网科技公司
玉溪新华互联网科技怎么选
优雇互联网科技有限公司
互联网高科技绘画
科技互联网企业在行动
华中科技大学互联网
赫美联合互联网科技
互联网 科技馆
深圳市运趣互联网科技有限公司
移动互联网科技公司
亳州好赞互联网科技有限公司
互联网科技人工智能实验室
风投北京互联网科技
张家口科技产业互联网平台
伍佰万互联网科技是干嘛的