ceph创建osd失败
检查日志/var/log/messages报错mkfs fsck found fatal error: (5) Input/output error
Aug 17 10:08:51 localhost sh: command_check_call: Running command: /usr/bin/ceph-osd --cluster ceph --mkfs -i 0 --monmap /var/lib/ceph/tmp/mnt.nSTAMT/activate.monmap --osd-data /var/lib/ceph/tmp/mnt.nSTAMT --osd-uuid cc985e09-c344-4805-96e9-367d933a0426 --setuser ceph --setgroup ceph
Aug 17 10:08:51 localhost sh: 2020-08-17 10:08:50.787749 7f71a6d15d80 -1 bluestore(/var/lib/ceph/tmp/mnt.nSTAMT/block) _check_or_set_bdev_label bdev /var/lib/ceph/tmp/mnt.nSTAMT/block fsid 4beaa377-63e0-4ce9-a72d-ad3a5bd27fe3 does not match our fsid cc985e09-c344-4805-96e9-367d933a0426
Aug 17 10:08:51 localhost sh: 2020-08-17 10:08:51.041923 7f71a6d15d80 -1 bluestore(/var/lib/ceph/tmp/mnt.nSTAMT) mkfs fsck found fatal error: (5) Input/output error
Aug 17 10:08:51 localhost sh: 2020-08-17 10:08:51.041986 7f71a6d15d80 -1 OSD::mkfs: ObjectStore::mkfs failed with error (5) Input/output error
Aug 17 10:08:51 localhost sh: 2020-08-17 10:08:51.042178 7f71a6d15d80 -1 #033[0;31m ** ERROR: error creating empty object store in /var/lib/ceph/tmp/mnt.nSTAMT: (5) Input/output error#033[0m
Aug 17 10:08:51 localhost sh: mount_activate: Failed to activate
解决方法
ceph-disk zap /dev/sdl
sgdisk -Z /dev/sdl