這篇文章主要介紹“Ceph集群的動(dòng)態(tài)調(diào)整方法”,在日常操作中,相信很多人在Ceph集群的動(dòng)態(tài)調(diào)整方法問(wèn)題上存在疑惑,小編查閱了各式資料,整理出簡(jiǎn)單好用的操作方法,希望對(duì)大家解答”Ceph集群的動(dòng)態(tài)調(diào)整方法”的疑惑有所幫助!接下來(lái),請(qǐng)跟著小編一起來(lái)學(xué)習(xí)吧!
創(chuàng)新互聯(lián)是一家專(zhuān)注于成都做網(wǎng)站、網(wǎng)站建設(shè)與策劃設(shè)計(jì),新洲網(wǎng)站建設(shè)哪家好?創(chuàng)新互聯(lián)做網(wǎng)站,專(zhuān)注于網(wǎng)站建設(shè)十載,網(wǎng)設(shè)計(jì)領(lǐng)域的專(zhuān)業(yè)建站公司;建站業(yè)務(wù)涵蓋:新洲等地區(qū)。新洲做網(wǎng)站價(jià)格咨詢(xún):18982081108
命令:
ceph-deploy mon create {host-name [host-name]...}
示例:
ceph-deploy mon create osnode17:172.17.23.4
命令:
ceph-deploy mon destroy {host-name [host-name]...}
示例:
ceph-deploy mon destroy osnode17
命令:
ceph-deploy disk list {node-name [node-name]...}
示例:
ceph-deploy disk list osnode19
命令:
ceph-deploy disk zap {osd-server-name}:{disk-name} #注意:該命令會(huì)刪除相應(yīng)磁盤(pán)數(shù)據(jù)
示例:
ceph-deploy disk zap osnode19: /dev/sdh osnode19: /dev/sdi
命令:
ceph-deploy osd prepare {node-name}:{data-disk}[:{journal-disk}]
示例:
ceph-deploy osd prepare osnode19:/dev/sdh osnode19: /dev/sdi
命令:
ceph-deploy osd activate {node-name}:{data-disk-partition}[:{journal-disk-partition}]
示例:
ceph-deploy osd activate osnode19:/dev/sdh2 osnode19:/dev/sdi1
命令:
ceph-deploy osd create {node-name}:{disk}[:{path/to/journal}] #注意:該命令為ceph-deploy osd prepare和ceph-deploy osd activate命令的集合
示例:
ceph-deploy osd create osnode19:/dev/sdj osnode19:/dev/sdk
命令:
#注意:ceph-deploy暫未提供刪除OSDS的命令,因而只能手動(dòng)執(zhí)行
ceph osd out {osd-num} #將OSD移除ceph集群
ceph stop osd.{osd-num} #停止OSD服務(wù)
ceph osd crush remove {osd-num} #移除crush map中的信息
ceph auth del {osd-num} #移除OSD認(rèn)證
ceph osd rm {osd-num} #移除OSD
umont /var/lib/ceph/osd/ceph-{osd-num} #移除OSD掛載
rm -rf /var/lib/ceph/osd/ceph-{osd-num} #刪除OSD的數(shù)據(jù)目錄
示例:
ceph osd out 18
service ceph stop osd.18
ceph osd crush remove osd.18
ceph auth del osd.18
ceph osd rm 18
umont /var/lib/ceph/osd/ceph-18
rm -rf /var/lib/ceph/osd/ceph-18
腳本:
vi osd-remove.sh
#!/bin/sh
for arg in "$@"
do
ceph osd out $arg
service ceph stop osd.$arg
ceph osd crush remove osd.$arg
ceph auth del osd.$arg
ceph osd rm $arg
umount /var/lib/ceph/osd/ceph-$arg
rm -rf /var/lib/ceph/osd/ceph-$arg
done
chmod +x osd-remove.sh
alias osd-remove=./osd-remove.sh
到此,關(guān)于“Ceph集群的動(dòng)態(tài)調(diào)整方法”的學(xué)習(xí)就結(jié)束了,希望能夠解決大家的疑惑。理論與實(shí)踐的搭配能更好的幫助大家學(xué)習(xí),快去試試吧!若想繼續(xù)學(xué)習(xí)更多相關(guān)知識(shí),請(qǐng)繼續(xù)關(guān)注創(chuàng)新互聯(lián)網(wǎng)站,小編會(huì)繼續(xù)努力為大家?guī)?lái)更多實(shí)用的文章!