[lxc-users] Cannot remove a volume that has snapshots
Andrey Repin
anrdaemon at yandex.ru
Sat May 9 21:53:23 UTC 2020
Greetings, Kees Bakker!
> Ah, I found out what is causing this. I was unfortunate to choose
> my containers name such that LXD thinks one is a snapshot of the
> other.
> Simple test
> root at rapper:~# lxc init images:ubuntu/bionic/amd64 -p pool2 test04-second
> Creating test04-second
> root at rapper:~# lxc init images:ubuntu/bionic/amd64 -p pool2 test04
> Creating test04
> root at rapper:~# lxc delete test04
> Error: Error deleting storage volume: Cannot remove a volume that has snapshots
> Also renaming (moving) doesn't work for this one.
> root at rapper:~# lxc move test04 test04-first
> Error: Rename instance: Failed to run: lvrename
> /dev/rapper-vg2/containers_test04---second
> /dev/rapper-vg2/containers_test04--first---second: Existing logical volume
> "containers_test04---second" not found in volume group "rapper-vg2"
> And what interesting is that you can only use a hyphen as a separator, not
> an underscore.
> root at rapper:~# lxc init images:ubuntu/bionic/amd64 -p pool2 test04_first
> Creating test04_first
> Error: Failed instance creation: Invalid instance name: Name can only
> contain alphanumeric and hyphen characters
> Now I have to find a trick to mislead LXD so that the containers
> can be deleted.
Try renaming "test04-second" first.
--
With best regards,
Andrey Repin
Sunday, May 10, 2020 0:52:50
Sorry for my terrible english...
More information about the lxc-users
mailing list