准备
1 、确定故障硬盘所在节点的信息,避免操作错误
2 确定故障osd的lvm信息
ceph-c8fd9380-1a1a-45e4-a43a-b36da6fdc560
ceph-22b06ce3-0186-40cf-9095-e777bc458bf6
3 确认数据盘对应的缓存盘(查看ceph部署时的日志)
osd.9->sdb2
osd.81->sdc6
更换步骤
1 禁止平台数据同步与回填
#ceph osd set norecover
#ceph osd set nobackfill
2 从存储集群中删除故障硬盘
#ceph osd rm osd.9
#ceph osd rm osd.81
#ceph auth del osd.9
#ceph auth del osd.81
3 删除lvm osd对应的uuid
#vgremove ceph-c8fd9380-1a1a-45e4-a43a-b36da6fdc560
#vgremove ceph-22b06ce3-0186-40cf-9095-e777bc458bf6
4 机房更换故障硬盘
5 创建云硬盘
格式化新加入的云硬盘
# parted -s /dev/sde mklabel gpt mkpart primary xfs 0% 100%
# parted -s /dev/sdo mklabel gpt mkpart primary xfs 0% 100%
6 添加osd filestore
#cd /root/ceph_deploy
#/usr/bin/ceph-deploy osd create --filestore --fs-type xfs --data /dev/sde1 --journal /dev/sdb2 compute05
#/usr/bin/ceph-deploy osd create --filestore --fs-type xfs --data /dev/sdo1 --journal /dev/sdc6 compute05
验证
查看存储集群compute05中故障硬盘状态是否恢复正常
#ceph osd tree
正常之后
开启集群数据同步与回填
#ceph osd unset norecover
#ceph osd unset nobackfill
标签:原生,--,dev,ceph,故障,osd,硬盘 From: https://www.cnblogs.com/zhangshch-learning/p/18219805