亚洲激情专区-91九色丨porny丨老师-久久久久久久女国产乱让韩-国产精品午夜小视频观看

溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

怎么在Ubuntu系統上部署分布式系統Ceph

發布時間:2021-09-03 17:55:05 來源:億速云 閱讀:296 作者:chen 欄目:系統運維

這篇文章主要講解了“怎么在Ubuntu系統上部署分布式系統Ceph”,文中的講解內容簡單清晰,易于學習與理解,下面請大家跟著小編的思路慢慢深入,一起來研究和學習“怎么在Ubuntu系統上部署分布式系統Ceph”吧!

Ceph是統一存儲系統,支持三種接口。
Object:有原生的API,而且也兼容Swift和S3的API
Block:支持精簡配置、快照、克隆
File:Posix接口,支持快照
Ceph也是分布式存儲系統,它的特點是:
高擴展性:使用普通x86服務器,支持10~1000臺服務器,支持TB到PB級的擴展。
高可靠性:沒有單點故障,多數據副本,自動管理,自動修復。
高性能:數據分布均衡,并行化度高。對于objects storage和block storage,不需要元數據服務器。
怎么在Ubuntu系統上部署分布式系統Ceph

架構
怎么在Ubuntu系統上部署分布式系統Ceph

Ceph的底層是RADOS,它的意思是“A reliable, autonomous, distributed object storage”。 RADOS由兩個組件組成:
OSD: Object Storage Device,提供存儲資源。
Monitor:維護整個Ceph集群的全局狀態。
RADOS具有很強的擴展性和可編程性,Ceph基于RADOS開發了
Object Storage、Block Storage、FileSystem。Ceph另外兩個組件是:
MDS:用于保存CephFS的元數據。
RADOS Gateway:對外提供REST接口,兼容S3和Swift的API。

映射

Ceph的命名空間是 (Pool, Object),每個Object都會映射到一組OSD中(由這組OSD保存這個Object):
(Pool, Object) → (Pool, PG) → OSD set → Disk
Ceph中Pools的屬性有:
Object的副本數
Placement Groups的數量
所使用的CRUSH Ruleset
在Ceph中,Object先映射到PG(Placement Group),再由PG映射到OSD set。每個Pool有多個PG,每個Object通過計算hash值并取模得到它所對應的PG。PG再映射到一組OSD(OSD的個數由Pool 的副本數決定),第一個OSD是Primary,剩下的都是Replicas。
數據映射(Data Placement)的方式決定了存儲系統的性能和擴展性。(Pool, PG) → OSD set 的映射由四個因素決定:
CRUSH算法:一種偽隨機算法。
OSD MAP:包含當前所有Pool的狀態和所有OSD的狀態。
CRUSH MAP:包含當前磁盤、服務器、機架的層級結構。
CRUSH Rules:數據映射的策略。這些策略可以靈活的設置object存放的區域。比如可以指定 pool1中所有objecst放置在機架1上,所有objects的第1個副本放置在機架1上的服務器A上,第2個副本分布在機架1上的服務器B上。 pool2中所有的object分布在機架2、3、4上,所有Object的第1個副本分布在機架2的服務器上,第2個副本分布在機架3的服 器上,第3個副本分布在機架4的服務器上。

怎么在Ubuntu系統上部署分布式系統Ceph

Client從Monitors中得到CRUSH MAP、OSD MAP、CRUSH Ruleset,然后使用CRUSH算法計算出Object所在的OSD set。所以Ceph不需要Name服務器,Client直接和OSD進行通信。偽代碼如下所示:

代碼如下:


 locator = object_name
 obj_hash = hash(locator)
 pg = obj_hash % num_pg
 osds_for_pg = crush(pg)  # returns a list of osds
 primary = osds_for_pg[0]
 replicas = osds_for_pg[1:]

這種數據映射的優點是:
把Object分成組,這降低了需要追蹤和處理metadata的數量(在全局的層面上,我們不需要追蹤和處理每個object的metadata和placement,只需要管理PG的metadata就可以了。PG的數量級遠遠低于object的數量級)。
增加PG的數量可以均衡每個OSD的負載,提高并行度。
分隔故障域,提高數據的可靠性。

強一致性

Ceph的讀寫操作采用Primary-Replica模型,Client只向Object所對應OSD set的Primary發起讀寫請求,這保證了數據的強一致性。
由于每個Object都只有一個Primary OSD,因此對Object的更新都是順序的,不存在同步問題。
當Primary收到Object的寫請求時,它負責把數據發送給其他Replicas,只要這個數據被保存在所有的OSD上時,Primary才應答Object的寫請求,這保證了副本的一致性。
怎么在Ubuntu系統上部署分布式系統Ceph

容錯性

在分布式系統中,常見的故障有網絡中斷、掉電、服務器宕機、硬盤故障等,Ceph能夠容忍這些故障,并進行自動修復,保證數據的可靠性和系統可用性。
Monitors是Ceph管家,維護著Ceph的全局狀態。Monitors的功能和zookeeper類似,它們使用Quorum和Paxos算法去建立全局狀態的共識。
OSDs可以進行自動修復,而且是并行修復。
故障檢測:
OSD之間有心跳檢測,當OSD A檢測到OSD B沒有回應時,會報告給Monitors說OSD B無法連接,則Monitors給OSD B標記為down狀態,并更新OSD Map。當過了M秒之后還是無法連接到OSD B,則Monitors給OSD B標記為out狀態(表明OSD B不能工作),并更新OSD Map。
備注:可以在Ceph中配置M的值。
故障恢復:
當某個PG對應的OSD set中有一個OSD被標記為down時(假如是Primary被標記為down,則某個Replica會成為新的Primary,并處理所有讀寫 object請求),則該PG處于active+degraded狀態,也就是當前PG有效的副本數是N-1。
過了M秒之后,假如還是無法連接該OSD,則它被標記為out,Ceph會重新計算PG到OSD set的映射(當有新的OSD加入到集群時,也會重新計算所有PG到OSD set的映射),以此保證PG的有效副本數是N。
新OSD set的Primary先從舊的OSD set中收集PG log,得到一份Authoritative History(完整的、全序的操作序列),并讓其他Replicas同意這份Authoritative History(也就是其他Replicas對PG的所有objects的狀態達成一致),這個過程叫做Peering。
當Peering過程完成之后,PG進 入active+recoverying狀態,Primary會遷移和同步那些降級的objects到所有的replicas上,保證這些objects 的副本數為N。

下面來看一下部署與配置

系統環境:Ubuntu 12.04.2

代碼如下:


hostname:s1 osd.0/mon.a/mds.a ip:192.168.242.128
hostname:s2 osd.1/mon.b/mds.b ip:192.168.242.129
hostname:s3 osd.2/mon.c/mds.c ip:192.168.242.130
hostname:s4 client ip:192.168.242.131


免密鑰:
s1/s2/s3 啟用root,相互之間配置免密鑰。

代碼如下:


cat id_rsa.pub_s* >> authorized_keys


安裝:

代碼如下:


apt-get install ceph ceph-common ceph-fs-common (ceph-mds)


更新到新版本:

代碼如下:


wget -q -O- ‘https://ceph.com/git/?p=ceph.git;a=blob_plain;f=keys/release.asc’| sudo apt-key add -
echo deb http://ceph.com/debian/ $(lsb_release -sc) main | tee /etc/apt/sources.list.d/ceph.list
apt-get update
apt-get install ceph


分區及掛載(使用btrfs):

代碼如下:


root@s1:/data/osd.0# df -h|grep osd
/dev/sdb1 20G 180M 19G 1% /data/osd.0
root@s2:/data/osd.1# df -h|grep osd
/dev/sdb1 20G 173M 19G 1% /data/osd.1
root@s3:/data/osd.2# df -h|grep osd
/dev/sdb1 20G 180M 19G 1% /data/osd.2
root@s1:~/.ssh# mkdir -p /tmp/ceph/(每個server上執行)


配置:

代碼如下:


root@s1:/data/osd.0# vim /etc/ceph/ceph.conf
[global]
auth cluster required = none
auth service required = none
auth client required = none
[osd]
osd data = /data/$name
[mon]
mon data = /data/$name
[mon.a]
host = s1
mon addr = 192.168.242.128:6789
[mon.b]
host = s2
mon addr = 192.168.242.129:6789
[mon.c]
host = s3
mon addr = 192.168.242.130:6789
[osd.0]
host = s1
brtfs devs = /dev/sdb1
[osd.1]
host = s2
brtfs devs = /dev/sdb1
[osd.2]
host = s3
brtfs devs = /dev/sdb1
[mds.a]
host = s1
[mds.b]
host = s2
[mds.c]
host = s3

同步配置

代碼如下:


root@s1:~/.ssh# scp /etc/ceph/ceph.conf s2:/etc/ceph/
ceph.conf 100% 555 0.5KB/s 00:00
root@s1:~/.ssh# scp /etc/ceph/ceph.conf s3:/etc/ceph/
ceph.conf 100% 555 0.5KB/s 00:00


所有server上執行:

代碼如下:


rm -rf /data/$name/* /data/mon/*(初始化前保持沒有任何數據)
root@s1:~/.ssh# mkcephfs -a -c /etc/ceph/ceph.conf -k /etc/ceph/ceph.keyring
temp dir is /tmp/mkcephfs.qLmwP4Nd0G
preparing monmap in /tmp/mkcephfs.qLmwP4Nd0G/monmap
/usr/bin/monmaptool –create –clobber –add a 192.168.242.128:6789 –add b 192.168.242.129:6789 –add c 192.168.242.130:6789 –print /tmp/mkcephfs.qLmwP4Nd0G/monmap
/usr/bin/monmaptool: monmap file /tmp/mkcephfs.qLmwP4Nd0G/monmap
/usr/bin/monmaptool: generated fsid c26fac57-4941-411f-a6ac-3dcd024f2073
epoch 0
fsid c26fac57-4941-411f-a6ac-3dcd024f2073
last_changed 2014-05-08 16:08:06.102237
created 2014-05-08 16:08:06.102237
0: 192.168.242.128:6789/0 mon.a
1: 192.168.242.129:6789/0 mon.b
2: 192.168.242.130:6789/0 mon.c
/usr/bin/monmaptool: writing epoch 0 to /tmp/mkcephfs.qLmwP4Nd0G/monmap (3 monitors)
=== osd.0 ===
** WARNING: No osd journal is configured: write latency may be high.
If you will not be using an osd journal, write latency may be
relatively high. It can be reduced somewhat by lowering
filestore_max_sync_interval, but lower values mean lower write
throughput, especially with spinning disks.
2014-05-08 16:08:11.279610 b72cc740 created object store /data/osd.0 for osd.0 fsid c26fac57-4941-411f-a6ac-3dcd024f2073
creating private key for osd.0 keyring /tmp/mkcephfs.qLmwP4Nd0G/keyring.osd.0
creating /tmp/mkcephfs.qLmwP4Nd0G/keyring.osd.0
=== osd.1 ===
pushing conf and monmap to s2:/tmp/mkfs.ceph.5884
** WARNING: No osd journal is configured: write latency may be high.
If you will not be using an osd journal, write latency may be
relatively high. It can be reduced somewhat by lowering
filestore_max_sync_interval, but lower values mean lower write
throughput, especially with spinning disks.
2014-05-08 16:08:21.146302 b7234740 created object store /data/osd.1 for osd.1 fsid c26fac57-4941-411f-a6ac-3dcd024f2073
creating private key for osd.1 keyring /tmp/mkfs.ceph.5884/keyring.osd.1
creating /tmp/mkfs.ceph.5884/keyring.osd.1
collecting osd.1 key
=== osd.2 ===
pushing conf and monmap to s3:/tmp/mkfs.ceph.5884
** WARNING: No osd journal is configured: write latency may be high.
If you will not be using an osd journal, write latency may be
relatively high. It can be reduced somewhat by lowering
filestore_max_sync_interval, but lower values mean lower write
throughput, especially with spinning disks.
2014-05-08 16:08:27.264484 b72b3740 created object store /data/osd.2 for osd.2 fsid c26fac57-4941-411f-a6ac-3dcd024f2073
creating private key for osd.2 keyring /tmp/mkfs.ceph.5884/keyring.osd.2
creating /tmp/mkfs.ceph.5884/keyring.osd.2
collecting osd.2 key
=== mds.a ===
creating private key for mds.a keyring /tmp/mkcephfs.qLmwP4Nd0G/keyring.mds.a
creating /tmp/mkcephfs.qLmwP4Nd0G/keyring.mds.a
=== mds.b ===
pushing conf and monmap to s2:/tmp/mkfs.ceph.5884
creating private key for mds.b keyring /tmp/mkfs.ceph.5884/keyring.mds.b
creating /tmp/mkfs.ceph.5884/keyring.mds.b
collecting mds.b key
=== mds.c ===
pushing conf and monmap to s3:/tmp/mkfs.ceph.5884
creating private key for mds.c keyring /tmp/mkfs.ceph.5884/keyring.mds.c
creating /tmp/mkfs.ceph.5884/keyring.mds.c
collecting mds.c key
Building generic osdmap from /tmp/mkcephfs.qLmwP4Nd0G/conf
/usr/bin/osdmaptool: osdmap file ‘/tmp/mkcephfs.qLmwP4Nd0G/osdmap’
2014-05-08 16:08:26.100746 b731e740 adding osd.0 at {host=s1,pool=default,rack=unknownrack}
2014-05-08 16:08:26.101413 b731e740 adding osd.1 at {host=s2,pool=default,rack=unknownrack}
2014-05-08 16:08:26.101902 b731e740 adding osd.2 at {host=s3,pool=default,rack=unknownrack}
/usr/bin/osdmaptool: writing epoch 1 to /tmp/mkcephfs.qLmwP4Nd0G/osdmap
Generating admin key at /tmp/mkcephfs.qLmwP4Nd0G/keyring.admin
creating /tmp/mkcephfs.qLmwP4Nd0G/keyring.admin
Building initial monitor keyring
added entity mds.a auth auth(auid = 18446744073709551615 key=AQB3O2tTwDNwLRAAofpkrOMqtHCPTFX36EKAMA== with 0 caps)
added entity mds.b auth auth(auid = 18446744073709551615 key=AQB8O2tT8H8nIhAAq1O2lh5IV/cQ73FUUTOUug== with 0 caps)
added entity mds.c auth auth(auid = 18446744073709551615 key=AQB9O2tTWIfsKRAAVYeueMToC85tRSvlslV/jQ== with 0 caps)
added entity osd.0 auth auth(auid = 18446744073709551615 key=AQBrO2tTOLQpEhAA4MS83CnJRYAkoxrFSvC3aQ== with 0 caps)
added entity osd.1 auth auth(auid = 18446744073709551615 key=AQB1O2tTME0eChAA7U4xSrv7MJUZ8vxcEkILbw== with 0 caps)
added entity osd.2 auth auth(auid = 18446744073709551615 key=AQB7O2tT0FUKERAAQ/EJT5TclI2XSCLAWAZZOw== with 0 caps)
=== mon.a ===
/usr/bin/ceph-mon: created monfs at /data/mon for mon.a
=== mon.b ===
pushing everything to s2
/usr/bin/ceph-mon: created monfs at /data/mon for mon.b
=== mon.c ===
pushing everything to s3
/usr/bin/ceph-mon: created monfs at /data/mon for mon.c
placing client.admin keyring in /etc/ceph/ceph.keyring


上面提示了沒有配置journal。

代碼如下:


root@s1:~# /etc/init.d/ceph -a start
=== mon.a ===
Starting Ceph mon.a on s1…already running
=== mds.a ===
Starting Ceph mds.a on s1…already running
=== osd.0 ===
Starting Ceph osd.0 on s1…
** WARNING: Ceph is still under development. Any feedback can be directed **
** at ceph-devel@vger.kernel.org or http://ceph.newdream.net/. **
starting osd.0 at 0.0.0.0:6801/2264 osd_data /data/osd.0 (no journal)


查看狀態:

代碼如下:


root@s1:~# ceph -s
2014-05-09 09:37:40.477978 pg v444: 594 pgs: 594 active+clean; 38199 bytes data, 531 MB used, 56869 MB / 60472 MB avail
2014-05-09 09:37:40.485092 mds e23: 1/1/1 up {0=a=up:active}, 2 up:standby
2014-05-09 09:37:40.485601 osd e34: 3 osds: 3 up, 3 in
2014-05-09 09:37:40.486276 log 2014-05-09 09:36:25.843782 mds.0 192.168.242.128:6800/1053 1 : [INF] closing stale session client.4104 192.168.242.131:0/2123448720 after 302.954724
2014-05-09 09:37:40.486577 mon e1: 3 mons at {a=192.168.242.128:6789/0,b=192.168.242.129:6789/0,c=192.168.242.130:6789/0}</p> <p>root@s1:~# for i in 1 2 3 ;do ceph health;done
2014-05-09 10:05:30.306575 mon <- [health]
2014-05-09 10:05:30.309366 mon.1 -> &lsquo;HEALTH_OK&rsquo; (0)
2014-05-09 10:05:30.330317 mon <- [health]
2014-05-09 10:05:30.333608 mon.2 -> &lsquo;HEALTH_OK&rsquo; (0)
2014-05-09 10:05:30.352617 mon <- [health]
2014-05-09 10:05:30.353984 mon.0 -> &lsquo;HEALTH_OK&rsquo; (0)


并同時查看 s1、s2、s3 log可以看到,證明3個節點都正常:

代碼如下:


2014-05-09 09:39:32.316795 b4bfeb40 mon.a@0(leader) e1 handle_command mon_command(health v 0) v1
2014-05-09 09:39:40.789748 b4bfeb40 mon.a@0(leader).osd e35 e35: 3 osds: 3 up, 3 in
2014-05-09 09:40:00.796979 b4bfeb40 mon.a@0(leader).osd e36 e36: 3 osds: 3 up, 3 in
2014-05-09 09:40:41.781141 b4bfeb40 mon.a@0(leader) e1 handle_command mon_command(health v 0) v1
2014-05-09 09:40:42.409235 b4bfeb40 mon.a@0(leader) e1 handle_command mon_command(health v 0) v1


log 里面會看到如下時間未同步信息:

代碼如下:


2014-05-09 09:43:13.485212 b49fcb40 log [WRN] : message from mon.0 was stamped 6.050738s in the future, clocks not synchronized
2014-05-09 09:43:13.861985 b49fcb40 log [WRN] : message from mon.0 was stamped 6.050886s in the future, clocks not synchronized
2014-05-09 09:43:14.012633 b49fcb40 log [WRN] : message from mon.0 was stamped 6.050681s in the future, clocks not synchronized
2014-05-09 09:43:15.809439 b49fcb40 log [WRN] : message from mon.0 was stamped 6.050781s in the future, clocks not synchronized


所以我們在做集群之前最好能在集群內部做好ntp服務器,確保各節點之前時間一致。

3. 接下來在客戶機s4上進行驗證操作:

代碼如下:


root@s4:/mnt# mount -t ceph s1:6789:/ /mnt/s1fs/
root@s4:/mnt# mount -t ceph s2:6789:/ /mnt/s2fs/
root@s4:/mnt# mount -t ceph s3:6789:/ /mnt/s3fs/
root@s4:~# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 79G 1.3G 74G 2% /
udev 241M 4.0K 241M 1% /dev
tmpfs 100M 304K 99M 1% /run
none 5.0M 0 5.0M 0% /run/lock
none 248M 0 248M 0% /run/shm
192.168.242.130:6789:/ 60G 3.6G 56G 6% /mnt/s3fs
192.168.242.129:6789:/ 60G 3.6G 56G 6% /mnt/s2fs
192.168.242.128:6789:/ 60G 3.6G 56G 6% /mnt/s1fs</p> <p>root@s4:/mnt/s2fs# touch aa
root@s4:/mnt/s2fs# ls -al /mnt/s1fs
total 4
drwxr-xr-x 1 root root 0 May 8 18:08 ./
drwxr-xr-x 7 root root 4096 May 8 17:28 ../
-rw-r&ndash;r&ndash; 1 root root 0 May 8 18:08 aa
root@s4:/mnt/s2fs# ls -al /mnt/s3fs
total 4
drwxr-xr-x 1 root root 0 May 8 18:08 ./
drwxr-xr-x 7 root root 4096 May 8 17:28 ../
-rw-r&ndash;r&ndash; 1 root root 0 May 8 18:08 aa</p> <p>root@s4:/mnt/s2fs# rm -f aa
root@s4:/mnt/s2fs# ls -al /mnt/s1fs/
total 4
drwxr-xr-x 1 root root 0 May 8 2014 ./
drwxr-xr-x 7 root root 4096 May 8 17:28 ../
root@s4:/mnt/s2fs# ls -al /mnt/s3fs/
total 4
drwxr-xr-x 1 root root 0 May 8 18:07 ./
drwxr-xr-x 7 root root 4096 May 8 17:28 ../


接下來我們驗證單點故障:
將s1服務停掉,

代碼如下:


root@s1:~# /etc/init.d/ceph stop
=== mon.a ===
Stopping Ceph mon.a on s1&hellip;kill 965&hellip;done
=== mds.a ===
Stopping Ceph mds.a on s1&hellip;kill 1314&hellip;done
=== osd.0 ===
Stopping Ceph osd.0 on s1&hellip;kill 2265&hellip;done


s2上log 立馬顯示:
省掉了很多,基本的意思就是mon監控中心發現,剔除故障節點,進行自動切換,集群恢復。

代碼如下:


2014-05-09 10:16:44.906370 a5af0b40 &mdash; 192.168.242.129:6802/1495 >> 192.168.242.128:6802/1466 pipe(0xb1e1b1a8 sd=19 pgs=3 cs=3 l=0).fault with nothing to send, going to standby
2014-05-09 10:16:44.906982 a68feb40 &mdash; 192.168.242.129:6803/1495 >> 192.168.242.128:0/1467 pipe(0xa6e00d50 sd=17 pgs=1 cs=1 l=0).fault with nothing to send, going to standby
2014-05-09 10:16:44.907415 a63f9b40 &mdash; 192.168.242.129:0/1506 >> 192.168.242.128:6803/1466 pipe(0xb1e26d50 sd=20 pgs=1 cs=1 l=0).fault with nothing to send, going to standby
2014-05-09 10:16:49.028640 b5199b40 mds.0.6 handle_mds_map i am now mds.0.6
2014-05-09 10:16:49.029018 b5199b40 mds.0.6 handle_mds_map state change up:reconnect &ndash;> up:rejoin
2014-05-09 10:16:49.029260 b5199b40 mds.0.6 rejoin_joint_start
2014-05-09 10:16:49.032134 b5199b40 mds.0.6 rejoin_done
==> /var/log/ceph/mon.b.log <==
2014-05-09 10:16:49.060870 b5198b40 log [INF] : mds.0 192.168.242.129:6804/1341 up:active
==> /var/log/ceph/mds.b.log <==
2014-05-09 10:16:49.073135 b5199b40 mds.0.6 handle_mds_map i am now mds.0.6
2014-05-09 10:16:49.073237 b5199b40 mds.0.6 handle_mds_map state change up:rejoin --> up:active
2014-05-09 10:16:49.073252 b5199b40 mds.0.6 recovery_done &mdash; successful recovery!
2014-05-09 10:16:49.073871 b5199b40 mds.0.6 active_start
2014-05-09 10:16:49.073934 b5199b40 mds.0.6 cluster recovered.
==> /var/log/ceph/mds.b.log <==
2014-05-09 10:16:49.073135 b5199b40 mds.0.6 handle_mds_map i am now mds.0.6
2014-05-09 10:16:49.073237 b5199b40 mds.0.6 handle_mds_map state change up:rejoin --> up:active
2014-05-09 10:16:49.073252 b5199b40 mds.0.6 recovery_done &mdash; successful recovery!
2014-05-09 10:16:49.073871 b5199b40 mds.0.6 active_start
2014-05-09 10:16:49.073934 b5199b40 mds.0.6 cluster recovered.
==> /var/log/ceph/mon.b.log <==
2014-05-09 10:18:24.366217 b5198b40 mon.b@1(leader) e1 handle_command mon_command(health v 0) v1
2014-05-09 10:18:25.717589 b5198b40 mon.b@1(leader) e1 handle_command mon_command(health v 0) v1
2014-05-09 10:18:29.481811 b5198b40 mon.b@1(leader) e1 handle_command mon_command(health v 0) v1
2014-05-09 10:21:39.184889 b4997b40 log [INF] : osd.0 out (down for 303.572445)
2014-05-09 10:21:39.195596 b5198b40 mon.b@1(leader).osd e42 e42: 3 osds: 2 up, 2 in
2014-05-09 10:21:40.199772 b5198b40 mon.b@1(leader).osd e43 e43: 3 osds: 2 up, 2 in
root@s2:~# ceph -s
2014-05-09 10:24:18.075291 pg v501: 594 pgs: 594 active+clean; 47294 bytes data, 359 MB used, 37907 MB / 40315 MB avail
2014-05-09 10:24:18.093637 mds e27: 1/1/1 up {0=b=up:active}, 1 up:standby
2014-05-09 10:24:18.094047 osd e43: 3 osds: 2 up, 2 in
2014-05-09 10:24:18.094833 log 2014-05-09 10:21:39.185547 mon.1 192.168.242.129:6789/0 40 : [INF] osd.0 out (down for 303.572445)
2014-05-09 10:24:18.095606 mon e1: 3 mons at {a=192.168.242.128:6789/0,b=192.168.242.129:6789/0,c=192.168.242.130:6789/0}
root@s1:~# ceph health
2014-05-09 10:18:43.185714 mon <- [health]
2014-05-09 10:18:43.189028 mon.2 -> &lsquo;HEALTH_WARN 1/3 in osds are down; 1 mons down, quorum 1,2&prime; (0)
root@s2:~# ceph health
2014-05-09 10:23:40.655548 mon <- [health]
2014-05-09 10:23:40.658293 mon.2 -> &lsquo;HEALTH_WARN 1 mons down, quorum 1,2&prime; (0)
root@s3:~# ceph health
2014-05-09 10:23:28.058080 mon <- [health]
2014-05-09 10:23:28.061126 mon.1 -> &lsquo;HEALTH_WARN 1 mons down, quorum 1,2&prime; (0)


再接下來,關閉s2,只開啟s3:
s3上log顯示大量

代碼如下:


==> /var/log/ceph/mds.c.log <==
2014-05-09 10:33:04.274503 b5180b40 mds.-1.0 ms_handle_connect on 192.168.242.130:6789/0</p> <p>==> /var/log/ceph/osd.2.log <==
2014-05-09 10:33:04.832597 b4178b40 osd.2 43 heartbeat_check: no heartbeat from osd.1 since 2014-05-09 10:29:54.607954 (cutoff 2014-05-09 10:32:44.832568)
2014-05-09 10:33:05.084620 a7be9b40 osd.2 43 heartbeat_check: no heartbeat from osd.1 since 2014-05-09 10:29:54.607954 (cutoff 2014-05-09 10:32:45.084592)
2014-05-09 10:33:05.585583 a7be9b40 osd.2 43 heartbeat_check: no heartbeat from osd.1 since 2014-05-09 10:29:54.607954 (cutoff 2014-05-09 10:32:45.585553)
2014-05-09 10:33:05.834589 b4178b40 osd.2 43 heartbeat_check: no heartbeat from osd.1 since 2014-05-09 10:29:54.607954 (cutoff 2014-05-09 10:32:45.834559)
2014-05-09 10:33:06.086562 a7be9b40 osd.2 43 heartbeat_check: no heartbeat from osd.1 since 2014-05-09 10:29:54.607954 (cutoff 2014-05-09 10:32:46.086533)
2014-05-09 10:33:06.835683 b4178b40 osd.2 43 heartbeat_check: no heartbeat from osd.1 since 2014-05-09 10:29:54.607954 (cutoff 2014-05-09 10:32:46.835641)
2014-05-09 10:33:07.287766 a7be9b40 osd.2 43 heartbeat_check: no heartbeat from osd.1 since 2014-05-09 10:29:54.607954 (cutoff 2014-05-09 10:32:47.287737)


健康檢測不能從s2上的osd.1 獲取no heartbeat 。
s1、s2、s3上都有mon、mds、osd。但是總個集群中只有一個節點,所以不能提供服務。

感謝各位的閱讀,以上就是“怎么在Ubuntu系統上部署分布式系統Ceph”的內容了,經過本文的學習后,相信大家對怎么在Ubuntu系統上部署分布式系統Ceph這一問題有了更深刻的體會,具體使用情況還需要大家實踐驗證。這里是億速云,小編將為大家推送更多相關知識點的文章,歡迎關注!

向AI問一下細節

免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。

AI

蕲春县| 聂荣县| 资中县| 庆城县| 亳州市| 平陆县| 大埔县| 犍为县| 桑植县| 监利县| 东阳市| 盖州市| 嘉义市| 临沧市| 大方县| 宜昌市| 棋牌| 合阳县| 禹城市| 寻乌县| 邮箱| 邳州市| 宁蒗| 古丈县| 乌海市| 大邑县| 乌兰察布市| 河曲县| 博爱县| 平乐县| 会泽县| 城固县| 嵩明县| 邛崃市| 和田县| 廊坊市| 通州市| 沭阳县| 武宁县| 灵璧县| 闸北区|