[PVE-User] vzdump issue - couldn't detect volume group because of case sensitivity issue

Dietmar Maurer dietmar at proxmox.com
Wed Feb 23 12:27:40 CET 2011


Please can you test:

ftp://download.proxmox.com/debian/dists/lenny/pvetest/binary-amd64/vzdump_1.2-11_all.deb

Modified: vzdump/trunk/VZDump.pm
===================================================================
--- vzdump/trunk/VZDump.pm	2011-02-23 11:08:30 UTC (rev 5595)
+++ vzdump/trunk/VZDump.pm	2011-02-23 11:20:24 UTC (rev 5596)
@@ -641,7 +641,7 @@
     my $cmd = "lvs --units m --separator ':' --noheadings -o vg_name,lv_name,lv_size";
     if (my $fd = IO::File->new ("$cmd 2>/dev/null|")) {
 	while (my $line = <$fd>) {
-	    if ($line =~ m|^\s*(\S+):(\S+):(\d+(\.\d+))M$|) {
+	    if ($line =~ m|^\s*(\S+):(\S+):(\d+(\.\d+))[Mm]$|) {
 		my $vg = $1;
 		my $lv = $2;
 		$devmapper->{"/dev/$vg/$lv"} = [$vg, $lv];

- Dietmar

> -----Original Message-----
> From: pve-user-bounces at pve.proxmox.com [mailto:pve-user-
> bounces at pve.proxmox.com] On Behalf Of StalkR
> Sent: Mittwoch, 23. Februar 2011 09:46
> To: pve-user at pve.proxmox.com
> Subject: [PVE-User] vzdump issue - couldn't detect volume group because of
> case sensitivity issue
> 
> Hello,
> 
> Trying vzdump in LVM snapshot mode on an Ubuntu server 10.04 amd64 system,
> it was failing with "mode failure - unable to detect lvm volume group".
> We eventually found the culprit, on this system we have:
> # lvs --units m --separator ':' --noheadings -o vg_name,lv_name,lv_size
> vgname:lvname:10240.00m instead of the expected:
> vgname:lvname:10240.00M
> 
> Anyway, VZDump.pm has a regexp to match uppercase M. Adding the "i"
> flag for case insentivity solved the issue.
> Patch suggestion:
> 
> --- /usr/share/perl5/PVE/VZDump.pm.orig 2011-02-22 22:32:23.000000000
> +0100
> +++ /usr/share/perl5/PVE/VZDump.pm      2011-02-22 22:32:38.000000000
> +++ +0100
> @@ -619,7 +619,7 @@
>     my $cmd = "lvs --units m --separator ':' --noheadings -o
> vg_name,lv_name,lv_size";
>     if (my $fd = IO::File->new ("$cmd 2>/dev/null|")) {
>        while (my $line = <$fd>) {
> -           if ($line =~ m|^\s*(\S+):(\S+):(\d+(\.\d+))M$|) {
> +           if ($line =~ m|^\s*(\S+):(\S+):(\d+(\.\d+))M$|i) {
>                my $vg = $1;
>                my $lv = $2;
>                $devmapper->{"/dev/$vg/$lv"} = [$vg, $lv];
> 
> What do you think?
> 
> We first thought it was a locale problem, but vzdump is explicitely using:
> $ENV{LANG} = "C"; # avoid locale related issues/warnings So I'm not sure what
> causes this, maybe it will still bug for some strange locales.
> 
> Sincerely,
> --
> StalkR
> _______________________________________________
> pve-user mailing list
> pve-user at pve.proxmox.com
> http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-user


More information about the pve-user mailing list