ceph

Ceph的osd节点问题

扶醉桌前 提交于 2019-11-26 03:58:59
背景ceph的整体读写性能下降 经查看 ceph osd perf 有一块osd延迟较大在200多ms以上 决定剔除后 整体性能恢复 说明osd的一个节点问题有时会影响整体ceph的性能 ceph --admin-daemon /var/run/ceph/ceph-osd.135.asok perf dump | more "WBThrottle": { "bytes_dirtied": 13333504, "bytes_wb": 0, "ios_dirtied": 86, "ios_wb": 0, "inodes_dirtied": 27, "inodes_wb": 0 }, 整体都应该是0 可以结合MegaCli查看是否有坏道导致的问题 不要急于恢复磁盘 长时间的数据积累对磁盘的性能和使用周期是有影响的 也可以定时清理磁盘碎片 查看磁盘碎片 xfs_db -c frag -r /dev/sdd1 整理碎片 xfs_fsr /dev/sdd1 来源: 51CTO 作者: 吴景峰 链接: https://blog.51cto.com/wujingfeng/2104930

ceph上weight和reweight的区别

大城市里の小女人 提交于 2019-11-26 03:58:55
今天简单研究了下weight和reweight对pg的影响 通过ceph osd tree 可以查看到 weight 和reweight的值 weight的权重和磁盘的容量有关系 一般定义1TB为1.0 500G为0.5 也不会因为容量的减少而变化 是个恒定的值 可以通过ceph osd crush reweight修改 在这种状态下 如果直接stop掉148节点 会影响到pg的数据重新分配 所以gp的分配取决于weigh值 reweight的值只有0或者1 可以通过ceph osd reweight修改 如果从集群中踢出一块osd节点 reweight会从1变为0 及时是up状态也不会变为1 说明reweight只代表crush中的数据分配是否均匀 来源: 51CTO 作者: 吴景峰 链接: https://blog.51cto.com/wujingfeng/2105670

CentOS7.6启用Ceph nautilus的dashboard失败处理

左心房为你撑大大i 提交于 2019-11-26 00:22:18
[TOC] 1. 环境说明 软件 版本 操作系统 CentOS7.6 ceph nautilus, v14.2.4 ceph-deploy的nautilus版本安装和luminous版本一样,可以参考我以前的文章: https://blog.51cto.com/ygqygq2/2161917 2. 启用ceph dashboard失败 mgr模块开启dashboard提示错误,虽然加上 --force 表面启用了,但实际并未启动dashboard服务,因为设置dashboard用户命令提示不支持。 3. 问题排查过程 mgr节点查看mgr启动日志 详细日志: 2019-11-08 12:44:23.673 7f7388cd9700 1 mgr respawn e: '/usr/bin/ceph-mgr' 2019-11-08 12:44:23.673 7f7388cd9700 1 mgr respawn 0: '/usr/bin/ceph-mgr' 2019-11-08 12:44:23.673 7f7388cd9700 1 mgr respawn 1: '-f' 2019-11-08 12:44:23.673 7f7388cd9700 1 mgr respawn 2: '--cluster' 2019-11-08 12:44:23.673 7f7388cd9700 1 mgr

ceph crush cluster map 基础操作

自古美人都是妖i 提交于 2019-11-25 23:08:19
个人博客首页(点击查看详情) -- https://blog.51cto.com/11495268 个人微信公众号(点击查看详情) -- https://blog.51cto.com/11495268/2401194 1、简介 了解 ceph crush cluster map 基本 概念后,本文 描述 cluster map的 基础操作 2、cluster map 创建 集群时 默认 default 节点 2.1 bucket 创建 # ceph osd crush add-bucket {bucket_name} {type} 2.2 bucket 添加/移除 2.2.1 bucket 添加 ## source_bucket_name:需要 移动的 bucket ## aim_bucket_name:目标 bucket,即将 移动的 bucket 移动到 此 bucket 下 # ceph osd crush move {source_bucket_name} {type}={aim_bucket_name} 2.2.2 bucket 移除 ## remove 所有 节点下 只要包含 bucket_name,该 bucket_name 均会被 移除 # ceph osd crush remove {bucket_name} 2.3 添加 osd # ceph osd crush

Ceph mgr devicehealth模块加载报错

删除回忆录丶 提交于 2019-11-25 22:34:05
[TOC] 1. 问题说明 软件 版本 操作系统 CentOS7.6 ceph nautilus, v14.2.4 因为是刚搭建完ceph不久, rgw之前暂时没用到就没有添加。 今天添加rgw后,通过重启dashboard,发现报Error了。 ceph mgr module disable dashboard ceph mgr module enable dashboard Module 'devicehealth' has failed: Failed to import _strptime because the import lockis held by another thread. 通过在dashboard中的日志查看,发现mgr节点启动报错。 2. 解决办法 通过谷歌搜索,发现有人提过这个bug,好在在stackoverflow中找到了解决办法。 mgr节点中,修改devicehealth模块文件, vim /usr/share/ceph/mgr/devicehealth/module.py 添加一行 import _strptime 重启mgr服务。报错消失,问题解决。 systemctl restart ceph-mgr@ceph-node2.service 参考资料: [1] https://tracker.ceph.com/issues/41879 [2]

K8S与Ceph RBD集成-多主与主从数据库示例

孤街浪徒 提交于 2019-11-25 20:21:09
参考文章: https://ieevee.com/tech/2018/05/16/k8s-rbd.html https://zhangchenchen.github.io/2017/11/17/kubernetes-integrate-with-ceph/ https://docs.openshift.com/container-platform/3.5/install_config/storage_examples/ceph_rbd_dynamic_example.html https://jimmysong.io/kubernetes-handbook/practice/using-ceph-for-persistent-storage.html 感谢以上作者提供的技术参考,这里我加以整理,分别实现了多主数据库集群和主从数据库结合Ceph RDB的实现方式。以下配置只为测试使用,不能做为生产配置。 K8S中存储的分类 在K8S的持久化存储中主要有以下几种分类: volume: 就是直接挂载在pod上的组件,k8s中所有的其他存储组件都是通过volume来跟pod直接联系的。volume有个type属性,type决定了挂载的存储是什么,常见的比如:emptyDir,hostPath,nfs,rbd,以及下文要说的persistentVolumeClaim等