[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-users] snapshot - backup for xen vm's


  • To: "Fajar A. Nugraha" <fajar@xxxxxxxxxxxxx>
  • From: Nico Kadel-Garcia <nkadel@xxxxxxxxx>
  • Date: Fri, 25 May 2007 00:19:38 +0100
  • Cc: Xen-users@xxxxxxxxxxxxxxxxxxx
  • Delivery-date: Thu, 24 May 2007 16:15:19 -0700
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:user-agent:mime-version:to:cc:subject:references:in-reply-to:content-type:content-transfer-encoding; b=ir0iMoAFfYxXhGXIn/4M3fDiXtZj/vJTbsWK5fuFIfWCYM/ozyV71mr83HmLzQicsy3TJ+VLvCk3lkyqEimKdsdKjJDR+02Qhc63F1Kw4WgCu5IWjhb7kBqN6L93isojPupufvnr0ARmk8GfZjOytyYlh0BiLnpbZyIP7iItAPA=
  • List-id: Xen user discussion <xen-users.lists.xensource.com>

Fajar A. Nugraha wrote:
it-news (Josef Lahmer) wrote:
is there a way to make a lvm-snapshot of an running xen-vm to implement a function like 
"snapshot-backup"?

#) make snapshot
#) mount snapshot
#) copy files
#) umount snapshot
#) remove snapshot

eg (http://tldp.org/HOWTO/LVM-HOWTO/snapshots_backup.html)

regards
josy

interessting: How to mount a XenVM filesystem on XenServer Host:
http://kb.xensource.com/entry.jspa?categoryID=14&externalID=162


If you :
- use an LV (NOT files) on dom0 as storage for domU's block device
- use partitions on domU (NOT LVM)

Then both link are applicable right away, in the sense that :
- you create an LVM-snapshot of the LV used by domU
- use kpartx to create block device nodes for partitions on that
LVM-snapshot
- mount the partitions
- copy files
- umount partitions
- remove LVM snapshot

Personally, I prefer using dom0-LVM directly as partitions on domU (i.e.
all partitioning and LVM is handled by dom0). But that will also mean I
can't install domU using Anaconda (in the case of RHEL), I have to
manually copy it form an exisisting physical machine.
yum --installroot should work, but you need to do some extra
configurations afterwards.
Yast install to directory on SUSE should also work.
Unfortunately, that piece of over-hyped installatiion obscurity known as libvirt does not allow you options to do this, and mandates the use of pygrub. This means that you must have a /dev/xdva device, and grub itself only works if you have a disk, not if you only have partitions.

Anaconda is also not your friend: but it's possible to do RPM or yum installs into a target directory to build your initial OS images on a partition, edit your configuration files there, and boot that. Just beware that "touch" commands in certain RPM post-install scripts will hang and need to be slapped in the head to allow the yum installation to complete.

I'll publish my widget for this when I have a few cycles. It's also very, very helpful to have enough disk in the partiton to mirror the *whole* RedHat or Fedora installation directory. But doing things this way also allows you to do all your updates at the same time, with a chroot command, which I consider a *huge* bonus.

_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.