Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

microceph disk list doesn't show virtio drives available #506

Open
nobuto-m opened this issue Feb 9, 2025 · 3 comments
Open

microceph disk list doesn't show virtio drives available #506

nobuto-m opened this issue Feb 9, 2025 · 3 comments
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@nobuto-m
Copy link
Contributor

nobuto-m commented Feb 9, 2025

microceph 19.2.0+snap9ecc402e1e 1280 squid/edge canonical✓ -

Coming from a Sunbeam issue:
https://bugs.launchpad.net/snap-openstack/+bug/2095570
and I believe this microceph issue is the root cause of it. The scenario is mainly for the testing purpose though.

How to reproduce.

uvt-simplestreams-libvirt sync release=noble arch=amd64
uvt-kvm create --cpu 4 --memory 4096 --ephemeral 16 foo release=noble

uvt-kvm wait foo
uv-kvm ssh foo

/dev/vdc is un-partitioned and unused.

$ lsblk -f
NAME    FSTYPE  FSVER            LABEL           UUID                                 FSAVAIL FSUSE% MOUNTPOINTS
vda
├─vda1  ext4    1.0              cloudimg-rootfs 314dc64b-478e-4831-8f35-5640abff7e09    5.1G    24% /
├─vda14
├─vda15 vfat    FAT32            UEFI            53CC-ADDA                              98.2M     6% /boot/efi
└─vda16 ext4    1.0              BOOT            eb7ca90e-1f45-4605-a740-d47fe1f8e5b3  757.8M     7% /boot
vdb     iso9660 Joliet Extension cidata          2025-02-09-12-17-59-00
vdc

But no disk is detected by microceph.

sudo snap install microceph --channel squid/edge

sudo microceph cluster bootstrap

$ sudo microceph disk list --json
{"ConfiguredDisks":[],"AvailableDisks":[]}
Copy link

Thank you for reporting your feedback to us!

The internal ticket has been created: https://warthogs.atlassian.net/browse/CEPH-1169.

This message was autogenerated

@nobuto-m
Copy link
Contributor Author

nobuto-m commented Feb 9, 2025

Even though virtio drives do not show up as available disks, those virtio drives can be initiated as OSDs since there is no cross-check with available disks in disk add (#507).

$ sudo microceph disk list 
Disks configured in MicroCeph:
+-----+-------------------+-------------------------------------------+
| OSD |     LOCATION      |                   PATH                    |
+-----+-------------------+-------------------------------------------+
| 1   | sunbeam-machine-1 | /dev/disk/by-path/virtio-pci-0000:06:00.0 |
+-----+-------------------+-------------------------------------------+

Available unpartitioned disks on this system:
+---------------+-----------+------+-------------------------------------------------+
|     MODEL     | CAPACITY  | TYPE |                      PATH                       |
+---------------+-----------+------+-------------------------------------------------+
| QEMU HARDDISK | 128.00GiB | scsi | /dev/disk/by-id/scsi-SATA_QEMU_HARDDISK_QM00001 |
+---------------+-----------+------+-------------------------------------------------+

vdc(/dev/disk/by-path/virtio-pci-0000:06:00.0) was unavailable but was initiated successfully as OSD. But vdd(/dev/disk/by-path/virtio-pci-0000:07:00.0) doesn't show up still.

$ lsblk -f /dev/vdc /dev/vdd
NAME
    FSTYPE         FSVER LABEL UUID FSAVAIL FSUSE% MOUNTPOINTS
vdc ceph_bluestore                                 
vdd                                                

@UtkarshBhatthere
Copy link
Contributor

MicroCeph filtering out the virtio block device is a bug, it still allowing the disk to be enrolled is as per intention (to allow for an operator to enroll a block device as OSD even if microceph does not deem it fit).

The fix should be to make microceph list the virtio disk as it is larger than the threshold for OSD devices (2GB).

I can reproduce this:

$ sudo apt -y install uvtool
$ sudo uvt-simplestreams-libvirt sync release=noble arch=amd64
$ sudo uvt-kvm create --cpu 4 --memory 4096 --ephemeral 16 foo release=noble
$ sudo uvt-kvm wait foo
$ sudo uvt-kvm ssh foo
$ $ lsblk
NAME    MAJ:MIN RM  SIZE RO TYPE MOUNTPOINTS
vda     253:0    0    8G  0 disk
├─vda1  253:1    0    7G  0 part /
├─vda14 253:14   0    4M  0 part
├─vda15 253:15   0  106M  0 part /boot/efi
└─vda16 259:0    0  913M  0 part /boot
vdb     253:16   0  372K  0 disk
vdc     253:32   0   16G  0 disk

# install microceph and proceed
$ sudo snap install microceph
$ $ sudo microceph disk list --json
{"ConfiguredDisks":[],"AvailableDisks":[]}
$ sudo microceph disk add /dev/vdc

+----------+---------+
|   PATH   | STATUS  |
+----------+---------+
| /dev/vdc | Success |
+----------+---------+

@UtkarshBhatthere UtkarshBhatthere added bug Something isn't working good first issue Good for newcomers labels Feb 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants