Unable to Delete ZFS ZVol

danwestness

Dabbler
Joined
Apr 2, 2022
Messages
22
Hello! First time poster here and glad to be a new member of the TrueNAS community!

I have run into my first issue that I have been unsuccessful as solving and hoping to be able to get some community guidance.
I have searched and reviewed the forums and other sites extenstively for over a week without a solution so here i am....

Here is my story....
I had TrueNAS installed on my NAS... I had Proxmox installed on another host as a hypervisor.
I had presented 2 ZVOL datasets as ISCSI extents to proxmox and everything was working fine...
I had decided to start over for unrelated reasons and reinstalled TrueNAS and decommissioned my old proxmox host.

When i reinstalled truenas (SCALE by the way), All i have done beyond the initial basic install/setup is to import my ZFS pools.
I have these 2 ZVOLs left over from my old proxmox host that now i want to delete since they are useless to me anymore... And i cannot do it.
I have 2 ZVOLS.. both on different pools. Both indicate that the datasets are busy. But I don't see how they are busy... fresh install.. never configured anything with these ZVOLs on this build before (no NFS / no ISCSI / no nothing)..... I have rebooted multiple times and no change.

How can i get rid of these ZVOLs and reclaim my space? It's driving me nuts.

Code:
root@truenas[~]# zfs destroy -f data/pve-data
cannot destroy 'data/pve-data': dataset is busy
root@truenas[~]# zfs destroy -f ssd/pve-docker01
cannot destroy 'ssd/pve-docker01': dataset is busy
 

danwestness

Dabbler
Joined
Apr 2, 2022
Messages
22
After stuggling a bit more here I ultiamtely did find a solution (although perhaps a bit dirty)

I ended up adding '/usr/sbin/zfs destroy ssd/pve-docker01' as a pre-init startup command just to get ahead of truenas and then rebooted. Viola it's gone now!
 

Jim Yang

Cadet
Joined
Oct 7, 2022
Messages
1
Great! This fixed my problem, though I still can't figure out why that dataset was busy.

lsof is ported and won't work.
procstat won't find anything usful
 

5mall5nail5

Dabbler
Joined
Apr 29, 2020
Messages
14
I am battling TrueNAS Scale, iSCSI, and vSphere weird issues that never existed in TrueNAS Core/FreeNAS and I am semi confident enough to say that TrueNAS Scale is still developing all things iSCSI/zvol
 
Top