freenas-proxmox/perl5
Kevin Adams 267e14ebfa fix: explicitly delete zvol via pool/dataset API on extent removal (#239)
remove:true in the iSCSI extent DELETE body is unreliable on TrueNAS
SCALE 24.10+ — the extent config is removed but the underlying zvol is
left behind as an orphaned dataset. Add freenas_delete_zvol() which calls
DELETE /api/v2.0/pool/dataset/id/{path}/ explicitly after every extent
removal, covering both the rollback path in run_create_lu and normal
disk deletion in run_delete_lu. Guarded to v2.0 API only using the
per-host cache to avoid stale package-global state when two storage
hosts with different API versions are active simultaneously.

Verified on TrueNAS SCALE 24.10.2.1: zvol is fully removed from
Datasets after a forced rollback test (FREENAS_TEST_ROLLBACK=1).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-20 08:56:02 -04:00
..
PVE/Storage fix: explicitly delete zvol via pool/dataset API on extent removal (#239) 2026-05-20 08:56:02 -04:00
REST Update comments/doc of the methods changes 2020-07-14 17:32:53 -04:00