existing filesystem error on adding old btrfs storage volume into new ubuntu lxd install

1

lxc storage create default btrfs source=/dev/sdc
error: Failed to create the BTRFS pool: /dev/sdc appears to contain an existing filesystem (btrfs).
ERROR: use the -f option to force overwrite of /dev/sdc
btrfs-progs v4.9.1
See http://btrfs.wiki.kernel.org for more information.

i am sketch of giving the -f options as i don't want to lose my existing containers and fear it will clobber the disk.

Kundarsa

Posted 2017-09-09T07:04:14.010

Reputation: 11

Since I do not know the original command you ran to get that output, have you tried the mount /dev/sdc /mnt command? In most modern linux OS, the mount command is smart enough to interpret the type of filesystem on the disk, and mount it, too. – Dooley_labs – 2017-09-09T07:58:45.630

the command is "lxc storage create default btrfs source=/dev/sdc" the fs type is btrfs, but lxd is throwing that error. – Kundarsa – 2017-09-09T19:50:55.363

Answers

0

i gave up on simply adding the existing storage volume to a storage pool. i got up quickly with access to the previous install by restoring the lxd config.

service lxd stop
mkdir /mnt/old
mount /dev/OLDDRIVE /mnt/old
mv /var/lib/lxd /var/lib/lxd.old
cp -R /mnt/old/var/lib/lxd /var/lib/
service lxd start
lxc list

i still have the rest of the install to test...

Kundarsa

Posted 2017-09-09T07:04:14.010

Reputation: 11