Actions
Bug #3052
closedceph-osd --mkfs fails on ext3
% Done:
0%
Source:
Development
Tags:
Backport:
Regression:
Severity:
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):
Description
node02:/data/ceph_backend# ceph-osd -c /etc/ceph/ceph.conf -i 1 --mkfs --monmap /tmp/monmap --mkkey 2012-08-26 23:43:24.572064 f733e710 -1 filestore(/data/ceph_backend/osd) mkfs: BTRFS_IOC_SUBVOL_CREATE failed with error (22) Invalid argument 2012-08-26 23:43:24.572088 f733e710 -1 OSD::mkfs: FileStore::mkfs failed with error -22 2012-08-26 23:43:24.572104 f733e710 -1 ** ERROR: error creating empty object store in /data/ceph_backend/osd: (22) Invalid argument
It looks as if ext3 is returning EINVAL instead of the expected EOPNOTSUPP.
Updated by Dan Mick over 11 years ago
IRC user mrjack_ confirms that this (from Greg) fixes the problem:
diff --git a/src/os/FileStore.cc b/src/os/FileStore.cc
index 42f4705..d947237 100644
--- a/src/os/FileStore.cc
+++ b/src/os/FileStore.cc
@ -1030,7 +1030,7
@ int FileStore::mkfs()
strcpy(volargs.name, "current");
if (::ioctl(basedir_fd, BTRFS_IOC_SUBVOL_CREATE, (unsigned long int)&volargs)) {
ret = -errno;
- if (ret -EOPNOTSUPP || ret -ENOTTY) {
+ if (ret < 0) {
dout(2) << " BTRFS_IOC_SUBVOL_CREATE ioctl failed, trying mkdir "
<< current_fn << dendl;
#endif
Updated by Sage Weil over 11 years ago
- Status changed from New to Fix Under Review
Updated by Sage Weil over 11 years ago
- Status changed from Fix Under Review to Resolved
Actions