Closed UtkarshBhatthere closed 5 months ago
@lmlg capitalisation of error strings is against go conventions ST1005 I believe it is best to fix them as parts of PR changing those specific files (as opposed to creating Clean Code PRs just to fix style check errors). wdyt ?
@UtkarshBhatthere
Wrt. to checking if the device has loop
in its name, this is what I was referring to:
$ sudo microceph disk add /dev/loop5
+------------+---------+
| PATH | STATUS |
+------------+---------+
| /dev/loop5 | Failure |
+------------+---------+
Error: failed to add Disk /dev/loop5, path resembles loop spec
Using /dev/loopX devices is not an important use case but I'd still try to support it if we can
@sabaini aah, i confused it with a loop spec. I will change the filter string from loop
to 'loop,' that should be sufficient to fix this.
@sabaini the loop filter is now fixed.
root@ubuntu-ceph-VLWH-MQIA:~# sudo microceph disk add /dev/loop5
+------------+---------+
| PATH | STATUS |
+------------+---------+
| /dev/loop5 | Success |
+------------+---------+
root@ubuntu-ceph-VLWH-MQIA:~# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
loop0 7:0 0 74.1M 1 loop /snap/core22/1033
loop1 7:1 0 94.1M 1 loop /snap/microceph/x1
loop2 7:2 0 40.4M 1 loop /snap/snapd/20671
loop3 7:3 0 1G 0 loop
loop4 7:4 0 1G 0 loop
loop5 7:5 0 1G 0 loop
loop6 7:6 0 4G 0 loop
loop7 7:7 0 4G 0 loop
loop8 7:8 0 4G 0 loop
sda 8:0 0 18.6G 0 disk
├─sda1 8:1 0 100M 0 part /boot/efi
└─sda2 8:2 0 18.5G 0 part /
sdb 8:16 0 10G 0 disk
sdc 8:32 0 10G 0 disk
sdd 8:48 0 10G 0 disk
sr0 11:0 1 368K 0 rom
root@ubuntu-ceph-VLWH-MQIA:~# sudo microceph disk list
Disks configured in MicroCeph:
+-----+-----------------------+------------------------------------------------------------+
| OSD | LOCATION | PATH |
+-----+-----------------------+------------------------------------------------------------+
| 1 | ubuntu-ceph-VLWH-MQIA | /var/snap/microceph/common/data/osd/ceph-1/osd-backing.img |
+-----+-----------------------+------------------------------------------------------------+
| 2 | ubuntu-ceph-VLWH-MQIA | /var/snap/microceph/common/data/osd/ceph-2/osd-backing.img |
+-----+-----------------------+------------------------------------------------------------+
| 3 | ubuntu-ceph-VLWH-MQIA | /var/snap/microceph/common/data/osd/ceph-3/osd-backing.img |
+-----+-----------------------+------------------------------------------------------------+
| 7 | ubuntu-ceph-VLWH-MQIA | /dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_lxd_vol--9I1F |
+-----+-----------------------+------------------------------------------------------------+
| 8 | ubuntu-ceph-VLWH-MQIA | /dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_lxd_vol--EBBT |
+-----+-----------------------+------------------------------------------------------------+
| 9 | ubuntu-ceph-VLWH-MQIA | /dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_lxd_vol--XHB0 |
+-----+-----------------------+------------------------------------------------------------+
| 10 | ubuntu-ceph-VLWH-MQIA | /dev/loop5 |
+-----+-----------------------+------------------------------------------------------------+
Available unpartitioned disks on this system:
+-------+----------+------+------+
| MODEL | CAPACITY | TYPE | PATH |
+-------+----------+------+------+
root@ubuntu-ceph-VLWH-MQIA:~#
lgtm, cheers!