Actions
Bug #38935
openceph-volume v12.2.10 OSError(no such file or directory) when try to create an osd
Status:
New
Priority:
Normal
Assignee:
-
Target version:
-
% Done:
0%
Source:
Community (user)
Tags:
ceph-volume luminous v12.2.10
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):
Description
i try to use ceph-volume to create an osd manually,Command is as follows
ceph-volume lvm create --data /dev/vdc --osd-id=0 --bluestore
but it return an OSError
OSError: (2, 'No such file or directory', '/var/lib/ceph/osd/ceph-0')
so i read the ceph-volume source code,and it found the reason in src/ceph_volume/util/system.py line:86
def mkdir_p(path, chown=True): """ A `mkdir -p` that defaults to chown the path to the ceph user """ try: os.mkdir(path) except OSError as e: if e.errno == errno.EEXIST: pass else: raise if chown: uid, gid = get_ceph_user_ids() os.chown(path, uid, gid)
it use os.mkdir(path) method to create dir,but actually /var/lib/ceph/osd is not exist, so may be it should use
os.mkdirs(path)
and it really work
Actions