From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [45.144.208.40]) by lore.proxmox.com (Postfix) with ESMTPS id A972B1FF0B3 for ; Thu, 26 Nov 2026 16:10:24 +0100 (CET) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 2F84021723; Thu, 26 Nov 2026 16:10:14 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=neatech-ar.20260707.gappssmtp.com; s=20260707; t=1795705799; x=1796310599; darn=lists.proxmox.com; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to:content-type; bh=ab/E1ZCB8SfifivVQzxsgw4khkEjrRpbXIjxolsMgxk=; b=c4eNZLFIBZ7vnDq1AtKmq0p8pzZW/GAw3WyvSqj75RUvsW3uRx5khh2tlVMOohahwT u4fN/6XvKP06PDzWUSf2XwBWyQnK0PLnSjMEaif/8qCQQteBkhLl6ZiAAnM8T3nsTqp3 nDNgkXNmGhaRx3THZiCd8EVySNCMj4QN8ZXLtZVBEz991ZnXDhLtWfF6+b+IkcF6RD/j +P1jzxeidF5HXRWO46rEwBBRO+J0EWPE9PLfBfZOAFeU2mPfKRnpk2OIiEgeek5QVlgm PmJfG58m00WgZkjYj8EorOnqhZn/6ambSo/5nrDG2NTEatgIGH/ulijsvMSeBhOpk1l1 s6og== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1795705799; x=1796310599; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=ab/E1ZCB8SfifivVQzxsgw4khkEjrRpbXIjxolsMgxk=; b=NbAaVcA7tXF1Xh36cuE25wK8jadRK8mV1JaXIKBYms4RQT2W81yXDUKATNEhtG4uH2 Vo/xjIJtq1j5p4Y2xolA6AI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Bla bFpVduUmSkKGur833zYZAmJV2dmBjFg== X-Received: by 2002:a05:6102:61c2:20b0:7c8:3b8c:82ae with SMTP id ada2fe7eead31-7d7393b6664mr12087379137.2.1795705798451; Thu, 26 Nov 2026 07:09:58 -0800 (PST) From: Joaquin Varela To: pve-devel@lists.proxmox.com Subject: [PATCH storage v5 00/13] add ZFS over NVMe/TCP storage plugin Date: Thu, 26 Nov 2026 12:09:41 -0300 Message-ID: <20261126150956.310593-1-joaquinvarela@neatech.ar> X-Mailer: git-send-email 2.54.0.windows.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL 0.357 Adjusted score from AWL reputation of From: address DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DMARC_PASS -0.1 DMARC pass policy RCVD_IN_DNSWL_NONE -0.0001 Sender listed at https://www.dnswl.org/, no trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: WU7W75ERRBM7DC3ORJTDMT54WVV74LGJ X-Message-ID-Hash: WU7W75ERRBM7DC3ORJTDMT54WVV74LGJ X-MailFrom: joaquinvarela@neatech.ar X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Hi, this is v5 of the zfsnvme backend, rebased on current master for Proxmox VE 9.3. v4 was never sent, so the changes below are against v3. The new nvmeof storage connects to namespaces that an array already serves. zfsnvme creates and manages the zvols on a Linux ZFS host and exports them with the kernel nvmet target, with DH-HMAC-CHAP, snapshots and clones. So the two complement each other. zfsnvme now uses the nvmeof helpers where they fit: the host lock, host_identity and parse_portal. It keeps its own connect, which writes /dev/nvme-fabrics, so the DH-HMAC-CHAP secret never shows up in argv. Changes since v3: - storage API 17: isolated properties, a sensitive dhchap-key, titles, advanced and hidden properties, vm-vol and vm-state content - volume names use the same character set as ZFS over iSCSI - the delete hook only removes the key file, so it does no remote work while the storage.cfg lock is held. The subsystem stays on the target until the admin removes it, as the docs describe. - the plugin is taint safe for pvedaemon and pveproxy, with a perl -T test - the plugin loads nvme-tcp on the nodes - deactivation checks the users of a namespace with the Diskmanage helpers and only deletes controllers it still owns, checked under the host lock - the old 3/4, the fencing of abandoned target commands, is dropped. It was the only shell control flow on the target. - patch 5 lets the SAN view, the wipe check and the controller list count a zfsnvme storage as the owner of its subsystem. The cluster multipath status still lists only nvmeof namespaces. - patch 6 checks the cluster version before the first zfsnvme storage, like for nvmeof. The version there, 9.3.2, is a guess. Please adapt it to the first pve-manager that will depend on this. - smaller patches, so none hits the size limit of the list, and fewer comments Patch 5 would also fit the hook that Dirk Nehring proposed for SAN LUNs of other plugins [0]. zfsnvme could then answer that hook instead of the type check. Every patch builds and passes make test on a PVE 9.3 node. On a lab cluster with two PVE 9.3 nodes, a Linux nvmet target and two paths, the series passed adding the storage over the API (also a failed add and its retry), volume allocation, live migration both ways, snapshot and rollback (also with RAM state), template and linked clone, resize, a target reboot and the loss of one path with a running guest, and an nvmeof storage on the same target. The SAN guards held as well: a node where the guest does not run refused to wipe its namespace and to disconnect its last path. The docs and manager patches follow in this thread. v3: https://lore.proxmox.com/pve-devel/20261005002609.571-1-joaquinvarela@neatech.ar/ [0]: https://lore.proxmox.com/pve-devel/20261124200340.380381-1-dnehring@marcant.net/ Joaquin Varela (13): zfsnvme: add target state parsing and planning zfsnvme: add the target transactions zfsnvme: add storage configuration and volume methods zfsnvme: connect the nodes and register the plugin api: san luns: count zfsnvme storages as owners of their subsystem api: config: check the cluster version before the first zfsnvme storage test: zfsnvme: add configuration and volume tests test: zfsnvme: add node side tests test: zfsnvme: add an in-memory nvmet target test: zfsnvme: test the target parsers and planners test: zfsnvme: test the target flows test: zfsnvme: add a fault sweep, renderer and taint tests zfsnvme: wait up to 30 seconds for the shared storage lock src/PVE/API2/NVMeOF.pm | 7 +- src/PVE/API2/SAN/Cluster.pm | 6 +- src/PVE/API2/SAN/Node.pm | 5 +- src/PVE/API2/Storage/Config.pm | 13 +- src/PVE/CLI/pvesm.pm | 21 +- src/PVE/NVMeOF.pm | 6 + src/PVE/Storage.pm | 2 + src/PVE/Storage/Makefile | 1 + src/PVE/Storage/NVMeOFPlugin.pm | 4 +- src/PVE/Storage/Plugin.pm | 12 +- src/PVE/Storage/SAN.pm | 16 +- src/PVE/Storage/ZFSNVMePlugin.pm | 2947 +++++++++++ src/test/Makefile | 4 + src/test/run_nvmeof_api_tests.pl | 16 +- src/test/run_nvmeof_tests.pl | 47 + src/test/run_plugin_tests.pl | 2 + src/test/run_san_lun_scan_tests.pl | 11 + src/test/run_san_nvme_tests.pl | 4 + src/test/run_zfsnvme_taint_tests.pl | 988 ++++ .../zfsnvme_fixtures/configfs_snapshot.txt | 38 + src/test/zfsnvme_fixtures/zfs_inventory.txt | 15 + src/test/zfsnvme_target_test.pm | 4514 +++++++++++++++++ src/test/zfsnvme_test.pm | 2881 +++++++++++ 23 files changed, 11535 insertions(+), 25 deletions(-) create mode 100644 src/PVE/Storage/ZFSNVMePlugin.pm create mode 100755 src/test/run_zfsnvme_taint_tests.pl create mode 100644 src/test/zfsnvme_fixtures/configfs_snapshot.txt create mode 100644 src/test/zfsnvme_fixtures/zfs_inventory.txt create mode 100644 src/test/zfsnvme_target_test.pm create mode 100644 src/test/zfsnvme_test.pm base-commit: 3ac027fd9fcd8fdfe6bb3acb1e4b58e8cd1cfde8 -- 2.54.0.windows.1