Ceph分布式存储更换磁盘操作步骤

Ceph分布式存储更换磁盘操作步骤

1、确认需要更换的磁盘对应的盘符、OSD ID ;

root@Ceph-B**A**-04-S2-60:~# df -h |grep 17

/dev/sdp3       1.1T  566G  551G  51% /var/lib/ceph/osd/ceph-17

2、确认磁盘对应的槽位;

root@Ceph-B**A**-04-S2-60:~# ll /dev/disk/by-path/ |grep sdp

lrwxrwxrwx 1 root root    9 Aug 17 19:17 pci-0000:02:00.0-scsi-0:0:18:0 -> ../../sdp

lrwxrwxrwx 1 root root   10 Aug 17 19:17 pci-0000:02:00.0-scsi-0:0:18:0-part1 -> ../../sdp1

lrwxrwxrwx 1 root root   10 Aug 17 19:17 pci-0000:02:00.0-scsi-0:0:18:0-part2 -> ../../sdp2

lrwxrwxrwx 1 root root   10 Aug 17 19:17 pci-0000:02:00.0-scsi-0:0:18:0-part3 -> ../../sdp3

3、确认主机SN;

root@Ceph-B**A**-04-S2-60:~# dmidecode -s system-serial-number

HVNHB**

4、设置OSD Flag;

ceph osd out 17

5、查看集群状态;

ceph -s

6、关闭对应的OSD进程;

stop cep-osd id=17

7、从CrshMap中移除OSD;

ceph osd crush remove osd.17

8、删除OSD认证信息;

ceph auth del osd.17

9、从集群中移除OSD;

ceph osd rm 17

10、卸载挂载点;

umount /var/lib/ceph/osd/ceph-17

11、更换新的磁盘。。。略;

 

12、格式化新磁盘;

ceph-deploy disk zap Ceph-B**A**-04-S2-60.domain.tld:sdp

13、创建OSD;

ceph-deploy osd create Ceph-B**A**-04-S2-60.domain.tld:sdp

14、调整CrushMap;

ceph osd crush add osd.17 1.17 root=sata pod=sata-pod-01 chassis=sata-chassis-01 host=Ceph-B**A**-04-S2-60-sata

15、优化挂载参数;

mount -o remount,nobarrier /var/lib/ceph/osd/ceph-17

 

 



上一篇:014 Ceph管理和自定义CRUSHMAP


下一篇:cache