Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- My mission: migration from iron3 -> iron4 without using shared storage.
- # first see my sparse file
- [root@iron3 images]# ls -lAhs
- [...snip]
- 7.6G -rwxr-xr-x. 1 root root 500G Apr 29 18:51 ncr.raw
- # apparently you need to "prepare" the destination. if not, the migrate fails with:
- error: unable to set user and group to '107:107' on '/var/lib/libvirt/images/ncr.raw': No such file or directory
- # should I be doing this, or is there a better way ? Please note, this new image *is* sparse (and empty).
- [root@iron4 images] time qemu-img create -f raw ncr.raw 500G
- Formatting 'ncr.raw', fmt=raw size=536870912000
- # okay, go time!
- [root@iron3 ~]# time virsh migrate --verbose --live --copy-storage-all ncr qemu+ssh://iron4/system
- Migration: [ 0 %]
- ...
- [...finishes successfully after 78 minutes!]
- # note: this took so long because it didn't copy it in a "sparse" way (such as rsync -S can)
- [root@iron4 images]# ls -lAhs
- total 501G
- 501G -rw-r--r-- 1 qemu qemu 500G Apr 29 21:04 ncr.raw
- [root@iron4 images]# df -h
- Filesystem Size Used Avail Use% Mounted on
- /dev/mapper/vg_00-lv_root
- 621G 1009M 588G 1% /
- tmpfs 24G 0 24G 0% /dev/shm
- /dev/sda1 504M 42M 437M 9% /boot
- /dev/mapper/vg_00-lv_home
- 504M 17M 462M 4% /home
- /dev/mapper/vg_00-lv_var
- 1008G 501G 457G 53% /var
- # I can "fix" the image with qemu-img, but ideally it should stay sparse to begin with! What have I done wrong?
- [root@iron4 images]# mv ncr.raw ncr.raw.original
- [root@iron4 images]# time qemu-img convert ncr.raw.original ncr.raw
- Many thanks in advance,
- James
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement