Ceph osd啟動報錯osd init failed (36) File name too long
阿新 • • 發佈:2018-12-18
1、問題現象: 在Ceph的OSD節點上,啟動OSD程序失敗,在其日誌中看到如下報錯資訊:
2017-02-14 16:26:13.558535 7fe3883f58c0 0 filestore(/var/lib/ceph/osd/ceph-1) mount: enabling WRITEAHEAD journal mode: checkpoint is not enabled 2017-02-14 16:26:13.558712 7fe3883f58c0 -1 journal FileJournal::_open: disabling aio for non-block journal. Use journal_force_aio to force use of aio anyway 2017-02-14 16:26:13.558714 7fe3883f58c0 1 journal _open /var/lib/ceph/osd/ceph-1/journal fd 18: 5368709120 bytes, block size 4096 bytes, directio = 1, aio = 0 2017-02-14 16:26:13.558866 7fe3883f58c0 1 journal _open /var/lib/ceph/osd/ceph-1/journal fd 18: 5368709120 bytes, block size 4096 bytes, directio = 1, aio = 0 2017-02-14 16:26:13.559190 7fe3883f58c0 1 filestore(/var/lib/ceph/osd/ceph-1) upgrade 2017-02-14 16:26:13.559342 7fe3883f58c0 -1 osd.1 0 backend (filestore) is unable to support max object name[space] len 2017-02-14 16:26:13.559348 7fe3883f58c0 -1 osd.1 0 osd max object name len = 2048 2017-02-14 16:26:13.559350 7fe3883f58c0 -1 osd.1 0 osd max object namespace len = 256 2017-02-14 16:26:13.559353 7fe3883f58c0 -1 osd.1 0 (36) File name too long 2017-02-14 16:26:13.559863 7fe3883f58c0 1 journal close /var/lib/ceph/osd/ceph-1/journal 2017-02-14 16:26:13.560411 7fe3883f58c0 -1 ^[[0;31m ** ERROR: osd init failed: (36) File name too long
2、問題分析: 這個錯誤的原因是Ceph官網建議使用XFS作為OSD儲存資料的檔案系統,但是我的檔案系統格式是ext4,而ext4儲存xattrs的大小是有限制的。使得OSD資訊不能完全的儲存。
3、解決方案: a、修改Ceph配置檔案的OSD選項。將下面的資訊新增到Ceph的配置檔案global section中,Ceph叢集中,如果OSD儲存資料的檔案系統是ext4,都需要修改配置檔案。然後重啟OSD服務。
osd_max_object_name_len = 2048
osd_max_object_namespace_len = 256
b、將檔案系統修改為XFS