Skip to content

Commit 1b431a3

Browse files
committed
tools/ceph-bluestore-tool: Allow show-label even if OSD is running
ceph-volume needs to query the devices for `ceph-volume raw list`. Signed-off-by: Adam Kupczyk <[email protected]>
1 parent c9c30bc commit 1b431a3

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/os/bluestore/BlueStore.cc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6928,6 +6928,10 @@ int BlueStore::read_bdev_label(
69286928
{
69296929
unique_ptr<BlockDevice> bdev(BlockDevice::create(
69306930
cct, path, nullptr, nullptr, nullptr, nullptr));
6931+
if (!bdev) {
6932+
return -EIO;
6933+
}
6934+
bdev->set_no_exclusive_lock();
69316935
int r = bdev->open(path);
69326936
if (r < 0)
69336937
return r;

0 commit comments

Comments
 (0)