From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id 15E11622F8 for ; Tue, 29 Sep 2020 18:50:17 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 0B2A111A61 for ; Tue, 29 Sep 2020 18:50:17 +0200 (CEST) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [212.186.127.180]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS id E2BB011A57 for ; Tue, 29 Sep 2020 18:50:01 +0200 (CEST) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id 7563F45870 for ; Tue, 29 Sep 2020 18:50:01 +0200 (CEST) From: Stoiko Ivanov To: pve-devel@lists.proxmox.com Cc: Thomas Lamprecht Date: Tue, 29 Sep 2020 18:49:44 +0200 Message-Id: <20200929164944.18181-1-s.ivanov@proxmox.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL -1.136 Adjusted score from AWL reputation of From: address KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_PASS -0.001 SPF: sender matches SPF record T_SPF_HELO_TEMPERROR 0.01 SPF: test of HELO record failed (temperror) Subject: [pve-devel] [PATCH storage] fix regression in zfs volume activation X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Sep 2020 16:50:17 -0000 commit 815df2dd08ac4c7295135262e60d64fbb57b8f5c introduced a small issue when activating linked clone volumes - the volname passed contains basevol/subvol, which needs to be translated to subvol. using the path method should be a robust way to get the actual path for activation. Found and tested by building the package as root (otherwise the zfs regressiontests are skipped). Reported-by: Thomas Lamprecht Signed-off-by: Stoiko Ivanov --- PVE/Storage/ZFSPoolPlugin.pm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/PVE/Storage/ZFSPoolPlugin.pm b/PVE/Storage/ZFSPoolPlugin.pm index 4f8df5e..6ac05b4 100644 --- a/PVE/Storage/ZFSPoolPlugin.pm +++ b/PVE/Storage/ZFSPoolPlugin.pm @@ -554,9 +554,10 @@ sub activate_volume { if ($format eq 'raw') { $class->zfs_wait_for_zvol_link($scfg, $volname); } elsif ($format eq 'subvol') { - my $mounted = $class->zfs_get_properties($scfg, 'mounted', "$scfg->{pool}/$volname"); + my ($path, undef, undef) = $class->path($scfg, $volname, $storeid); + my $mounted = $class->zfs_get_properties($scfg, 'mounted', "$path"); if ($mounted !~ m/^yes$/) { - $class->zfs_request($scfg, undef, 'mount', "$scfg->{pool}/$volname"); + $class->zfs_request($scfg, undef, 'mount', "$path"); } } -- 2.20.1