Ceph分佈式存儲更換磁盤操做步驟dom
一、確認須要更換的磁盤對應的盤符、OSD ID ;分佈式
root@Ceph-B**A**-04-S2-60:~# df -h |grep 17ide
/dev/sdp3 1.1T 566G 551G 51% /var/lib/ceph/osd/ceph-17優化
二、確認磁盤對應的槽位;spa
root@Ceph-B**A**-04-S2-60:~# ll /dev/disk/by-path/ |grep sdpcode
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 -> ../../sdp1ci
lrwxrwxrwx 1 root root 10 Aug 17 19:17 pci-0000:02:00.0-scsi-0:0:18:0-part2 -> ../../sdp2rem
lrwxrwxrwx 1 root root 10 Aug 17 19:17 pci-0000:02:00.0-scsi-0:0:18:0-part3 -> ../../sdp3it
三、確認主機SN;
root@Ceph-B**A**-04-S2-60:~# dmidecode -s system-serial-number
HVNHB**
四、設置OSD Flag;
ceph osd out 17
五、查看集羣狀態;
ceph -s
六、關閉對應的OSD進程;
stop cep-osd id=17
七、從CrshMap中移除OSD;
ceph osd crush remove osd.17
八、刪除OSD認證信息;
ceph auth del osd.17
九、從集羣中移除OSD;
ceph osd rm 17
十、卸載掛載點;
umount /var/lib/ceph/osd/ceph-17
十一、更換新的磁盤。。。略;
十二、格式化新磁盤;
ceph-deploy disk zap Ceph-B**A**-04-S2-60.domain.tld:sdp
1三、建立OSD;
ceph-deploy osd create Ceph-B**A**-04-S2-60.domain.tld:sdp
1四、調整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
1五、優化掛載參數;
mount -o remount,nobarrier /var/lib/ceph/osd/ceph-17