Please see attached a patch to implement resize for the DRBD backend.
I hope it matches all your coding style guidelines;
feedback is welcome, of course.
Regards,
Phil
From 4ceb4d737d4c604dcf99bbd46d60d731626e9781 Mon Sep 17 00:00:00 2001
From: root r...@proxmox4b2.at.linbit
Date: Mon, 3 Aug
-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
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?
I just scanned the drbdmanage sources, and the corresponding
Please see attached a patch to implement resize for the DRBD backend.
I hope it matches all your coding style guidelines;
feedback is welcome, of course.
Please can you send patches inline? That way it is easier to review code
and add comments. I copied the code for this purpose -
Hi Dietmar,
> I just started to implement a PVE storage driver for lvmthin:
>
> https://git.proxmox.com/?p=pve-storage.git;a=blob;f=PVE/Storage/LvmThinPlugin.pm
>
> So far I just use:
>
> sub volume_snapshot_rollback {
> my ($class, $scfg, $storeid, $volname, $snap) = @_;
>
> my $vg =
> > * There's no implementation for volume_snapshot_rollback() yet.
> >Is there a way to change the volume name on rollback?
> >The problem is that DRBDmanage (as of now) won't allow to _replace_
> >the current contents with the ones from the snapshot --
> >but perhaps we want to
> First, code looks reasonable to me, but I am unable to test
> without a working rollback. Some comments inline:
> > -die "Snapshot not implemented on DRBD\n" if $snapname;
> > +return activate_volume_from_snapshot(@_) if $snapname;
>
> I would prefer to list all parameters by name
> 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.
Okay, will do.
___
pve-devel mailing list
pve-devel@pve.proxmox.com
Hi Dietmar,
> Does not work for me - you already uploaded required versions to public drbd
> git repository?
Yes, the DRBD 9 is upstream:
http://git.drbd.org/drbd-9.0.git/commit/03431bc8a61ca022e4149c546ade1e1e86c2deea
The DRBDmanage one not yet - this needs a cluster-wide operation (first
---
src/PVE/Tools.pm | 20 ++--
1 file changed, 6 insertions(+), 14 deletions(-)
diff --git a/src/PVE/Tools.pm b/src/PVE/Tools.pm
index 3f3958e..cda0797 100644
--- a/src/PVE/Tools.pm
+++ b/src/PVE/Tools.pm
@@ -940,21 +940,13 @@ sub random_ether_addr {
my $rand =
Sorry, I used "git email-send" badly -- I wanted to write preface email,
as usual, but forgot the --compose commandline argument (and "compose=true"
in .git/config doesn't seem to work).
About this patch I wanted to mention a few things:
* This implementation works with the small script at
---
PVE/Storage/DRBDPlugin.pm | 10 +-
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/PVE/Storage/DRBDPlugin.pm b/PVE/Storage/DRBDPlugin.pm
index b150b16..14f232b 100644
--- a/PVE/Storage/DRBDPlugin.pm
+++ b/PVE/Storage/DRBDPlugin.pm
@@ -364,7 +364,7 @@ sub volume_resize {
---
PVE/Storage/DRBDPlugin.pm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/PVE/Storage/DRBDPlugin.pm b/PVE/Storage/DRBDPlugin.pm
index 91addc5..b150b16 100644
--- a/PVE/Storage/DRBDPlugin.pm
+++ b/PVE/Storage/DRBDPlugin.pm
@@ -314,7 +314,7 @@ sub activate_volume {
> First, many thanks for the patch!
>
> > +my $mac = sprintf("%02X:" x 6, unpack("C6", $rand));
> > +
> > +# remove superfluous ":" at end
> > +chop($mac);
>
> I wonder if it would be simpler to use a static format string instead?
>
> my $mac =
> this is neccessay because otherwise when a storage is not mounted, like when
> it is offline, the migration crash.
> ---
> src/PVE/LXC.pm | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/src/PVE/LXC.pm b/src/PVE/LXC.pm
> index cf45fff..7e5cc7d 100644
> ---
> > > Above container management toolkit 'pct' already supports drbd, and it
> > > would
> > > be really cool to have snapshots, so that we can make snapshot and
> > > snapshot backups ;-)
> > The same should be easily possible for KVM, too.
>
> Yes, but we do not need that for KVM backup
mes, which are created
> with vdisk_create_base(). If most cases, this just marks the volumes as
> 'read-only' and renames them. I guess dm-thin could
> make a 'clone' by simply creating a writable snapshot of such read-only
> volumes?
Yeah, that's what we do - snapshots[1] from writable volume
Hi Dietmar,
> > > 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?
> >
> > I just scanned the drbdmanage sources, and the corresponding implementation
> > is empty (always return success)?
> >
>
Hi,
I'm currently implementing the snapshot functions for the DRBD backend; but
a few questions have popped up, so I'm asking them here.
*) The first question is - how would these get called? "pvesm" shows no
matching arguments, and the GUI has no "snapshot" buttons either.
Does that hide
19 matches
Mail list logo