Proxmox Storage Plugin API Enhancements for dataset / zvol management

We are trying to build a native storage plugin for Proxmox that uses the API to manage ZFS over ISCSI. Unfortunately several zfs commands are not implemented in the API. This forces us to use ssh+root to execute zfs commands directly on the TrueNAS host.

Eg. Creating linked clones requires the renaming of a zvol from
vm-<VMID>-disk-0base-<VMID>-disk-0.

We noticed that the ability to rename a zvol has also been removed from the WebUI, leaving the only option shell commands.

Considering there are reasonable reasons to use these zfs commands would it be reasonable to implement them in the API for advanced users but leave them out of the WebUI to prevent whatever problem you are trying to avoid?

6 Likes

Thanks for posting this. I’m out of votes, unfortunately.

I’d really like to start teaching myself how to use ZFS over iSCSI in Proxmox. I think it would really simplify my storage workflow for new VMs and LXCs.

Good luck on your webhooks-based plugin. :slight_smile:

I wonder whether ZFS over ISCSI naming will cause a shitstorm this time. I saw it once at the old forum… :wind_face::tornado::man_farmer::zap::fire:

I haven’t seen that but I think I’m going to have to check it out. Sounds spicey.

It’s not a great naming convention since it sounds like an RFC-defined feature (e.g. an extension of the iSCSI protocol) rather managing ZFS through SSH or an API outside of the iSCSI protocol.

1 Like

The PVE devs would probably be open to a feature request for a name change if it’s confusing.

It’s fairly obviously confusing. I know what iSCSI is, I know what ZFS is, but I did not know what “ZFS over iSCSI” is. If they had named it something like a “proxmox remote storage plugin” that would make sense. The naming smacks of marketing branding :slight_smile:

Fair comment. The storage plugin technically manages both the zfs zvols AND the associated iscsi extents / LUNs. I’m just following the naming that the original plugin devs are using for consistency. The TrueNAS API allows for managing the iSCSI targets, but currently doesn’t provide raw zfs interaction. I certainly understand the risks. Having to setup root+ssh connectivity is inconvenient but manageable.

I’m not sure how big a market there is for Proxmox + TrueNAS but for those of us that use it, it works incredibly well.

My end goal is a pure TrueNAS storage plugin for Proxmox VE 8 completely driven by TrueNAS API

1 Like

I’d like to bump this for a response from TrueNAS. I think all I need is zfs rename added to the pool.dataset API. With that I believe I could write a fully API driven plugin for Proxmox.

Have you looked at

This tool is used to drive the Incus/TrueNAS storage driver

It supports a simplified blocking mode of operation with automatic connection caching/aggregation

The CLI is modeled after the
zfs commands

Ie

tnc dataset create -V 10G pool/some-zvol

tnc dataset rename pool/some-zvol pool/better-name

2 Likes

Apparently they are using an undocumented API call to zfs.dataset.rename. I’ll have to experiment and see if I can get anything to work.

1 Like

Please let us know the status and who needs any specific assistance.

You can private message me if you prefer.

If I can confirm API compatibility for a native Proxmox->TrueNAS storage plugin I will attempt to build it.

The existing plugin relies on some ssh+root zfs commands. If we can get support for all of the zfs commands we need in the API we can build a pure storage plugin instead of patching the existing ZFS over iSCSI provider.

If you have roadblocks… let us know.

1 Like

Would it be useful to file a feature request/bug report listing off the undocumented API calls/ZFS commands that are needed by @BooMShanKerX 's plugin?

EDIT:
In case it’s not clear to anyone finding this thread later, @BooMShanKerX 's repo for the PVE storage plugin is here: GitHub - boomshankerx/proxmox-truenas: TrueNAS Websocket API Extension for Proxmox VE ZFS over iSCSI Storage

I don’t think so… they are commited in 25.10

see api.truenas.com

The needed API methods appear to have been added in version 25.04.2. Next week when I take my plugin out of beta I will begin re-evaluating the proxmox storage plugin and the TrueNAS API and verify.

I’m feeling optimistic

1 Like

That’s awesome to hear.

I look forward to hearing how it goes. :slight_smile: