On 10/11/2025 18:01, Mira Limbeck wrote: > This RFC is the first draft of storage mapping support. It > includes a reworked iSCSI plugin that handles storage mapping, as well > as an API to get/create/delete mappings. > > Some features are not yet implemented, for example reachability checks > for iSCSI. > The pve-manager patches are limited to the API, no UI exists for now. > > The idea would be to make it easy for iSCSI storages to use local > mappings that are managed through the GUI. > For this we would need to check the reachability of all announced > portals for each node. > This will be the next step after the basic mapping support. > > For now only an iSCSI plugin exists, but this could be extended to other > (future) storages as well. As such the idea is to have a generic base.
Thanks for tackling this! I tested it a bit with a LIO target with multiple portals and targets exposing the same LUN. Took me a little to figure out how to add a mapping, so documenting this here just in case someone (including me) needs it again. For an existing iscsi storage: - pvesh create /cluster/mapping/storage/myiscsi --id myiscsi --type iscsi - pvesm set iscsi -mapping myiscsi - pvesh set /cluster/mapping/storage/myiscsi --type iscsi --map 'node=pve9-iscsi172,portals=10.1.1.134,target=iqn.2003-01.org.linux-iscsi.iscsi-target134.x8664:sn.940ff597178c' \ --map 'node=pve9-iscsi172,portals=10.3.1.134,target=iqn.2003-01.org.linux-iscsi.iscsi-target134.x8664:sn.b404625a505a' \ --map 'node=pve9-iscsi172,portals=10.2.1.134,target=iqn.2003-01.org.linux-iscsi.iscsi-target134.x8664:sn.940ff597178c' \ --map 'node=pve9-iscsi173,portals=10.1.1.134,target=iqn.2003-01.org.linux-iscsi.iscsi-target134.x8664:sn.940ff597178c' Works nicely so far! A couple of things I noticed (also briefly discussed with Mira off-list, noting this here for posterity): - I initially had a typo in my mapping and just got 'storage iscsi is not online', would be nice if there could be a more specific error/warning if no mapping entry matches on a given node. - looks like, with a mapping, there is no automatic discovery anymore. Hence, after deleting all discovery records (`iscsiadm -m node` is empty), the logins don't work because a discovery first has to populate the discovery records. Would be nice if the plugin could do discovery when needed. - one possible usecase would be to allow removing a portal from the mapping before disabling the portal target-side. However, currently, after removing the portal from the mapping, there would still be an open session to the portal, which can cause issues if the portal is disabled target-side. In this case, it might be nice if the iSCSI plugin would automatically log out from logged-in sessions that don't match any entry in the mapping? Not sure if this is something we always want, though? _______________________________________________ pve-devel mailing list [email protected] https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
