Actions
Bug #24661
closedos/bluestore: don't store/use path_block.{db,wal} from meta
% Done:
0%
Source:
Tags:
Backport:
mimic,luminous
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):
Description
This reverts most of 8d07fa5.
ceph-volume goes to great lengths to ensure that the symlinks in the
osd dir are accurate. Having these values here is an opportunity to
get them out of sync. And that can happen very easily if the initial
mkfs was performed using a /dev/sdX device name (which is unstable
across reboots). Even after ceph-volume corrects the symlink, bluestore
will continue to use the stale device path.
Updated by Alfredo Deza almost 6 years ago
The PR didn't have an issue attached to it.
(merged) Master PR https://github.com/ceph/ceph/pull/22462
(merged) Backport to Mimic https://github.com/ceph/ceph/pull/22477
I was unable to backport to Luminous as it has conflicts I couldn't resolve on the C++ side.
diff --cc src/os/bluestore/BlueStore.cc index 55a8351e67,9228a9da52..0000000000 --- a/src/os/bluestore/BlueStore.cc +++ b/src/os/bluestore/BlueStore.cc @@@ -4557,11 -4725,10 +4557,9 @@@ int BlueStore::_open_db(bool create string bfn; struct stat st; - if (read_meta("path_block.db", &bfn) < 0) { - bfn = path + "/block.db"; - } + bfn = path + "/block.db"; if (::stat(bfn.c_str(), &st) == 0) { - r = bluefs->add_block_device(BlueFS::BDEV_DB, bfn, - create && cct->_conf->bdev_enable_discard); + r = bluefs->add_block_device(BlueFS::BDEV_DB, bfn); if (r < 0) { derr << __func__ << " add block device(" << bfn << ") returned: " << cpp_strerror(r) << dendl; @@@ -4598,10 -4765,9 +4596,22 @@@ } // shared device ++<<<<<<< HEAD + if (read_meta("path_block", &bfn) < 0) { + bfn = path + "/block"; + } + r = bluefs->add_block_device(bluefs_shared_bdev, bfn); ++||||||| parent of ef510e43f0... os/bluestore: don't store/use path_block.{db,wal} from meta ++ if (read_meta("path_block", &bfn) < 0) { ++ bfn = path + "/block"; ++ } ++ // never trim here ++ r = bluefs->add_block_device(bluefs_shared_bdev, bfn, false); ++======= + bfn = path + "/block"; + // never trim here + r = bluefs->add_block_device(bluefs_shared_bdev, bfn, false); ++>>>>>>> ef510e43f0... os/bluestore: don't store/use path_block.{db,wal} from meta if (r < 0) { derr << __func__ << " add block device(" << bfn << ") returned: " << cpp_strerror(r) << dendl; @@@ -4629,11 -4795,10 +4639,9 @@@ bluefs_extents.insert(start, initial); } - if (read_meta("path_block.wal", &bfn) < 0) { - bfn = path + "/block.wal"; - } + bfn = path + "/block.wal"; if (::stat(bfn.c_str(), &st) == 0) { - r = bluefs->add_block_device(BlueFS::BDEV_WAL, bfn, - create && cct->_conf->bdev_enable_discard); + r = bluefs->add_block_device(BlueFS::BDEV_WAL, bfn); if (r < 0) { derr << __func__ << " add block device(" << bfn << ") returned: " << cpp_strerror(r) << dendl;
Updated by Sage Weil almost 6 years ago
- Status changed from New to Fix Under Review
Updated by Alfredo Deza almost 6 years ago
- Status changed from Fix Under Review to Resolved
Updated by Nathan Cutler almost 6 years ago
- Status changed from Resolved to Pending Backport
- Backport changed from luminous to mimic,luminous
Updated by Nathan Cutler almost 6 years ago
- Copied to Backport #24749: mimic: os/bluestore: don't store/use path_block.{db,wal} from meta added
Updated by Nathan Cutler almost 6 years ago
- Copied to Backport #24750: luminous: os/bluestore: don't store/use path_block.{db,wal} from meta added
Updated by Nathan Cutler almost 6 years ago
- Status changed from Pending Backport to Resolved
Actions