Xin Chen wrote:
> idea 2: given by Fajar, correct me if I misunderstand.
> 1), assume I put all guest images in dom 0 /var/lib/xen/images
> (image1, image2 ...) each image is a guest system.
> 2), make snapshot for /var/lib/xen/images. question: if image1 is
> 10G, image2 is 20G, how large the snapshot needs? 30G enough? I am
> quit sure how snapshot works when it is a very big image file.
For LVM snapshots, you have to allocate enough space to accomodate
CHANGES only. For example :
- if you have 30G total of data (in this case disk image) to backup
- backup process is estimated to take 1 hour
- in that 1 hour, it is estimated that would be 5 GB changes
then you only need to allocate 5GB or so for the snapshot. The command
"lvs" will show you how much space is used for snapshot. You need to
make sure that the snapshot isn't 100% full. Example :
LV VG Attr LSize Origin Snap% Move Log Copy%
rootlv rootvg owi-ao 10.00G
rootsnaplv rootvg swi-ao 1.00G rootlv 0.06
In this case the original filesystem is 10GB, and I allocate 1 GB for
the snapshot, from which only
0.06 is used.
> 3), mount snapshot
> 4), copy image1 .... copy image2.......
> 5), umount
> 6), remove snapshot.
> question: the image1.bak actually is a backup of a running guest
> system, when I start the system by this image1.bak, the system is
> gonna be OK? It is like a reboot a running system, isn't it?
Exactly. To be more specific, it will be like if you run "reboot -f", or
a reboot in the event of power failure. There will be some automatic
log-replay (if you use journaling filesystem), but if your system can
survive a power failure then it can survive the snapshot-backup-restore.
Xen-users mailing list