[pve-devel] [PATCH] Fix bug inflicting Nexenta
mir at datanom.net
mir at datanom.net
Mon Nov 4 20:32:56 CET 2013
From: Michael Rasmussen <mir at datanom.net>
Signed-off-by: Michael Rasmussen <mir at datanom.net>
---
PVE/Storage/LunCmd/Comstar.pm | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/PVE/Storage/LunCmd/Comstar.pm b/PVE/Storage/LunCmd/Comstar.pm
index 45ad6a5..3507f94 100644
--- a/PVE/Storage/LunCmd/Comstar.pm
+++ b/PVE/Storage/LunCmd/Comstar.pm
@@ -35,6 +35,16 @@ sub get_base {
return '/dev/zvol/rdsk';
}
+sub get_vol_name {
+ my ($path) = @_;
+
+ my $base = get_base;
+ if ($path =~ /^$base(\/.+)?\/(.+)/) {
+ return $2;
+ }
+ die "$path: Illegal path";
+}
+
sub run_lun_command {
my ($scfg, $timeout, $method, @params) = @_;
@@ -51,7 +61,8 @@ sub run_lun_command {
if ($method eq 'create_lu') {
my $prefix = '600144f';
- my $digest = md5_hex($params[0]);
+ my $zvol = get_vol_name($params[0]);
+ my $digest = md5_hex($zvol);
$digest =~ /(\w{7}(.*))/;
$guid = "$prefix$2";
@params = ('-p', 'wcd=false', '-p', "guid=$guid", @params);
--
1.8.4.2
More information about the pve-devel
mailing list