--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(a)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(a)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--