public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: "Christoph Heiss" <c.heiss@proxmox.com>
To: "Fiona Ebner" <f.ebner@proxmox.com>
Cc: Proxmox VE development discussion <pve-devel@lists.proxmox.com>
Subject: Re: [pve-devel] [PATCH v2 storage 1/2] fix #5071: zfs over iscsi: add 'zfs-base-path' configuration option
Date: Thu, 05 Jun 2025 13:02:14 +0200	[thread overview]
Message-ID: <DAEJRK60I18R.3H50H3BHTNIA1@proxmox.com> (raw)
In-Reply-To: <20250527133431.74325-1-f.ebner@proxmox.com>

Tested the series by setting up a iSCSI target using targetcli(d) (on a
separate PVE 8.4 system as a base, due to ZFS goodies) and then adding a
ZFS-over-iSCSI storage using the LIO provider to a test cluster.

Confirmed that

- `zfs-base-path` is correctly detected when adding the storage

- the iSCSI storage is seen correctly after setting up and that VM disks
  can be (live-)migrated to the ZFS-over-iSCSI storage w/o problems.

One small comment inline, just a typo in the API description.

Please consider the series in any case

Tested-by: Christoph Heiss <c.heiss@proxmox.com>

--

One unrelated thing I noticed during testing, but wanted to note for
reference:

When one hits the error due to a bad `zfs-base-path` (e.g. as currently
happens):

  `TASK ERROR: storage migration failed: Could not open /dev/<poolname>/vm-100-disk-0`

the target zvol isn't cleaned up, e.g. the above would result in
`<poolname>/vm-100-disk-0` still being present on the remote zpool.

Fortunately this doesn't really break anything, as the next available
disk number (in this case, `vm-100-disk-1`), is chosen automatically
anyway when creating a new disk.

On Tue May 27, 2025 at 3:34 PM CEST, Fiona Ebner wrote:
> Use '/dev/zvol' as a base path for new storages for providers 'iet'
> and 'LIO', because that is what modern distributions use.
>
> This is a breaking change regarding the addition of new storages on
> older distributions, but it's enough to specify the base path '/dev'
> explicitly for setups that require it.
>
> Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
> ---
[..]
> diff --git a/src/PVE/Storage/ZFSPlugin.pm b/src/PVE/Storage/ZFSPlugin.pm
> index 94cb11f..64f1eda 100644
> --- a/src/PVE/Storage/ZFSPlugin.pm
> +++ b/src/PVE/Storage/ZFSPlugin.pm
> @@ -39,13 +39,13 @@ my $zfs_get_base = sub {
>      my ($scfg) = @_;
>
>      if ($scfg->{iscsiprovider} eq 'comstar') {
> -        return PVE::Storage::LunCmd::Comstar::get_base;
> +        return PVE::Storage::LunCmd::Comstar::get_base($scfg);
>      } elsif ($scfg->{iscsiprovider} eq 'istgt') {
> -        return PVE::Storage::LunCmd::Istgt::get_base;
> +        return PVE::Storage::LunCmd::Istgt::get_base($scfg);
>      } elsif ($scfg->{iscsiprovider} eq 'iet') {
> -        return PVE::Storage::LunCmd::Iet::get_base;
> +        return PVE::Storage::LunCmd::Iet::get_base($scfg);
>      } elsif ($scfg->{iscsiprovider} eq 'LIO') {
> -        return PVE::Storage::LunCmd::LIO::get_base;
> +        return PVE::Storage::LunCmd::LIO::get_base($scfg);
>      } else {
>          $zfs_unknown_scsi_provider->($scfg->{iscsiprovider});
>      }
> @@ -204,6 +204,12 @@ sub properties {
>  	    description => "target portal group for Linux LIO targets",
>  	    type => 'string',
>  	},
> +	'zfs-base-path' => {
> +	    description => "Base path where to look for the created ZFS block devices. Set"
> +		." automatically during creation if not specificed. Usually '/dev/zvol'.",

small typo :^)
s/specificed/specified/g


_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


  parent reply	other threads:[~2025-06-05 11:02 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-27 13:34 Fiona Ebner
2025-05-27 13:34 ` [pve-devel] [PATCH v2 storage 2/2] zfs over iscsi: on-add hook: dynamically determine base path Fiona Ebner
2025-06-05 11:02 ` Christoph Heiss [this message]
2025-06-05 11:17   ` [pve-devel] [PATCH v2 storage 1/2] fix #5071: zfs over iscsi: add 'zfs-base-path' configuration option Fiona Ebner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DAEJRK60I18R.3H50H3BHTNIA1@proxmox.com \
    --to=c.heiss@proxmox.com \
    --cc=f.ebner@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal