由于停电,重起后osd无法挂起来,本来只执行也下就可以重新激活了
sudo chown ceph:ceph /dev/sdd1
sudo chown ceph:ceph /dev/sdi1
sudo chown ceph:ceph /dev/sdj1
sudo chown ceph:ceph /dev/sdh1
sudo chown ceph:ceph /dev/sde1
sudo chown ceph:ceph /dev/sdc1
sudo chown ceph:ceph /dev/sdk1
sudo chown ceph:ceph /dev/sdb1
sudo chown ceph:ceph /dev/sdf1
sudo chown ceph:ceph /dev/sdg1
sudo chown ceph:ceph /dev/sdl1
sudo chown -R ceph:ceph /var/lib/ceph
sudo chmod +r /etc/ceph/ceph.client.admin.keyring
sudo ceph-disk activate /dev/sdd2
sudo ceph-disk activate /dev/sdi2
sudo ceph-disk activate /dev/sdj2
sudo ceph-disk activate /dev/sdh2
sudo ceph-disk activate /dev/sde2
sudo ceph-disk activate /dev/sdc2
sudo ceph-disk activate /dev/sdk2
sudo ceph-disk activate /dev/sdb2
sudo ceph-disk activate /dev/sdf2
sudo ceph-disk activate /dev/sdg2
sudo ceph-disk activate /dev/sdl2
一开始把第一节点的osd.0~osd.10删除了,重新激活后出现
** ERROR: unable to open OSD superblock on /var/lib/ceph/osd/ceph-3: (2) No such file or directory
重新格式化
sudo ceph-disk prepare /dev/sdb2 /dev/sdb1
sudo ceph-disk prepare /dev/sdc2 /dev/sdc1
sudo ceph-disk prepare /dev/sdd2 /dev/sdd1
sudo ceph-disk prepare /dev/sde2 /dev/sde1
sudo ceph-disk prepare /dev/sdf2 /dev/sdf1
sudo ceph-disk prepare /dev/sdh2 /dev/sdh1
sudo ceph-disk prepare /dev/sdi2 /dev/sdi1
sudo ceph-disk prepare /dev/sdj2 /dev/sdj1
sudo ceph-disk prepare /dev/sdk2 /dev/sdk1
sudo ceph-disk prepare /dev/sdl2 /dev/sdl1
重新激活可以了