Need help deleting a container.
A while ago I decided to lxc copy torrents ntorrents ,
it was taking ages because of the size of the torrents so I decided to interupt ctrl+c*3. lxc list
shows that ntorrents has been created
Now I lxc delete ntorrents but it Error: Cannot remove an instance volume that has snapshots
lxc info ntorrents
`Snapshots:
nats-server_snapshot (taken at 2019/04/19 09:26 UTC) (stateless)
nats-server-snap (taken at 2019/10/06 12:05 UTC) (stateless)
torrents_snap (taken at 2020/02/16 07:23 UTC) (stateless)`
It seems there is a problem deleting the snapshots, here I need help
lxc delete ntorrents/nats-server_snapshot
Error: Failed to run: zfs get -H -p -r -o value clones lxd/containers/ntorrents@snapshot-nats-server_snapshot: cannot open 'lxd/containers/ntorrents@snapshot-nats-server_snapshot': dataset does not exist
Containers are stored on a zfs partition of a 2nd hdd
ctrl+c doesn’t interrupt much as the copy is handled server side by lxd. All you did is stop tracking what’s happening in the server.
Your best bet to fix this issue is to create the snapshots that are missing at the zfs layer.
For example: zfs snapshot lxd/containers/ntorrents@snapshot-nats-server_snapshot
Hi and thank you for your time,
I tried this but returned this error…
sudo zfs snapshot lxd/containers/ntorrents@snapshot-nats-server_snapshot
cannot open 'lxd/containers/ntorrents': dataset does not exist
usage:
snapshot|snap [-r] [-o property=value] ... <filesystem|volume>@<snap> ...
For the property list, run: zfs set|get
For the delegated permission list, run: zfs allow|unallow
That did the trick halfway, I created the zfs container and then created the snapshots but only one snapshot was able to be deleted, the rest it says that
blades@home-server:~$ sudo zfs snapshot lxd/containers/ntorrents@nats-server-snap
cannot create snapshot 'lxd/containers/ntorrents@nats-server-snap': dataset already exists
blades@home-server:~$ sudo zfs snapshot lxd/containers/ntorrents@torrents_snap
cannot create snapshot 'lxd/containers/ntorrents@torrents_snap': dataset already exists
blades@home-server:~$ lxc delete ntorrents/nats-server-snap
Error: Failed to run: zfs get -H -p -r -o value clones lxd/containers/ntorrents@snapshot-nats-server-snap: cannot open 'lxd/containers/ntorrents@snapshot-nats-server-snap': dataset does not exist
blades@home-server:~$ lxc delete ntorrents/torrents_snap
Error: Failed to run: zfs get -H -p -r -o value clones lxd/containers/ntorrents@snapshot-torrents_snap: cannot open 'lxd/containers/ntorrents@snapshot-torrents_snap': dataset does not exist