KC LO
2010-Apr-15 03:49 UTC
[Xen-users] How to make snapshot disk backup of Xen Guest Domain
Hi all, I have created a DomU guest based on the following method :- 1) I create a LV with size 6GB : lvcreate -L 6G 2) I setup a new guest DomU with /dev/VolGroup00/vm1 as disk device 3) In DomU, I use /dev/hda as device to create partition for /boot, /, and swap without using LVM fdisk -l /dev/hda Disk /dev/hda: 10.7 GB, 10737418240 bytes 255 heads, 63 sectors/track, 1305 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/hda1 * 1 13 104391 83 Linux /dev/hda2 14 521 4080510 83 Linux /dev/hda3 522 782 2096482+ 82 Linux swap / Solaris I am now going to do snapshot disk backup at Dom0 for DomU. I have read Internet that I can do lvcreate -L 1G -s -n guest_snapshot /dev/VolGroup00/vm1 to create a Logical volume guest_snapshot. How can I mount the partition(/dev/hda1, /dev/hda2) under this volume guest_snapshot to do backup Thanks! _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Fajar A. Nugraha
2010-Apr-15 06:43 UTC
Re: [Xen-users] How to make snapshot disk backup of Xen Guest Domain
On Thu, Apr 15, 2010 at 10:49 AM, KC LO <kclo2000@gmail.com> wrote:> Hi all, > > I have created a DomU guest based on the following method :- > 1) I create a LV with size 6GB : lvcreate -L 6G > 2) I setup a new guest DomU with /dev/VolGroup00/vm1 as disk device > 3) In DomU, I use /dev/hda as device to create partition for /boot, /, > and swap without using LVM > fdisk -l /dev/hda > > Disk /dev/hda: 10.7 GB, 10737418240 bytes > 255 heads, 63 sectors/track, 1305 cylinders > Units = cylinders of 16065 * 512 = 8225280 bytes > > Device Boot Start End Blocks Id System > /dev/hda1 * 1 13 104391 83 Linux > /dev/hda2 14 521 4080510 83 Linux > /dev/hda3 522 782 2096482+ 82 Linux swap / Solaris > > I am now going to do snapshot disk backup at Dom0 for DomU. I have read > Internet that I can do > > lvcreate -L 1G -s -n guest_snapshot /dev/VolGroup00/vm1 > to create a Logical volume guest_snapshot. > > How can I mount the partition(/dev/hda1, /dev/hda2) under this volume > guest_snapshot to do backupkpartx -av /dev/VolGroup00/guest_snapshot You should end up with /dev/mapper/guest_snapshot1 and /dev/mapper/guest_snapshot2 (or similar) that you can mount. Afterwards, don''t forget to unmount it and run kpartx -dv /dev/VolGroup00/guest_snapshot -- Fajar _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
KC LO
2010-Apr-15 15:37 UTC
Re: [Xen-users] How to make snapshot disk backup of Xen Guest Domain
Thanks!. It works. Just another questions! Can use this method to backup windows folder? On 15 April 2010 14:43, Fajar A. Nugraha <fajar@fajar.net> wrote:> On Thu, Apr 15, 2010 at 10:49 AM, KC LO <kclo2000@gmail.com> wrote: > > Hi all, > > > > I have created a DomU guest based on the following method :- > > 1) I create a LV with size 6GB : lvcreate -L 6G > > 2) I setup a new guest DomU with /dev/VolGroup00/vm1 as disk device > > 3) In DomU, I use /dev/hda as device to create partition for /boot, /, > > and swap without using LVM > > fdisk -l /dev/hda > > > > Disk /dev/hda: 10.7 GB, 10737418240 bytes > > 255 heads, 63 sectors/track, 1305 cylinders > > Units = cylinders of 16065 * 512 = 8225280 bytes > > > > Device Boot Start End Blocks Id System > > /dev/hda1 * 1 13 104391 83 Linux > > /dev/hda2 14 521 4080510 83 Linux > > /dev/hda3 522 782 2096482+ 82 Linux swap / > Solaris > > > > I am now going to do snapshot disk backup at Dom0 for DomU. I have read > > Internet that I can do > > > > lvcreate -L 1G -s -n guest_snapshot /dev/VolGroup00/vm1 > > to create a Logical volume guest_snapshot. > > > > How can I mount the partition(/dev/hda1, /dev/hda2) under this volume > > guest_snapshot to do backup > > > kpartx -av /dev/VolGroup00/guest_snapshot > > You should end up with /dev/mapper/guest_snapshot1 and > /dev/mapper/guest_snapshot2 (or similar) that you can mount. > Afterwards, don''t forget to unmount it and run > > kpartx -dv /dev/VolGroup00/guest_snapshot > > -- > Fajar >_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Fajar A. Nugraha
2010-Apr-16 03:29 UTC
Re: [Xen-users] How to make snapshot disk backup of Xen Guest Domain
On Thu, Apr 15, 2010 at 10:37 PM, KC LO <kclo2000@gmail.com> wrote:> Thanks!. It works. > > Just another questions! Can use this method to backup windows folder?Sort of. Your dom0 needs to be able to mount ntfs (by default RHEL can''t), and your windows domU can''t use dynamic disk. As an alternative, you might want to look at backups on domU side using ntbackup. -- Fajar _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users