今天ceph的一个osd节点down了,导致出现Warming :
[root@admin-ceph ~]# ceph osd tree
ID WEIGHT TYPE NAME UP/DOWN REWEIGHT PRIMARY-AFFINITY
-1 0.72998 root default
-2 0.18250 host ceph2
0 0.18250 osd.0 up 1.00000 1.00000
-3 0.18250 host ceph3
1 0.18250 osd.1 up 1.00000 1.00000
-4 0.18250 host ceph1
2 0.18250 osd.2 up 1.00000 1.00000
-5 0.18250 host ceph4
3 0.18250 osd.3 down 0 1.00000
查看OSD节点的/var/log/messages :
Jan 9 21:57:28 ceph4 ceph-create-keys: admin_socket: exception getting command descriptions: [Errno 2] No such file or directory
Jan 9 21:57:28 ceph4 ceph-create-keys: INFO:ceph-create-keys:ceph-mon admin socket not ready yet.
Jan 9 21:57:29 ceph4 ceph-create-keys: admin_socket: exception getting command descriptions: [Errno 2] No such file or directory
Jan 9 21:57:29 ceph4 ceph-create-keys: INFO:ceph-create-keys:ceph-mon admin socket not ready yet.
发现这些信息并没有什么卵用 ;
查看/var/log/ceph/ceph-osd.3.log
017-01-09 21:21:24.827410 7f002ba16800 0 filestore(/var/lib/ceph/osd/ceph-3) mount: enabling WRITEAHEAD journal mode: checkpoint is not enabled
2017-01-09 21:21:24.827620 7f002ba16800 -1 filestore(/var/lib/ceph/osd/ceph-3) mount failed to open journal /var/lib/ceph/osd/ceph-3/journal: (13) Permission denied
2017-01-09 21:21:24.828975 7f002ba16800 -1 osd.3 0 OSD:init: unable to mount object store
2017-01-09 21:21:24.828991 7f002ba16800 -1 ** ERROR: osd init failed: (13) Permission denied
很明显又是权限问题,这个就简单了 ;
看看 filestore的目录,然后发现日志目录指向是一个磁盘/dev/sdb1
lrwxrwxrwx 1 root root 9 Jan 8 20:13 journal -> /dev/sdb1
因为磁盘默认属主和是root,所以ceph用户是无法读写的;
解决方法:
1) chmod a+rw /dev/sdb1
2) ceph-deploy osd activate ceph4:/path/to/osddata:/dev/sdb1