canonical/microcloud

LXD fails to pickup non-pristine disks

ethanmye-rs opened this issue · 16 comments

In the microcloud init screen, the wizard seems to fail to pickup non-pristine disks. It offers to wipe the disk in the next screen, so I assume this is a bug. If I wipe a non-pristine disk with:

sudo wipefs -a /dev/sdb && sudo dd if=/dev/zero of=/dev/sdb bs=4096 count=100 > /dev/null

then microcloud picks up the disk next time the wizard is run.

masnax commented

At the moment, MicroCloud won't pick up any partitioned disks. That will definitely change in the near-ish future.

masnax commented

We're close to having support for partitions on local (zfs) storage, but it seems ceph might take a bit longer:
canonical/microceph#251

For ZFS, we'll be able to add partition support once canonical/lxd#12537 is merged in LXD.

@masnax WRT to canonical/lxd#12537 why do we need to ascertain if the partition is mounted, as isn't microcloud only showing empty partitions anyway?

Because I couldn't add partitions as local storage during the microcloud init command, I chose "no" when asked about adding local storage. Microcloud completed initialization completely and it all looks great.

Is there a command I can execute to manually create the local storage pool and add the partitions from the cluster nodes?

At least until this new feature is ready?

masnax commented

Because I couldn't add partitions as local storage during the microcloud init command, I chose "no" when asked about adding local storage. Microcloud completed initialization completely and it all looks great.

Is there a command I can execute to manually create the local storage pool and add the partitions from the cluster nodes?

At least until this new feature is ready?

Sure, to create a local zfs storage pool like MicroCloud would, you can do the following:

Once on each system:

lxc storage create local zfs source=${disk_path} --target ${cluster_member_name}

And finally, from any system:

lxc storage create local zfs

Thanks for that, extremely helpful!

I noticed per the doco that there are default volumes (backups, images) tied to the target systems.

Are those required, or should I just skip them?

masnax commented

@masnax WRT to canonical/lxd#12537 why do we need to ascertain if the partition is mounted, as isn't microcloud only showing empty partitions anyway?

There's no way MicroCloud can know if the partitions are empty without LXD's super-privileges. So no it will list every single partition on the system. The list is ripped straight from lxd info --resources.

MicroCeph support for partitions is being tracked here canonical/microceph#251