During the lxd init I tried to set the stogage backend as brtfs on an external disk same as purposed by this command. The path filled is /dev/disk/by-label/mylabel
The command as me for other questions after and fail during the creation of the mkfs.btrfs and return this error:
Error: Failed to create storage pool ‘default’: failed to format block device: Failed to run: mkfs.btrfs /dev/disk/by-label/mylabel -L default: /dev/disk/by-label/mylabel appears to contain an existing filesystem (brtfs).
Error: use the -f option to force overwrite of /dev/disk/by-label/mylabel
The help of lxd init not provide info about this parameter (note that the help have an error too because it purpose a --version option that doesn’t work). If anyone have an idea about how to force the creation of the FS.
Look closely at the error, the message comes from mkfs.btrfs, not from LXD itself.
It’s telling you the partition you passed has already been formatted and so refuses to format it again as that may cause data loss. If you know the partition doesn’t contain anything and is safe to use, then you’ll need to clear its header with something like dd if=/dev/zero of=/dev/disk/by-label/mylabel bs=4M count=10 (writes zeroes on the first 40MB of the partition).
My main goal here is to reconfigure my default lxd settings same as I tried to do when I attempt to create a new one with lxd init. I just try to set lxd to not work on my internal ssd but in an extrernal disk.
Do you think it’s more intresting in my case to uninstall the lxd snap and reinstall it from scratch or try to reconfigure the storage as explained to also get the stability? I have nothing to keep for the moment.