[pve-devel] [PATCH 1/5] DRBD: Implement "resize".

Dietmar Maurer dietmar at proxmox.com
Thu Oct 15 08:54:34 CEST 2015


Please can you resend this one when the required drbdmanage changes are 
online?
I cannot commit this one because it fails with current drbdmanage code.

On 10/08/2015 10:24 AM, Philipp Marek wrote:
> Needs a recent DRBDmanage and DRBD 9 version - 9.0.0 has a known bug.
> ---
>   PVE/Storage/DRBDPlugin.pm | 15 ++++++---------
>   1 file changed, 6 insertions(+), 9 deletions(-)
>
> diff --git a/PVE/Storage/DRBDPlugin.pm b/PVE/Storage/DRBDPlugin.pm
> index b780829..565fb4c 100644
> --- a/PVE/Storage/DRBDPlugin.pm
> +++ b/PVE/Storage/DRBDPlugin.pm
> @@ -365,17 +365,14 @@ sub deactivate_volume {
>   sub volume_resize {
>       my ($class, $scfg, $storeid, $volname, $size, $running) = @_;
>   
> -    $size = ($size/1024/1024) . "M";
> -
> -    my $path = $class->path($scfg, $volname);
> +    $size = int($size/1024);
> +    my $hdl = connect_drbdmanage_service();
>   
> -    # fixme: howto implement this
> -    die "drbd volume_resize is not implemented";
> -
> -    #my $cmd = ['/sbin/lvextend', '-L', $size, $path];
> -    #run_command($cmd, errmsg => "error resizing volume '$path'");
> +    # FIXME if there's ever more than one volume in a resource
> +    my ($rc) = $hdl->resize_volume($volname, 0, 0, $size, 0);
> +    check_drbd_res($rc);
>   
> -    return 1;
> +    return undef;
>   }
>   
>   sub volume_snapshot {





More information about the pve-devel mailing list