[Fedora-xen] How to backup a Domu filesystem (on LVM) from Dom0 on Fedora 8 ?
Anne Facq
annefacq at crpp-bordeaux.cnrs.fr
Wed Jan 23 23:35:24 UTC 2008
Aaron Clark wrote:
> Anne Facq wrote:
>> Hello
>>
>> I use XEN on Fedora 8 with Domu on a LVM partition.
>>
>> Before, on Fedora Core 6, I could backup each Domu by directly
>> mounting the filesystem of the Domu (mount /dev/vg00/lvfoo /mnt) and
>> then running dump on it.
>>
>> On Fedora 8, I can't mount directly the filesystem of the Domu, so I
>
> Pardon if this is a dumb question, but why not?
Because in Dom0 the device for a paravirt Domu (/dev/vg00/lvfoo in my
case) is mapped to a virtual disk /dev/xvda (I created the Domu with
virt-install), and the only way I found to mount this Domu filesystem,
is to :
- get the size of the boot sector of /dev/vg00/lvfoo
(with fdisk -ul /dev/vg00/lvfoo)
= 63
- compute the offset (multiply by block size)
- specify this offset to the mount command :
mount -o offset=32256 /dev/vg00/lvfoo /mnt/
As I can't specify an offset to dump, the command "dump 0 -f lvfoo.dump
/mnt" doesn't work.
>> backup the filesystem of the Domu using the dd command (dd
>> if=/dev/vg00/lvfoo of=/var/xen/lvfoo.img)
>> But the backup with dd is longer and takes more disk space than the
>> backup with dump, as dd copies unused blocks.
>>
>> Is there a better method to backup a Domu filesystem from Dom0 on
>> Fedora 8 ?
>
> I suppose you could use the img2qcow tool (possibly directly on
> /dev/vg00/lvfoo) to get a qcow file instead of a raw image. However, I
> vaguely remember seeing somewhere that the qcow created by the xen tools
> is not necessarily 100% compatible with other qcow tools.
Thanks for you help, I'm going to have a look at it.
Regards,
Anne Facq
More information about the Fedora-xen
mailing list