[pve-devel] busy dataset when trying the migrate iscsi disk

Max R. Carrara m.carrara at proxmox.com
Thu Sep 18 19:52:10 CEST 2025


On Wed Sep 17, 2025 at 7:47 PM CEST, Lorne Guse wrote:
> Ironically the patch version of the plugin actually utilizes the native Proxmox code in ZFSPlugin.pm / ZFSPoolPlugin.pm for managed the zvol dataset. The patch version only manages the iSCSI configuration.

Ah, this is for the old plugin! I see.

I had another look through some more manpages just to be sure, but there
unfortunately isn't really anything that allows you to close a single
connection or something.

Side note: There's a way to log out from the session
(`iscsiadm -m session --logout`, to be precise), but that only works for
iSCSI-boxes that provide one target for each LUN. As soon as a target
has multiple LUNs, you end up breaking things, which is the case here.
(Huge thanks to Mira for clarifying all of this off-list btw! This
really nerdsniped me.)

Any other solution is probably way too convoluted, unfortunately.

>
> I think the best course is to consider the patch version legacy and focus on the new fully API driven Custom Storage Plugin.

I think so too; perhaps it could be worth checking if there's a possible
migration path for the users of the patch version..? Not sure if that's
possible / you have enough capacity for that, though.

>
> TrueNAS indicated there are plans to implement some form of UI hooks for Custom Storage Plugins. This is very encouraging.

Yes, it's in the works—there's an RFC for that currently:
https://lore.proxmox.com/pve-devel/20250908180058.530119-1-m.carrara@proxmox.com/

However, please don't consider that implementation as finished yet—it
isn't at all (it's an RFC after all). I'd like to rework it quite soon,
as the current implementation is way too complex (among other things).

> ________________________________
> From: Max R. Carrara <m.carrara at proxmox.com>
> Sent: Wednesday, September 17, 2025 6:04 AM
> To: Lorne Guse <boomshankerx at hotmail.com>; Proxmox VE development discussion <pve-devel at lists.proxmox.com>
> Subject: Re: busy dataset when trying the migrate iscsi disk
>
> On Mon Sep 15, 2025 at 5:34 AM CEST, Lorne Guse wrote:
> > I'm working on TrueNAS over iSCSI for Proxmox and have run into an issue migrating disks. When trying to delete the old storage, which has just successfully been transfered, the iscsidirect connection must remain open because we are getting:
> >
> > cannot destroy 'slow/vm-188-disk-0': dataset is busy
> >
> > Is there a way to ensure the iscsidirect connection is closed before trying to delete the underlying zfs dataset?
>
> Hi Lorne! Glad to see you on the mailing list!
>
> I've sifted around our code to see how we handle this, and it seems that
> we're simply retrying a couple of times until the dataset is actually
> deleted [0]. I think that might be your best bet, though if you find an
> alternative, I'd be curious to know.
>
> [0]: https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgit.proxmox.com%2F%3Fp%3Dpve-storage.git%3Ba%3Dblob%3Bf%3Dsrc%2FPVE%2FStorage%2FZFSPoolPlugin.pm%3Bh%3Dd8d8d0f9fc1cc6f1a02d8f5800c388b355609bf5%3Bhb%3Drefs%2Fheads%2Fmaster%23l362&data=05%7C02%7C%7C08ddb2ac62744e0c4a2908ddf5e259ac%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C638937074705932603%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=dV3Ch024RrnvSKKDsT4k1zP23S%2BCX9jFR6YISZ5Lpe0%3D&reserved=0<https://git.proxmox.com/?p=pve-storage.git;a=blob;f=src/PVE/Storage/ZFSPoolPlugin.pm;h=d8d8d0f9fc1cc6f1a02d8f5800c388b355609bf5;hb=refs/heads/master#l362>





More information about the pve-devel mailing list