LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Virtualization and Cloud
User Name
Password
Linux - Virtualization and Cloud This forum is for the discussion of all topics relating to Linux Virtualization and Linux Cloud platforms. Xen, KVM, OpenVZ, VirtualBox, VMware, Linux-VServer and all other Linux Virtualization platforms are welcome. OpenStack, CloudStack, ownCloud, Cloud Foundry, Eucalyptus, Nimbus, OpenNebula and all other Linux Cloud platforms are welcome. Note that questions relating solely to non-Linux OS's should be asked in the General forum.

Notices

Reply
 
Search this Thread
Old 09-29-2010, 06:00 AM   #1
tkmsr
Member
 
Registered: Oct 2006
Distribution: Ubuntu,Open Suse,Debian,Mac OS X
Posts: 798

Rep: Reputation: 38
how to restore backup from an LVM Guest OS on KVM Lucid


I have a Ubuntu 64 bit 10.04 instance running.KVM is used for virtualization.
4 Guest Operating Systems are running on it.
I created 4 lvms after installing the Host OS.
I have a volume group nintendo which have four lvms
as
Code:
lvscan
  ACTIVE    '/dev/nintendo/lvm1' [100.00 GiB] inherit
  ACTIVE    '/dev/nintendo/lvm2' [150.00 GiB] inherit
  ACTIVE    '/dev/nintendo/lvm3' [50.00 GiB] inherit
  ACTIVE     '/dev/nintendo/lvm4' [100.00 GiB] inherit
but in the above 4 lvms I did not created swap partitions.
These things were taken care via virt-manager when I installed the guest OS.
So when I took backup I did not took backup of swap paritions.
I have the complete directory structure from lvm1 which I took the backup.
If I have to replace one of the lvm with the original backup then is just copying the complete directory structure going to work.
Or there is some elegant way to do this?
 
Old 09-29-2010, 06:07 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,373

Rep: Reputation: 1962Reputation: 1962Reputation: 1962Reputation: 1962Reputation: 1962Reputation: 1962Reputation: 1962Reputation: 1962Reputation: 1962Reputation: 1962Reputation: 1962
it's quite unclear what you're doing here really, you want to know how to restore a backup of one LVM device? Well if that's the case then KVM has nothign to do with any of this, and you simply have a boring block device in the LVM LV, the contents of which you can dd in and out as often as you desire. Obviously the KVM instance should be shut down throughout changes, but it's fairly simple stuff there. Swap should have no relevance in any of this. You shouldn't need swap in a vm, as I understand it you should allocate as much memory ass you see fit and KVM will swap out the physical host memory to host based swap if need be, but either way a swap partition would be inside the LV, so just more binary data when looking at it at the LVM level.
 
Old 09-29-2010, 06:12 AM   #3
tkmsr
Member
 
Registered: Oct 2006
Distribution: Ubuntu,Open Suse,Debian,Mac OS X
Posts: 798

Original Poster
Rep: Reputation: 38
Quote:
Originally Posted by acid_kewpie View Post
you want to know how to restore a backup of one LVM device?
Yes.
I got the following error when I tried to boot from the backup on USB
Code:
Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/manager.py", line 652, in restore_saved_callback
    newconn.restore(file_to_load)
  File "/usr/share/virt-manager/virtManager/connection.py", line 681, in restore
    self.vmm.restore(frm)
  File "/usr/lib/python2.6/dist-packages/libvirt.py", line 1453, in restore
    if ret == -1: raise libvirtError ('virDomainRestore() failed', conn=self)
libvirtError: operation failed: image magic is incorrect
When I took the backup I created a snpashot of LVM and mounted that
snapshot in some location.This mounted directory I copied on a USB via rsync and I am trying to boot this.

Last edited by tkmsr; 10-01-2010 at 01:33 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] migrating from vmware to kvm, lvm partitioned guest failed to boot chakoshi Linux - Virtualization and Cloud 3 03-20-2011 04:34 PM
KVM: Mouse under Windows Guest performs way better than under Centos Guest martdj Linux - Virtualization and Cloud 3 03-29-2010 04:20 AM
LVM backup/restore question rakrhn Linux - Server 4 06-28-2009 03:10 PM
Redhat LVM backup / restore issues? linux-who? Linux - Server 2 01-02-2008 03:37 PM
Backup/Restore - LVM, RAID keith ralph Linux - General 0 04-19-2006 08:31 AM


All times are GMT -5. The time now is 06:34 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration