Hi,
I have encountered the following situation, anyone any comment? I have checked two times and the mentioned device(sda) newly created and empty.
Regards.
root@pinehost1:~# lxd init
Would you like to use LXD clustering? (yes/no) [default=no]: yes
What IP address or DNS name should be used to reach this node? [default=192.168.1.20]:
Are you joining an existing cluster? (yes/no) [default=no]:
What name should be used to identify this node in the cluster? [default=pinehost1]:
Setup password authentication on the cluster? (yes/no) [default=no]:
Do you want to configure a new local storage pool? (yes/no) [default=yes]:
Name of the storage backend to use (btrfs, dir, lvm) [default=btrfs]:
Create a new BTRFS pool? (yes/no) [default=yes]:
Would you like to use an existing empty block device (e.g. a disk or partition)? (yes/no) [default=no]: yes
Path to the existing block device: /dev/sda
Do you want to configure a new remote storage pool? (yes/no) [default=no]:
Would you like to connect to a MAAS server? (yes/no) [default=no]:
Would you like to configure LXD to use an existing bridge or host interface? (yes/no) [default=no]:
Would you like stale cached images to be updated automatically? (yes/no) [default=yes]:
Would you like a YAML "lxd init" preseed to be printed? (yes/no) [default=no]:
Error: Failed to create storage pool "local": Failed to format block device: Failed to run: mkfs.btrfs -L local /dev/sda: /dev/sda appears to contain a partition table (dos).
ERROR: use the -f option to force overwrite of /dev/sda
Sure, actually the issue comes from when adding storage to the cluster. Here is another error message.
root@pinehost1:~# lxc storage create local btrfs
Error: Failed to format block device: Failed to run: mkfs.btrfs -L local /dev/sda1: /dev/sda1 appears to contain an existing filesystem (btrfs).
ERROR: use the -f option to force overwrite of /dev/sda1
root@pinehost3:~# fdisk -l /dev/sda
Disk /dev/sda: 14.5 GiB, 15552479232 bytes, 30375936 sectors
Disk model: Ultra Fit
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x00000000
Device Boot Start End Sectors Size Id Type
/dev/sda1 2048 30375935 30373888 14.5G 83 Linux
root@pinehost3:~# gdisk -l /dev/sda
GPT fdisk (gdisk) version 1.0.3
Partition table scan:
MBR: MBR only
BSD: not present
APM: not present
GPT: not present
***************************************************************
Found invalid GPT and valid MBR; converting MBR to GPT format
in memory.
***************************************************************
Warning! Secondary partition table overlaps the last partition by
33 blocks!
You will need to delete this partition or resize it in another utility.
Disk /dev/sda: 30375936 sectors, 14.5 GiB
Model: Ultra Fit
Sector size (logical/physical): 512/512 bytes
Disk identifier (GUID): C5E14FCA-448F-477E-809C-8142CC26209E
Partition table holds up to 128 entries
Main partition table begins at sector 2 and ends at sector 33
First usable sector is 34, last usable sector is 30375902
Partitions will be aligned on 2048-sector boundaries
Total free space is 2014 sectors (1007.0 KiB)
Number Start (sector) End (sector) Size Code Name
1 2048 30375935 14.5 GiB 8300 Linux filesystem