今天安装ceph存储集群的时候遇到的问题:
激活osd:
ceph-deploy --overwrite-conf osd activate ceph2:/opt/osd-data/sas001:/dev/sdb1 ceph3:/opt/osd-data/sas002:/dev/sdb1
出现问题:
[ceph3][WARNIN] ceph_disk.main.Error: Error: ['ceph-osd', '--cluster', 'ceph', '--mkfs', '--mkkey', '-i', '1', '--monmap', '/opt/osd-data/sas003/activate.monmap', '--osd-data', '/opt/osd-data/sas003', '--osd-journal', '/opt/osd-data/sas003/journal', '--osd-uuid', '1c9f4a41-5bb9-4e8a-bc5d-e230be0dcc03', '--keyring', '/opt/osd-data/sas003/keyring', '--setuser', 'ceph', '--setgroup', 'ceph'] failed : 2017-01-08 17:33:42.310652 7fe77ba11800 -1 filestore(/opt/osd-data/sas003) mkjournal error creating journal on /opt/osd-data/sas003/journal: (13) Permission denied
[ceph3][WARNIN] 2017-01-08 17:33:42.310675 7fe77ba11800 -1 OSD::mkfs: ObjectStore::mkfs failed with error -13
[ceph3][WARNIN] 2017-01-08 17:33:42.310742 7fe77ba11800 -1 ** ERROR: error creating empty object store in /opt/osd-data/sas003: (13) Permission denied
可能原因:
1、/opt/osd-data/sas没有读写权限;
2、/opt/osd-data/sas的属主和属组不是ceph用户;
3、ceph用户无法在/dev/sdb1读写;
解决方法:
1) chmod 777 /opt/osd-data/sas001
2) chown ceph:ceph /opt/osd-data/sas001
3) chmod a+rw /dev/sdb1