OpenVZ Forum


Home » General » Support » [SOLVED] vzdump snapshot: mode failure - unable to detect lvm volume group (Cannot make a snapshot dump because of bad LVM detection)
[SOLVED] vzdump snapshot: mode failure - unable to detect lvm volume group [message #41022] Thu, 04 November 2010 17:51 Go to next message
narcisgarcia is currently offline  narcisgarcia
Messages: 41
Registered: May 2009
Member
Trying to make a backup with:
vzdump --snapshot 10000

makes another kind of copy:
INFO: starting new backup job: vzdump --snapshot 10000
INFO: Starting Backup of VM 10000 (openvz)
INFO: CTID 10000 exist mounted running
INFO: status = CTID 10000 exist mounted running
INFO: mode failure - unable to detect lvm volume group
INFO: trying 'suspend' mode instead


This is the result of vgdisplay:
  --- Volume group ---
  VG Name               gexterior
  System ID             
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  5
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                3
  Open LV               3
  Max PV                0
  Cur PV                1
  Act PV                1
  VG Size               372,14 GiB
  PE Size               4,00 MiB
  Total PE              95268
  Alloc PE / Size       95003 / 371,11 GiB
  Free  PE / Size       265 / 1,04 GiB
  VG UUID               *****************


I've tried this in another computer with separate volume for /vz and it doesn't help.
According to the possible bug in subfunction get_lvm_mapping in /usr/share/perl5/PVE/VZDump.pm , I've tested results of commands:

lvs --units m --separator ':' --noheadings -o vg_name,lv_name,lv_size 2>/dev/null
  gexterior:sistema:19072,00m
  gexterior:swap:5720,00m
  gexterior:vz:1881504,00m


env LANG=C lvs --units m --separator ':' --noheadings -o vg_name,lv_name,lv_size 2>/dev/null
  gexterior:sistema:19072,00m
  gexterior:swap:5720,00m
  gexterior:vz:1881504,00m


env LANGUAGE=en lvs --units m --separator ':' --noheadings -o vg_name,lv_name,lv_size 2>/dev/null
  gexterior:sistema:19072,00m
  gexterior:swap:5720,00m
  gexterior:vz:1881504,00m


T've tried to replace the "--units m" by "--units M" and also the regex "\." by "[\.,]" but the backup method results the same.


Narcis Garcia

[Updated on: Sun, 14 November 2010 10:53]

Report message to a moderator

get_lvm_mapping regex solved [message #41023 is a reply to message #41022] Thu, 04 November 2010 17:56 Go to previous message
narcisgarcia is currently offline  narcisgarcia
Messages: 41
Registered: May 2009
Member
I'm using vzdump 1.2.4
A patch is needed for function get_lvm_mapping in the file "VZDump.pm":

Change the line:
if ($line =~ m|^\s*(\S+):(\S+):(\d+(\.\d+))M$|) {

For the following:
if ($line =~ m|^\s*(\S+):(\S+):(\d+([\.,]\d+))[mM]$|) {


Then LVM devices will be well-detected worldwide.


Narcis Garcia

[Updated on: Sun, 14 November 2010 13:30]

Report message to a moderator

Previous Topic: Wrong second level quotas for specific users
Next Topic: Can't ping HN from VEs; ssh to VEs connects directly to HN
Goto Forum:
  


Current Time: Sun Nov 03 14:28:50 GMT 2024

Total time taken to generate the page: 0.06307 seconds