canonical / microceph

Ceph for a one-rack cluster and appliances

Home Page:https://snapcraft.io/microceph

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

WAL/DB Devices appear as available devices for Disk List output.

UtkarshBhatthere opened this issue · comments

Issue report

As displayed in the output below, we can see that the disks albeit being used as WAL/DB devices appear as available disks in the disk list command output. This could be problematic since this a user may issue disk add --wipe for these disks.

ubuntu@juju-a06f22-mcu-0:~$ sudo microceph disk list
Disks configured in MicroCeph:
+-----+-------------------+---------------------------------------------+
| OSD |     LOCATION      |                    PATH                     |
+-----+-------------------+---------------------------------------------+
| 1   | juju-a06f22-mcu-0 | /dev/disk/by-id/virtio-7ae68416-c5f8-489a-a |
+-----+-------------------+---------------------------------------------+
| 2   | juju-a06f22-mcu-0 | /dev/loop5                                  |
+-----+-------------------+---------------------------------------------+

Available unpartitioned disks on this system:
+-------+----------+--------+---------------------------------------------+
| MODEL | CAPACITY |  TYPE  |                    PATH                     |
+-------+----------+--------+---------------------------------------------+
|       | 2.00GiB  | virtio | /dev/disk/by-id/virtio-748c628b-40e6-4e08-b |
+-------+----------+--------+---------------------------------------------+
|       | 2.00GiB  | virtio | /dev/disk/by-id/virtio-cad31649-91ab-4126-9 |
+-------+----------+--------+---------------------------------------------+
ubuntu@juju-a06f22-mcu-0:~$ sudo su
root@juju-a06f22-mcu-0:/home/ubuntu# ll /var/snap/microceph/common/data/osd/ceph-2/
total 72
...
lrwxrwxrwx 1 root root   10 Feb  9 08:04 block -> /dev/loop5
lrwxrwxrwx 1 root root   43 Feb  9 08:04 block.db -> /dev/disk/by-id/virtio-748c628b-40e6-4e08-b
lrwxrwxrwx 1 root root   43 Feb  9 08:04 block.wal -> /dev/disk/by-id/virtio-cad31649-91ab-4126-9
...

What version of MicroCeph are you using ?

channel=reef/edge

What are the steps to reproduce this issue ?

  1. Deploy and Bootstrap Microceph
  2. Invoke Disk Add command with --wal and --db params
  3. Invoke Disk List

What happens (observed behaviour) ?

WAL/DB Devices are being shown as available devices.

What were you expecting to happen ?

Used WAL/DB devices should not be shown as available devices.

Relevant logs, error output, etc.

NA

Additional comments.

NA

In a similar vein, disk list will also include mounted disks, likely we want to exclude them as well for the "Available" list