rbd -p parameter is only valid for the src (see man). Add the pool to the target as well.
Signed-off-by: Stefan Priebe <s.priebe@profihost.ag>
This commit is contained in:
committed by
Dietmar Maurer
parent
87cf5d409c
commit
8897f5dcc5
@ -17,6 +17,14 @@ sub rbd_unittobytes {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
my $add_pool_to_disk = sub {
|
||||||
|
my ($scfg, $disk) = @_;
|
||||||
|
|
||||||
|
my $pool = $scfg->{pool} ? $scfg->{pool} : 'rbd';
|
||||||
|
|
||||||
|
return "$pool/$disk";
|
||||||
|
};
|
||||||
|
|
||||||
my $rbd_cmd = sub {
|
my $rbd_cmd = sub {
|
||||||
my ($scfg, $storeid, $op, @options) = @_;
|
my ($scfg, $storeid, $op, @options) = @_;
|
||||||
|
|
||||||
@ -283,7 +291,7 @@ sub create_base {
|
|||||||
|
|
||||||
my $newvolname = $basename ? "$basename/$newname" : "$newname";
|
my $newvolname = $basename ? "$basename/$newname" : "$newname";
|
||||||
|
|
||||||
my $cmd = &$rbd_cmd($scfg, $storeid, 'rename', $name, $newname);
|
my $cmd = &$rbd_cmd($scfg, $storeid, 'rename', &$add_pool_to_disk($scfg, $name), &$add_pool_to_disk($scfg, $newname));
|
||||||
run_command($cmd, errmsg => "rbd rename $name' error", errfunc => sub {});
|
run_command($cmd, errmsg => "rbd rename $name' error", errfunc => sub {});
|
||||||
|
|
||||||
my $running = undef; #fixme : is create_base always offline ?
|
my $running = undef; #fixme : is create_base always offline ?
|
||||||
|
|||||||
Reference in New Issue
Block a user