[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-users] How to list the drives a DomU is using, and their types -- with or without a parition -- from the Dom0?

  • To: xen-users@xxxxxxxxxxxxx
  • From: billb@xxxxxxx
  • Date: Mon, 15 Feb 2016 11:02:16 -0800
  • Delivery-date: Mon, 15 Feb 2016 19:02:31 +0000
  • List-id: Xen user discussion <xen-users.lists.xen.org>

Backing up Xen DomUs' LVM disks

When I install a DomU from a OS install disk, I pass it an LV I created on the 

So the initial .cfg has 

        disk = [ 'phy:/dev/VG0/GUEST01_OS,hda,w', 

The installer process creates a partition on that LV.

Later I'll often add another LV, created on the Dom0 host, for the guest to use 
for data.

So my run-time .cfg ends up with, for example

        disk = [ 'phy:/dev/VG0/GUEST01_OS,hda,w', 

Now I want to make a backup of this Guest, using LV snapshots.

/dev/VG0/GUEST01_DATA I can snapshot directly.

But because 'hda' has a partition in it, you have to 1st

        kpartx -av /dev/VG0/GUEST01_OS

then snapshot the mounted partition inside


This works fine -- when you know ahead of time if each Guest disk has a 
partition in it or not.

I want to automate/script the backup process.

How can I query a DomU Guest from the Dom0 host to

  (1) list all the drives in use


  (2) identify each drive's "type" -- with, or without, a partition in it?


Xen-users mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.