Ubuntu 14.04.1에서 Ceph OSD는 항상 '다운'됩니다.

Ubuntu 14.04.1에서 Ceph OSD는 항상 '다운'됩니다.

ceph 클러스터를 설치하고 배포하려고 합니다. 물리적 서버가 충분하지 않기 때문에 공식 Ubuntu 14.04 이미지를 사용하여 OpenStack에 4개의 VM을 만듭니다. ceph 버전을 사용하여 모니터 노드 1개와 OSD 노드 3개가 있는 클러스터를 배포하고 싶습니다 0.80.7-0ubuntu0.14.04.1. 나는 다음 단계를 따랐다.수동 배포 문서, 모니터 노드를 성공적으로 설치했습니다. 그러나 OSD 노드 설치 후 OSD 데몬이 실행 중이지만 모니터 노드에 올바르게 보고되지 않는 것 같습니다. osd 트리는 down내가 command 를 요청할 때 항상 표시됩니다 ceph --cluster cephcluster1 osd tree.

다음은 내 문제와 관련이 있을 수 있는 명령 및 해당 결과입니다.

root@monitor:/home/ubuntu# ceph --cluster cephcluster1 osd tree
# id    weight  type name       up/down reweight
-1      3       root default
-2      1               host osd1
0       1                       osd.0   down    1
-3      1               host osd2
1       1                       osd.1   down    1
-4      1               host osd3
2       1                       osd.2   down    1

root@monitor:/home/ubuntu# ceph --cluster cephcluster1 -s
    cluster fd78cbf8-8c64-4b12-9cfa-0e75bc6c8d98
     health HEALTH_WARN 192 pgs stuck inactive; 192 pgs stuck unclean; 3/3 in osds are down
     monmap e1: 1 mons at {monitor=172.26.111.4:6789/0}, election epoch 1, quorum 0 monitor
     osdmap e21: 3 osds: 0 up, 3 in
      pgmap v22: 192 pgs, 3 pools, 0 bytes data, 0 objects
            0 kB used, 0 kB / 0 kB avail
                 192 creating

/etc/ceph/cephcluster1.conf모든 노드의 구성 파일 :

[global]
fsid = fd78cbf8-8c64-4b12-9cfa-0e75bc6c8d98
mon initial members = monitor
mon host = 172.26.111.4
public network = 10.5.0.0/16
cluster network = 172.26.111.0/24
auth cluster required = cephx
auth service required = cephx
auth client required = cephx
osd journal size = 1024
filestore xattr use omap = true
osd pool default size = 2
osd pool default min size = 1
osd pool default pg num = 333
osd pool default pgp num = 333
osd crush chooseleaf type = 1

[osd]
osd journal size = 1024

[osd.0]
osd host = osd1

[osd.1]
osd host = osd2

[osd.2]
osd host = osd3

OSD ID가 start ceph-osd cluster=cephcluster1 id=x어디에 있는지를 통해 osd 데몬 중 하나를 시작할 때 기록합니다 .x

OSD 노드 #1의 /var/log/ceph/cephcluster1-osd.0.log:

2015-02-11 09:59:56.626899 7f5409d74800  0 ceph version 0.80.7 (6c0127fcb58008793d3c8b62d925bc91963672a3), process ceph-osd, pid 11230
2015-02-11 09:59:56.646218 7f5409d74800  0 genericfilestorebackend(/var/lib/ceph/osd/cephcluster1-0) detect_features: FIEMAP ioctl is supported and appears to work
2015-02-11 09:59:56.646372 7f5409d74800  0 genericfilestorebackend(/var/lib/ceph/osd/cephcluster1-0) detect_features: FIEMAP ioctl is disabled via 'filestore fiemap' config option
2015-02-11 09:59:56.658227 7f5409d74800  0 genericfilestorebackend(/var/lib/ceph/osd/cephcluster1-0) detect_features: syncfs(2) syscall fully supported (by glibc and kernel)
2015-02-11 09:59:56.679515 7f5409d74800  0 filestore(/var/lib/ceph/osd/cephcluster1-0) limited size xattrs
2015-02-11 09:59:56.699721 7f5409d74800  0 filestore(/var/lib/ceph/osd/cephcluster1-0) mount: enabling WRITEAHEAD journal mode: checkpoint is not enabled
2015-02-11 09:59:56.700107 7f5409d74800 -1 journal FileJournal::_open: disabling aio for non-block journal.  Use journal_force_aio to force use of aio anyway
2015-02-11 09:59:56.700454 7f5409d74800  1 journal _open /var/lib/ceph/osd/cephcluster1-0/journal fd 20: 1073741824 bytes, block size 4096 bytes, directio = 1, aio = 0
2015-02-11 09:59:56.704025 7f5409d74800  1 journal _open /var/lib/ceph/osd/cephcluster1-0/journal fd 20: 1073741824 bytes, block size 4096 bytes, directio = 1, aio = 0
2015-02-11 09:59:56.704884 7f5409d74800  1 journal close /var/lib/ceph/osd/cephcluster1-0/journal
2015-02-11 09:59:56.725281 7f5409d74800  0 genericfilestorebackend(/var/lib/ceph/osd/cephcluster1-0) detect_features: FIEMAP ioctl is supported and appears to work
2015-02-11 09:59:56.725397 7f5409d74800  0 genericfilestorebackend(/var/lib/ceph/osd/cephcluster1-0) detect_features: FIEMAP ioctl is disabled via 'filestore fiemap' config option
2015-02-11 09:59:56.736445 7f5409d74800  0 genericfilestorebackend(/var/lib/ceph/osd/cephcluster1-0) detect_features: syncfs(2) syscall fully supported (by glibc and kernel)
2015-02-11 09:59:56.756912 7f5409d74800  0 filestore(/var/lib/ceph/osd/cephcluster1-0) limited size xattrs
2015-02-11 09:59:56.776471 7f5409d74800  0 filestore(/var/lib/ceph/osd/cephcluster1-0) mount: WRITEAHEAD journal mode explicitly enabled in conf
2015-02-11 09:59:56.776748 7f5409d74800 -1 journal FileJournal::_open: disabling aio for non-block journal.  Use journal_force_aio to force use of aio anyway
2015-02-11 09:59:56.776848 7f5409d74800  1 journal _open /var/lib/ceph/osd/cephcluster1-0/journal fd 21: 1073741824 bytes, block size 4096 bytes, directio = 1, aio = 0
2015-02-11 09:59:56.777069 7f5409d74800  1 journal _open /var/lib/ceph/osd/cephcluster1-0/journal fd 21: 1073741824 bytes, block size 4096 bytes, directio = 1, aio = 0
2015-02-11 09:59:56.783019 7f5409d74800  0 <cls> cls/hello/cls_hello.cc:271: loading cls_hello
2015-02-11 09:59:56.783584 7f5409d74800  0 osd.0 11 crush map has features 1107558400, adjusting msgr requires for clients
2015-02-11 09:59:56.783645 7f5409d74800  0 osd.0 11 crush map has features 1107558400 was 8705, adjusting msgr requires for mons
2015-02-11 09:59:56.783687 7f5409d74800  0 osd.0 11 crush map has features 1107558400, adjusting msgr requires for osds
2015-02-11 09:59:56.783750 7f5409d74800  0 osd.0 11 load_pgs
2015-02-11 09:59:56.783831 7f5409d74800  0 osd.0 11 load_pgs opened 0 pgs
2015-02-11 09:59:56.792167 7f53f9b57700  0 osd.0 11 ignoring osdmap until we have initialized
2015-02-11 09:59:56.792334 7f53f9b57700  0 osd.0 11 ignoring osdmap until we have initialized
2015-02-11 09:59:56.792838 7f5409d74800  0 osd.0 11 done with init, starting boot process

모니터 노드의 /var/log/ceph/ceph-mon.monitor.log:

2015-02-11 09:59:56.593494 7f24cc41d700  0 mon.monitor@0(leader) e1 handle_command mon_command({"prefix": "osd crush create-or-move", "args": ["host=osd1", "root=default"], "id": 0, "weight": 0.05} v 0) v1
2015-02-11 09:59:56.593955 7f24cc41d700  0 mon.monitor@0(leader).osd e21 create-or-move crush item name 'osd.0' initial_weight 0.05 at location {host=osd1,root=default}

동일한 설치 단계로 Ubuntu 14.04에서 CentOS 6.6으로 환경을 변경하면 ceph OSD가 up정상적으로 표시되지만 CentOS보다 Ubuntu에 더 익숙하기 때문에 이 문제를 해결하고 싶습니다.

어떤 제안이라도 감사하겠습니다. 정말 감사합니다!

답변1

나는 거의 동일한 환경에서 동일한 문제를 경험했습니다. 나마지막으로문제를 엉망인 OSD UUID로 추적했습니다. 이를 알 수 있는 것은 MON 로그(OSD 로그 아님!)에 다음 줄이 있었습니다.

... mon.minion-001@0(leader).osd e75 preprocess_boot from osd.0 10.208.66.2:6800/3427 clashes with existing osd: different fsid (ours: 71b33e7f-b464-4ba9-96b3-8c814921fea2 ; theirs: 5401be6f-b4ff-42ef-8531-78ee73772d5b)

먼저 OSD를 수동으로 제거하고 파일 시스템을 파괴한 후 처음부터 수동으로 다시 생성하여 문제를 해결했습니다. 문제가 어떻게 발생했는지는 나중에 추적해야 할 문제입니다.

제가 OSD를 설정하기 위해 꼭두각시를 사용했다는 사실과 그것이 엉망이 된 이유가 아마도 제 환경과 관련된 특정한 문제와 관련되어 있다는 사실을 고려하면, 겪고 있는 문제가 다른 문제일 가능성이 높다는 것을 의미합니다. 어쨌든 MON 로그. 하지만 ceph.conf에서 다음과 같이 지정하여 MON에서 디버깅을 활성화해야 합니다.

[mon]
        debug mon = 9

문제의 메시지는 레벨 7에 기록되므로 모든 것을 너무 복잡하게 만들지 않고도 더 많은 세부 정보를 제공할 수 있습니다.

@LoicDachary: 이 오류/경고 메시지를 레벨 0에 기록하는 것이 타당하지 않나요? 이 문제가 즉시 기록되었더라면 확실히 더 일찍 발견했을 것입니다.

관련 정보