您好,登錄后才能下訂單哦!
本篇文章為大家展示了ubuntu中怎么部署ceph集群,內容簡明扼要并且容易理解,絕對能使你眼前一亮,通過這篇文章的詳細介紹希望你能有所收獲。
# wget -q -O- 'https://download.ceph.com/keys/release.asc' | sudo apt-key add - # echo deb https://download.ceph.com/debian-jewel/ $(lsb_release -sc) main | sudo tee /etc/apt/sources.list.d/ceph.list
# apt-get install ceph-deploy
# apt-get install ceph
# mkdir /opt/ceph # cd /opt/ceph # ceph-deploy new k8s1 k8s2 k8s3 # echo mon_pg_warn_max_per_osd = 1000 >> ceph.conf # echo cluster_network=172.16.13.0/24 >> ceph.conf # echo max open files = 131072 >> ceph.conf # echo osd_scrub_begin_hour=1 >> ceph.conf # echo osd_scrub_end_hour=7 >> ceph.conf # echo "osd max object name len = 256" >> ceph.conf # echo "osd max object namespace len = 64" >> ceph.conf
# ceph-deploy mon create-initial
# cp ceph.client.admin.keyring /etc/ceph/
由于沒有裸盤,所以直接指定目錄作為osd,嘗試了下新版luminous,ceph-deploy里似乎不支持指定目錄作為osd
# mkdir -p /data/ceph/data # chown ceph:ceph /data/ceph/data/ # ceph-deploy osd prepare k8s2:/data/ceph/data # ceph-deploy osd activate k8s2:/data/ceph/data
三個節點每個節點一個osd
# ceph -s cluster 6d8963e9-9585-4679-8dac-17b60f2d0c30 health HEALTH_OK monmap e1: 3 mons at {tj006=172.16.41.25:6789/0,tj007=172.16.41.26:6789/0,tj008=172.16.41.27:6789/0} election epoch 12, quorum 0,1,2 tj006,tj007,tj008 osdmap e14: 3 osds: 3 up, 3 in flags sortbitwise,require_jewel_osds pgmap v29: 64 pgs, 1 pools, 0 bytes data, 0 objects 7811 GB used, 39739 GB / 50064 GB avail 64 active+clean
# ceph-deploy mds create k8s1 # ceph osd pool create k8s_data 32 # ceph osd pool create k8s_metadata 32 # ceph fs new ceph_k8s k8s_metadata k8s_data # mkdir /data/ceph/cephfs # mount -t ceph 172.16.13.160:6789:/ /data/ceph/cephfs -o name=admin,secretfile=/etc/ceph/admin.secret
上述內容就是ubuntu中怎么部署ceph集群,你們學到知識或技能了嗎?如果還想學到更多技能或者豐富自己的知識儲備,歡迎關注億速云行業資訊頻道。
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。