From 386d51f04f6f3976df7f003dccb2be1b42ad867f Mon Sep 17 00:00:00 2001 From: Igor Fedotov Date: Mon, 8 Apr 2019 21:54:25 +0300 Subject: [PATCH] os/bluestore_tool: bluefs-bdev-expand: indicate bypassed for main dev Pre-nautilis releases are unable to expand main device but they do not report about that hence user thinks expansion succeeds. Which is confusing. Fixes: https://tracker.ceph.com/issues/39144 Signed-off-by: Igor Fedotov --- src/os/bluestore/bluestore_tool.cc | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/os/bluestore/bluestore_tool.cc b/src/os/bluestore/bluestore_tool.cc index b8ac75e9292e7..8f49fe5280c84 100644 --- a/src/os/bluestore/bluestore_tool.cc +++ b/src/os/bluestore/bluestore_tool.cc @@ -495,13 +495,15 @@ int main(int argc, char **argv) BlueFS *fs = open_bluefs(cct.get(), path, devs); fs->dump_block_extents(cout); cout << "Expanding..." << std::endl; - for (int devid : { BlueFS::BDEV_WAL, BlueFS::BDEV_DB }) { + + // enumerate BDEV_SLOW to report it's unexpandable only + for (int devid : { BlueFS::BDEV_WAL, BlueFS::BDEV_DB, BlueFS::BDEV_SLOW }) { if (!fs->is_device(devid)) { continue; } if (!fs->is_device_expandable(devid)) { cout << devid - << " : can't be expanded. Bypassing..." + << " : unable to expand. Bypassed." << std::endl; continue; } @@ -538,6 +540,11 @@ int main(int argc, char **argv) cout << devid <<" : size label updated to " << size << std::endl; + } else { + cout << devid + << " : no changes detected. Bypassed." + << std::endl; + continue; } } delete fs; -- 2.39.5