Bug 2356526

Summary: `ceph-bluestore-tool show-label` fails with multiple devices if at least one of them doesn't have a valid label
Product: [Red Hat Storage] Red Hat Ceph Storage Reporter: Guillaume Abrioux <gabrioux>
Component: RADOSAssignee: Adam Kupczyk <akupczyk>
Status: CLOSED ERRATA QA Contact: Harsh Kumar <hakumar>
Severity: high Docs Contact:
Priority: unspecified    
Version: 8.1CC: bhubbard, ceph-eng-bugs, cephqe-warriors, nojha, rzarzyns, tserlin, vumrao
Target Milestone: ---   
Target Release: 8.1   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ceph-19.2.1-87.el9cp Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2025-06-26 12:21:44 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Guillaume Abrioux 2025-04-01 09:35:41 UTC
`ceph-bluestore-tool` can show bluestore labels from a single device like :

```
# ceph-bluestore-tool show-label --dev /dev/sdh
{
    "/dev/sdh": {
        "osd_uuid": "197aadbd-fbee-410d-9d61-5bca5919234b",
        "size": 536870912000,
        "btime": "2025-03-26T21:47:37.623426+0000",
        "description": "main",
        "bfm_blocks": "131072000",
        "bfm_blocks_per_key": "128",
        "bfm_bytes_per_block": "4096",
        "bfm_size": "536870912000",
        "bluefs": "1",
        "ceph_fsid": "c34d9fc5-5f32-4806-8ac5-d4f4ee2e71a5",
        "ceph_version_when_created": "ceph version 18.2.1-278.el9cp (2ae16095654f99a1a043ca3f0c7befcb78080058) reef (stable)",
        "created_at": "2025-03-26T21:47:42.917807Z",
        "kv_backend": "rocksdb",
        "magic": "ceph osd volume v026",
        "mkfs_done": "yes",
        "osd_key": "AQD0deRn6hUoOxAAwwxCIFLUpsY4NT4NMQt8eA==",
        "ready": "ready",
        "require_osd_release": "18",
        "type": "bluestore-rdr",
        "whoami": "0"
    }
}
```


and can also be passed multiple devices. The issue is that, regardless of whether devices with valid labels are provided, if even one of them doesn't have a valid label, it fails with the following error:


```
# ceph-bluestore-tool show-label --dev /dev/sda --dev /dev/sdh
2025-03-31T16:22:45.557+0000 3ffacce5c00 -1 bluestore(/dev/sda) _read_bdev_label /dev/sda data at 0, unable to decode label
2025-03-31T16:22:45.557+0000 3ffacce5c00 -1 bluestore(/dev/sda) _read_bdev_label /dev/sda data at 40000000, unable to decode label
2025-03-31T16:22:45.557+0000 3ffacce5c00 -1 bluestore(/dev/sda) _read_bdev_label /dev/sda data at 280000000, unable to decode label
2025-03-31T16:22:45.557+0000 3ffacce5c00 -1 bluestore(/dev/sda) _read_bdev_label /dev/sda data at 1900000000, unable to decode label
2025-03-31T16:22:45.557+0000 3ffacce5c00 -1 bluestore(/dev/sda) No valid bdev label found
unable to read label for /dev/sda: (2) No such file or directory
```

Comment 5 errata-xmlrpc 2025-06-26 12:21:44 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Important: Red Hat Ceph Storage 8.1 security, bug fix, and enhancement updates), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2025:9775