[pve-devel] [PATCH 05/09] Only append volumes which is created by pve-manager
mir at datanom.net
mir at datanom.net
Mon Aug 12 19:55:31 CEST 2013
From: Michael Rasmussen <mir at datanom.net>
Signed-off-by: Michael Rasmussen <mir at datanom.net>
---
PVE/Storage/ZFSPlugin.pm | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/PVE/Storage/ZFSPlugin.pm b/PVE/Storage/ZFSPlugin.pm
index e39b965..ff32b97 100644
--- a/PVE/Storage/ZFSPlugin.pm
+++ b/PVE/Storage/ZFSPlugin.pm
@@ -141,8 +141,11 @@ sub zfs_parse_zvol_list {
my @lines = split /\n/, $text;
foreach my $line (@lines) {
@zvols = split /\//, $line;
+ my $pool = $zvols[0];
if (scalar(@zvols) == 2 && $zvols[0] !~ /^rpool$/) {
- push (@list, $zvols[0] . '/' . $zvols[1]);
+ my $disk = $zvols[1];
+ next unless $disk =~ m!^(\w+)-(\d+)-(\w+)-(\d+)$!;
+ push (@list, $pool . '/' . $disk);
}
}
--
1.8.4.rc2
More information about the pve-devel
mailing list