您好,登錄后才能下訂單哦!
這篇文章主要介紹Ceph L如何快速安裝,文中介紹的非常詳細(xì),具有一定的參考價(jià)值,感興趣的小伙伴們一定要看完!
172.31.68.241 | admin-node/deph-deploy/mon/mgr/mds/rgw |
172.31.68.242 | osd.0/mon |
172.31.68.243 | osd.1/mon |
admin-node要可以無(wú)密碼ssh登錄osd機(jī)器,如果是普通用戶,則要分配sudo權(quán)限,如下:
useradd -d /home/cephadmin -m cephadmin echo "cephadmin ALL = (root) NOPASSWD:ALL" | sudo tee /etc/sudoers.d/cephadmin chmod 0440 /etc/sudoers.d/cephadmin
ceph-deploy new ceph2 ceph-deploy install ceph2 ceph3 ceph4 ceph-deploy --overwrite-conf mon create-initial ceph-deploy admin ceph2 ceph3 ceph4 ceph-deploy mgr create ceph2 ceph-deploy osd create --data /dev/vdb1 ceph3 ceph-deploy osd create --data /dev/vdb1 ceph4 ceph health ceph -s
ceph-deploy mds create ceph2 ceph-deploy mon add ceph3 ceph-deploy mon add ceph4 ceph quorum_status --format json-pretty
ceph-deploy rgw create ceph2 調(diào)整配置 [client.rgw.ceph2] rgw_frontends = "civetweb port=8080" ceph-deploy --overwrite-conf admin ceph2 ceph3 ceph4 ceph5 systemctl restart ceph-radosgw@rgw.ceph2.service curl http://172.31.68.241:8080 -I
apt-get install ceph ceph-deploy admin ceph5
echo 'hello ceph oject storage' > testfile.txt 創(chuàng)建pool ceph osd pool create mytest 8 上傳文件 rados put test-object-1 testfile.txt --pool=mytest rados -p mytest ls 獲取文件 rados get test-object-1 testfile.txt.1 --pool=mytest 查看映射位置 ceph osd map mytest test-object-1 刪除文件 rados rm test-object-1 --pool=mytest 刪除pool ceph osd pool rm mytest mytest --yes-i-really-really-mean-it
admin上執(zhí)行:ceph osd pool create rdb 8 admin上執(zhí)行:rbd pool init rdb admin上執(zhí)行: rbd create foo --size 512 --image-feature layering -p rdb rbd map foo --name client.admin -p rdb
admin:ceph osd pool create cephfs_data 4 admin:ceph osd pool create cephfs_metadata 4 admin:ceph osd lspools admin:ceph fs new cephfs cephfs_metadata cephfs_data admin.secret內(nèi)容為ceph.client.admin.keyring內(nèi)容的一部分 AQDhRX1baLeFFxAAskNapEuyipJ7SqS7Q1mh/Q== 內(nèi)核級(jí)別掛載方法: mkdir /mnt/mycephfs mount -t ceph 172.31.68.241:6789,172.31.68.242:6789,172.31.68.243:6789:/ /mnt/mycephfs -o name=admin,secretfile=admin.secret 實(shí)驗(yàn) cd /mnt/mycephfs echo 'hello ceph CephFS' > hello.txt cd ~ 卸載 umount -lf /mnt/mycephfs rm -rf /mnt/mycephfs 用戶級(jí)別掛載: mkdir /mnt/mycephfs ceph-fuse -m 172.31.68.241:6789 /mnt/mycephfs
ceph osd pool create .rgw 8 8 ceph osd pool create .rgw.root 8 8 ceph osd pool create .rgw.control 8 8 ceph osd pool create .rgw.gc 8 8 ceph osd pool create .rgw.buckets 8 8 ceph osd pool create .rgw.buckets.index 8 8 ceph osd pool create .rgw.buckets.extra 8 8 ceph osd pool create .log 8 8 ceph osd pool create .intent-log 8 8 ceph osd pool create .usage 8 8 ceph osd pool create .users 8 8 ceph osd pool create .users.email 8 8 ceph osd pool create .users.swift 8 8 ceph osd pool create .users.uid 8 8
cd /opt/vm/data_image qemu-img create -f qcow2 ubuntu16.04-2-data.img 2G qemu-img create -f qcow2 ubuntu16.04-3-data.img 2G virsh attach-disk [--domin] $DOMIN [--source] $SOURCEFILE [--target] $TARGET --subdriver qcow2 --config --live virsh attach-disk Ubuntu16.04-2 /opt/vm/data_image/ubuntu16.04-2-data.img vdb --subdriver qcow2 virsh attach-disk Ubuntu16.04-3 /opt/vm/data_image/ubuntu16.04-3-data.img vdb --subdriver qcow2
ceph-deploy purge ceph2 ceph3 ceph4 清除配置信息 ceph-deploy purgedata ceph2 ceph3 ceph4 ceph-deploy forgetkeys 每個(gè)節(jié)點(diǎn)刪除殘留的配置文件 rm -rf /var/lib/ceph/osd/* rm -rf /var/lib/ceph/mon/* rm -rf /var/lib/ceph/mds/* rm -rf /var/lib/ceph/bootstrap-mds/* rm -rf /var/lib/ceph/bootstrap-osd/* rm -rf /var/lib/ceph/bootstrap-mon/* rm -rf /var/lib/ceph/tmp/* rm -rf /etc/ceph/* rm -rf /var/run/ceph/*
vgscan vgdisplay -v lvremove vgremove pvremove
以上是“Ceph L如何快速安裝”這篇文章的所有內(nèi)容,感謝各位的閱讀!希望分享的內(nèi)容對(duì)大家有幫助,更多相關(guān)知識(shí),歡迎關(guān)注億速云行業(yè)資訊頻道!
免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如果涉及侵權(quán)請(qǐng)聯(lián)系站長(zhǎng)郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。