I am experiencing a problem while moving one of my LXD containers to a different (larger) storage pool.
My initial goal was to increase the size of the storage pool used by my container. To that end, I tried to follow the steps described here: Change Storage (Size and Driver).
My container was initially using the
default strorage pool (30GB). I first created a new storage pool
bigstorage with 130GB and then did the following:
lxc stop Mycontainer lxc move Mycontainer MycontainerCopy lxc move MycontainerCopy Mycontainer --storage=bigstorage
During the execution of the last command, I obtained the following error:
Error: Create instance from copy: Create instance volume from copy failed: [Failed to run: btrfs property set -ts /var/snap/lxd/common/lxd/storage-pools/default/containers-snapshots/MycontainerCopy/snap-Jan-17-2020/rootfs/var/lib/docker/btrfs/subvolumes/381c436496c9289c6464401febbede4ff21dc0c5e45e8d79d73f678a5636e0d8 ro true: ERROR: failed to set flags for /var/snap/lxd/common/lxd/storage-pools/default/containers-snapshots/MycontainerCopy/snap-Jan-17-2020/rootfs/var/lib/docker/btrfs/subvolumes/381c436496c9289c6464401febbede4ff21dc0c5e45e8d79d73f678a5636e0d8: No space left on device Failed to run: btrfs receive -e /var/snap/lxd/common/lxd/storage-pools/bigstorage/containers/migration.207101739: ERROR: empty stream is not considered valid]
It seems the problem occured while transferring a snapshot of my container called
Mycontainer is taking 16GB of disk space:
$ lxc storage info default info: description: "" driver: btrfs name: default space used: 16.59GB total space: 30.00GB used by: images: - bbe2058f62ee0778bba9427feba2f75fd8902995cd4867732d3211bdd3904db8 instances: - MycontainerCopy profiles: - default
I tried to increase the
volume.size of both
bigstorage to 100GB as suggested here LXC copy runs out of disk space and here “lxc launch” fails due to “no space left on device” but I obtained the same error. The total space of my disk is 160GB.
I also notice that the space used on my disk decreased, I have the feeling that part of the data that was generated while executing command
lxc move MycontainerCopy Mycontainer --storage=bigstorage was not deleted. Is it possible to free this space?
Thank you in advance!