问题1
创建存储池之后出现 100.000% pgs not active,导致后续 rbd
命令执行时卡住不返回?
解决办法:
cd /etc/ceph/
ceph osd getcrushmap -o /etc/ceph/crushmap
crushtool -d /etc/ceph/crushmap -o /etc/ceph/crushmap.txt
sed -i 's/step chooseleaf firstn 0 type host/step chooseleaf firstn 0 type osd/' /etc/ceph/crushmap.txt
grep 'step chooseleaf' /etc/ceph/crushmap.txt
crushtool -c /etc/ceph/crushmap.txt -o /etc/ceph/crushmap-new
ceph osd setcrushmap -i /etc/ceph/crushmap-new
cd -
问题2
application not enabled on 1 pool(s)?
解决办法:
$ ceph health detail
HEALTH_WARN application not enabled on 1 pool(s)
POOL_APP_NOT_ENABLED application not enabled on 1 pool(s)
application not enabled on pool 'data-pool'
use 'ceph osd pool application enable <pool-name> <app-name>', where <app-name> is 'cephfs', 'rbd', 'rgw', or freeform for custom applications.
$ ceph osd pool application enable data-pool rbd
enabled application 'rbd' on pool 'data-pool'
$ ceph -s
cluster:
id: 39d6281e-2563-4f00-9369-0122a03e24d0
health: HEALTH_OK
...
问题3
feature set mismatch, my 106b84a842a42 < server’s 40106b84a842a42, missing 400000000000000,客户端版本低于服务端?
解决办法:
ceph osd crush tunables hammer
ceph osd crush reweight-all
查看映像的 features:
$ rbd info data-pool/foo
rbd image 'foo':
...
features: layering, exclusive-lock, object-map, fast-diff, deep-flatten
关掉除 layering 外的其他 features:
rbd feature disable data-pool/foo deep-flatten
rbd feature disable data-pool/foo fast-diff
rbd feature disable data-pool/foo exclusive-lock
问题4
crush map has legacy tunables (require firefly, min is hammer)?
解决办法:
$ ceph osd crush tunables optimal