centos7下ceph搭建好了后,我想要动态增加osd,增加的osd也都显示已经启动,如下:
#/etc/init.d/ceph -a start
=== mon.0 ===
Starting Ceph mon.0 on node56...already running
=== mds.0 ===
Starting Ceph mds.0 on node56...already running
=== osd.0 ===
Starting Ceph osd.0 on node57...already running
=== osd.1 ===
Starting Ceph osd.1 on node58...already running
=== osd.2 ===
Starting Ceph osd.2 on node57...already running
=== osd.3 ===
Starting Ceph osd.3 on node58...already running
=== osd.4 ===
Starting Ceph osd.4 on node56...already running
但是查看osd的状态却是down,我使用/etc/init.d/ceph start osd.0,启动没出错,但是osd的状态还是down。怎么样才能把osd up?
# ceph osd tree
# id weight type name up/down reweight
-1 5 root default
-3 5 rack unknownrack
-2 1 host node57
0 1 osd.0 down 0
-4 1 host node58
1 1 osd.1 down 0
-5 3 host node56
4 1 osd.4 up 1
2 1 osd.2 up 1
3 1 osd.3 up 1
# ceph df
GLOBAL:
SIZE AVAIL RAW USED %RAW USED
61410M 58299M 3110M 5.07
POOLS:
NAME ID USED %USED MAX AVAIL OBJECTS
data 0 0 0 0 0
metadata 1 2082 0 0 20
rbd 2 0 0 0 0
ceph -s, 显示是否为正常
如果不正常
(1)剔除该盘: ceph osd out osdxxx, ceph osd rm osdxxx , ceph auth del osdxxx
(2)umount: umount /dev/sdb1
(3)初始化: ceph-deploy --overwrite-conf osd prepare ceph02:/dev/sdb1
(4)再次激活: ceph-deploy osd activate ceph01:/dev/sdb1 ceph02:/dev/sdb1
(5)再次确认: ceph osd tree, ceph -s