Ceph osd boot error osd init failed (36) File name too long

Keywords: Big Data osd Ceph

1. Problem phenomena:
On Ceph's OSD node, the start of the OSD process failed and the following error message was seen in its log:

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. Problem analysis:
The reason for this error is that Ceph recommends XFS as a file system for OSD data storage, but my file system format is ext4, while ext4 has a limited size for xattrs storage. The OSD information can not be completely preserved.

3. Solutions:
a. OSD options for modifying Ceph configuration files. Add the following information to the global section of the Ceph configuration file. In the Ceph cluster, if the file system where OSD stores data is ext4, you need to modify the configuration file. Then restart the OSD service.

osd_max_object_name_len = 2048
osd_max_object_namespace_len = 256

b. Modify the file system to XFS

Posted by codeman on Wed, 23 Jan 2019 02:12:13 -0800