
--Sig_/.lLlEVeLgvPZAtF/dI+yD0s Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Hello, I'm using oVirt 3.5.x w/nfs for vm file storage. I'm trying to restore a vm from backup, which entails: - scp backup.tar to vm - untar backup on vm this means all the data makes 3 trips over the network, each of which causes a load spike on my nfs server. That nfs load, of course, affects all other vms. what I'd like to be able to do is - scp backup.tar to nfs server - stop vm - mount vm disks on nfs server - untar backup on nfs server (using ionice to minimze load impact) - unmount vm disks - start vm I remember that I used to use kpartx to mount regular KVM disks, so I'm hoping that it can also be done here. Anyone else tried to make this work? Robert --=20 Senior Software Engineer @ Parsons --Sig_/.lLlEVeLgvPZAtF/dI+yD0s Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iEYEARECAAYFAldvXM8ACgkQ7/fVLLY1mni4KwCdFDpmX8f3BumEgulWCmcUiiNz m6wAnReCZ1roZh10nXVW0iIYKtl+M9gE =KDOJ -----END PGP SIGNATURE----- --Sig_/.lLlEVeLgvPZAtF/dI+yD0s--

Hi Robert, I've modified disk images for oVirt virtual machines before. I mostly run servers so they all use preallocated as opposed to thin provisioned disks. I'm not sure if that matters, but it means my VM disk images are raw files (as opposed to qcow). Therefore, I used something like the following guide to get into the disk image. These directions don't use kpartx or libguestfs, but I guess those would work too. I think it goes without saying, your VM should be off before you modify its disk without its knowledge. https://major.io/2010/12/14/mounting-a-raw-partition-file-made-with-dd-or-dd... For me, the biggest problem I had was the partition in the disk image was really an LVM PV. And that LVM group had the same volume group name as one on the server I was doing this modification. I had two volume groups with the same name, which made things a little tricky. But I'll leave that to you to figure out :) Scott On Sat, Jun 25, 2016 at 11:41 PM Robert Story <rstory@tislabs.com> wrote:
Hello,
I'm using oVirt 3.5.x w/nfs for vm file storage. I'm trying to restore a vm from backup, which entails:
- scp backup.tar to vm - untar backup on vm
this means all the data makes 3 trips over the network, each of which causes a load spike on my nfs server. That nfs load, of course, affects all other vms.
what I'd like to be able to do is
- scp backup.tar to nfs server - stop vm - mount vm disks on nfs server - untar backup on nfs server (using ionice to minimze load impact) - unmount vm disks - start vm
I remember that I used to use kpartx to mount regular KVM disks, so I'm hoping that it can also be done here. Anyone else tried to make this work?
Robert
-- Senior Software Engineer @ Parsons _______________________________________________ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users

--Sig_/jBdN.9S3ygraKi7=+GJfKJ5 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable So as (bad) luck would have it, I needed to restore an older backup that the one I initially used. This time I decided to dig deeper into this possibility, and got it working. libguestfs took care of all the dirty work, even with dealing with snapshots and thin provisioning. Here's what I did: - yum install libguestfs libguestfs-tools-c - find the disk id - via GUI 'Disks' tab, search for VM in 'attached to' column, copy disk ID - shut down vm - on nfs server - switch to the directory for the ID found above - e.g. cd /srv/ovirt/storage/*/images/$ID/ - find latest modified file: ls -lt - mount it: guestmount -a $last_modified_file -m /dev/vg_el7/root /mnt/tmp - start restore - cd /mnt/tmp - ionice -c 3 tar xvf /tmp/backup.tar Average load on my NFS server for about 12 VMs is generally less than 1. During the initial restore over the weekend, run on the VM, restore took 5 hours and the load climbed up to 16. I'm running the new restore now, and the load is holding steady at just under 2. Robert On Sun, 26 Jun 2016 12:27:24 +0000 Scott wrote: S> Hi Robert, S>=20 S> I've modified disk images for oVirt virtual machines before. I mostly r= un S> servers so they all use preallocated as opposed to thin provisioned disk= s. S> I'm not sure if that matters, but it means my VM disk images are raw fil= es S> (as opposed to qcow). Therefore, I used something like the following gu= ide S> to get into the disk image. These directions don't use kpartx or S> libguestfs, but I guess those would work too. I think it goes without S> saying, your VM should be off before you modify its disk without its S> knowledge. S>=20 S> https://major.io/2010/12/14/mounting-a-raw-partition-file-made-with-dd-o= r-dd_rescue-in-linux/ S>=20 S> For me, the biggest problem I had was the partition in the disk image was S> really an LVM PV. And that LVM group had the same volume group name as = one S> on the server I was doing this modification. I had two volume groups wi= th S> the same name, which made things a little tricky. But I'll leave that to S> you to figure out :) S>=20 S> Scott S>=20 S> On Sat, Jun 25, 2016 at 11:41 PM Robert Story <rstory@tislabs.com> wrote: S>=20 S> > Hello, S> > S> > I'm using oVirt 3.5.x w/nfs for vm file storage. I'm trying to restore= a vm S> > from backup, which entails: S> > S> > - scp backup.tar to vm S> > - untar backup on vm S> > S> > this means all the data makes 3 trips over the network, each of which S> > causes a load spike on my nfs server. That nfs load, of course, affect= s all S> > other vms. S> > S> > what I'd like to be able to do is S> > S> > - scp backup.tar to nfs server S> > - stop vm S> > - mount vm disks on nfs server S> > - untar backup on nfs server (using ionice to minimze load impact) S> > - unmount vm disks S> > - start vm S> > S> > I remember that I used to use kpartx to mount regular KVM disks, so I'm S> > hoping that it can also be done here. Anyone else tried to make this w= ork? S> > S> > S> > Robert S> > S> > -- S> > Senior Software Engineer @ Parsons S> > _______________________________________________ S> > Users mailing list S> > Users@ovirt.org S> > http://lists.ovirt.org/mailman/listinfo/users S> > =20 Robert --=20 Senior Software Engineer @ Parsons --Sig_/jBdN.9S3ygraKi7=+GJfKJ5 Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iEYEARECAAYFAldxPtkACgkQ7/fVLLY1mnggNwCbBj7F5V6E/S7TFLQB5BpMvAZb pOgAoIV19ibgV4fG56e9WTLKOQfksa17 =OX2d -----END PGP SIGNATURE----- --Sig_/jBdN.9S3ygraKi7=+GJfKJ5--
participants (2)
-
Robert Story
-
Scott