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

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



On Tue, 2016-02-16 at 06:04 -0800, billb@xxxxxxx wrote:
> 
> On Tue, Feb 16, 2016, at 03:22 AM, Roger Pau Monnà wrote:
> > Try xl block-list $DOMU?
> 
> That gives you something like
> 
> xl block-list 6
> VdevÂÂBEÂÂhandle state evt-ch ring-ref BE-pathÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ
> 768ÂÂÂ0ÂÂÂ6ÂÂÂÂÂÂ4ÂÂÂÂÂ16ÂÂÂÂÂ8ÂÂÂÂÂÂÂÂ/local/domain/0/backend/vbd/6/768
> 832ÂÂÂ0ÂÂÂ6ÂÂÂÂÂÂ4ÂÂÂÂÂ17ÂÂÂÂÂ9ÂÂÂÂÂÂÂÂ/local/domain/0/backend/vbd/6/832
> 
> How do map those BE-paths to a /dev/disk or /dev/mapper path that I can
> use in an lvcreate command at the Dom0?
> 
> > This is not specific to Xen. I guess you can write a script to parse
> > output from "kpartx -l"?
> 
> Ok, so nothing in the xen info has 'knowledge' about thar?

If the partition table is "internal" to the guest disk (what we sometimes
call "whole disk") then its partitioning scheme indeed not really visible
to Xen, although you could use normal Linux tools such as kpartx to "peek
behind the curtain" as it were.

It might be too late for your configuration but Xen also supports exposing
backend devices as individual partitions within the guest, i..eÂ

    disk = [ 'phy:/dev/VG0/GUEST01_OS,xvda1,w',
        Â'phy:/dev/VG0/GUEST01_SWAP,xvda2,w' ]

However this only works for PV disks and not emulated ones (since nothing
actually emulates the partition table, this is all done in the disk
frontend).

> ÂÂI have to test & see, once I have the disk path?
> 
> > Why don't you just snapshot the whole volume, even if it has partitions
> > inside?
> 
> ÂI want to tar.gz the result.ÂÂIIUC, I need the contents for that, right?

I think Roger was suggesting you could snapshot the whole device and run
kpartx on the snapshot, rather than vice versa as your initial mail
suggested.

Ian.

_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxx
http://lists.xen.org/xen-users

 


Rackspace

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