Can't destroy container

riri1310

Active Member
Jul 14, 2017
27
0
41
49
I create a container and the strange thing is that it was created on disk-0 and disk-1 (I notice that I need to do the creation process 2 times maybe it's for that, I don't know)
The thing is I want to destroy the container and I can't:

Code:
root@ns3128946:~# pct destroy 106
zfs error: cannot destroy 'rpool/subvol-106-disk-0': dataset is busy

Code:
root@ns3128946:~# zfs list -r -o name,mountpoint,mounted
NAME                     MOUNTPOINT                MOUNTED
rpool                    /rpool                        yes
rpool/ROOT               /rpool/ROOT                   yes
rpool/ROOT/pve-1         /                             yes
rpool/data               /rpool/data                   yes
rpool/subvol-100-disk-0  /rpool/subvol-100-disk-0      yes
rpool/subvol-101-disk-0  /rpool/subvol-101-disk-0      yes
rpool/subvol-102-disk-0  /rpool/subvol-102-disk-0      yes
rpool/subvol-103-disk-0  /rpool/subvol-103-disk-0      yes
rpool/subvol-104-disk-0  /rpool/subvol-104-disk-0      yes
rpool/subvol-105-disk-0  /rpool/subvol-105-disk-0      yes
rpool/subvol-106-disk-0  /rpool/subvol-106-disk-0       no
rpool/subvol-106-disk-1  /rpool/subvol-106-disk-1      yes
rpool/swap

Any help please? I'm stuck
 
You could try to set "start at boot" to "No" and do a reboot.
The reboot works! Great thanks

I can detroy the container 106 (located on disk-0) but I still have the one on the disk-1 and I want to delete it too, any idea how I can do that if I can't use the detroy function?

Code:
root@ns3128946:~# pct destroy 106
root@ns3128946:~# zfs list -r -o name,mountpoint,mounted
NAME                     MOUNTPOINT                MOUNTED
rpool                    /rpool                        yes
rpool/ROOT               /rpool/ROOT                   yes
rpool/ROOT/pve-1         /                             yes
rpool/data               /rpool/data                   yes
rpool/subvol-100-disk-0  /rpool/subvol-100-disk-0      yes
rpool/subvol-101-disk-0  /rpool/subvol-101-disk-0      yes
rpool/subvol-102-disk-0  /rpool/subvol-102-disk-0      yes
rpool/subvol-103-disk-0  /rpool/subvol-103-disk-0      yes
rpool/subvol-104-disk-0  /rpool/subvol-104-disk-0      yes
rpool/subvol-105-disk-0  /rpool/subvol-105-disk-0      yes
rpool/subvol-106-disk-1  /rpool/subvol-106-disk-1      yes
rpool/swap               -                               -
 
Hi,
The reboot works! Great thanks

I can detroy the container 106 (located on disk-0) but I still have the one on the disk-1 and I want to delete it too, any idea how I can do that if I can't use the detroy function?

Code:
root@ns3128946:~# pct destroy 106
root@ns3128946:~# zfs list -r -o name,mountpoint,mounted
NAME                     MOUNTPOINT                MOUNTED
rpool                    /rpool                        yes
rpool/ROOT               /rpool/ROOT                   yes
rpool/ROOT/pve-1         /                             yes
rpool/data               /rpool/data                   yes
rpool/subvol-100-disk-0  /rpool/subvol-100-disk-0      yes
rpool/subvol-101-disk-0  /rpool/subvol-101-disk-0      yes
rpool/subvol-102-disk-0  /rpool/subvol-102-disk-0      yes
rpool/subvol-103-disk-0  /rpool/subvol-103-disk-0      yes
rpool/subvol-104-disk-0  /rpool/subvol-104-disk-0      yes
rpool/subvol-105-disk-0  /rpool/subvol-105-disk-0      yes
rpool/subvol-106-disk-1  /rpool/subvol-106-disk-1      yes
rpool/swap               -                               -
you can either use pvesm free local-zfs:subvol-106-disk-1 or remove it via the web UI (select your storage in the sidebar and then go to the CT Volumes content view, where you can delete the image).
 
Hi,

you can either use pvesm free local-zfs:subvol-106-disk-1 or remove it via the web UI (select your storage in the sidebar and then go to the CT Volumes content view, where you can delete the image).
great thanks !
 
You could try to set "start at boot" to "No" and do a reboot.

I have the same problem. I have only one volume with the CT, and it's not mounted.

Code:
# pct destroy 250
zfs error: cannot destroy 'poolz/vmdata/subvol-250-disk-0': dataset is busy

# zfs list -r -o name,mountpoint,mounted | grep subvol-250
poolz/vmdata/subvol-250-disk-0                /poolz/vmdata/subvol-250-disk-0  no

"do a reboot" of what, the hypervisor or the CT? I have a bunch of VM's and CT's on the hypervisor so I don't really want to reboot that nilly-willy.
 
Hi,
I have the same problem. I have only one volume with the CT, and it's not mounted.

Code:
# pct destroy 250
zfs error: cannot destroy 'poolz/vmdata/subvol-250-disk-0': dataset is busy

# zfs list -r -o name,mountpoint,mounted | grep subvol-250
poolz/vmdata/subvol-250-disk-0                /poolz/vmdata/subvol-250-disk-0  no
What's the output of grep subvol-250-disk-0 /proc/*/mounts? Any snapshots on the dataset?

"do a reboot" of what, the hypervisor or the CT? I have a bunch of VM's and CT's on the hypervisor so I don't really want to reboot that nilly-willy.
It would be a reboot of the host. But you could also try if re-mounting and unmounting again hellps?
 
I had to do a reboot for another reason and when it came back I could remove the container.
 
  • Like
Reactions: fiona

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!