[pve-devel] Implement "resize" for the DRBD backend.
Dietmar Maurer
dietmar at proxmox.com
Tue Aug 4 10:43:01 CEST 2015
> > - my $path = $class->path($scfg, $volname);
> > + die "illegal name '$name' - should be 'vm-*-*'\n"
> > + if $name !~ m/^vm-\d+-/;
> >
> > And reason for above check? Or did you just copied that code from
> > alloc_image?
> Right. And that's why I changed the name - to keep it the same.
> Is that a bad approach?
I just think you don't need to verify the name here.
>
> > - # 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
> >
> > not sure if we ever want to support multiple volumes inside one resource?
> > Why would we want to do that?
> So that the volumes use a common write stream across the network.
>
> If you have eg. a database that uses 3 volumes (data, log data, write-ahead
> log), you want to have these three at the *same* point in time.
>
> When one of 3 connections breaks, then the other two volumes could run
> ahead - and if the Primary node breaks down at that time, the Secondary
> wouldn't have 3 consistent volumes, which might lead to troubles.
Ah, OK.
> > Anyways, I tested the patch, and volume_resize() now returns without errors.
> > The problem is that it does not resize the underlying LVM volume.
> >
> > Do I need to install any drbdmanage updates/patches to make that work?
> Well, as the commit message says, there's a small problem in
> DRBD/drbdmanage right now.
Oh, somehow I did not read the commit message ...
> I'm aware that this makes my patch not overly useful; I wanted to have
> a small first patch, so that I can see the coding conventions.
Makes sense. But I will not apply the patch until those bugs are fixed.
More information about the pve-devel
mailing list