[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, Feb 16, 2016, at 06:13 AM, Wei Liu wrote:
> Hmm... Right, it is not immediately visible to end user.
> 
> You can then use the BE-path to do
> 
>   xenstore-ls -f /local/domain/0/backend/vbd/6/768/
> 
> and
> 
>   xenstore-read /local/domain/0/backend/vbd/6/768/params

That gives exactly what I need.  Thanks!

> The hypervisor and the backend don't know what the frontend does to
> its disk -- they don't care and shouldn't care.

I'd thought that Xen 'figured out' what kind of disk structure it's mounting.  
Ok, guess not.

> Parsing output from kpartx is the right solution.

I was trying to avoid it.  Only because I was told elsewhere not to use it 
'with VMs' and that I should use 'libguestfs' instead.  I looked at that, and 
I'd have to install a bunch of stuff onto the Dom0 that's not there yet, and 
then figure out how to use it.

Wasn't sure what's the riight tool.

> If you want to extract the files from its file system, sure. But if
> all you want is a disk image, you can just take a snapshot of that
> disk image.

I want the backup (a) smaller, and (b) on another storage device.

TBH, I don't really care what method I end up using.  As long as it's reliable.

I thought that snaps had to remain 'in' the VG, and they can get kind of large.

So I ended with small&portable tar/gz.

On Tue, Feb 16, 2016, at 06:17 AM, Ian Campbell wrote:

> 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.

Ok, so sounds like the same approach recommended by Wei.  Great.

> 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).

This one is an HVM.  Or actually what's called the PVHVM.  Since those options 
are turned on.

So for this kind I guess I'll have to 'peek' with kpartx.

> >  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.

That's what I'm already doing.  Guess I described it wrong.

With the xl block-list etc, and the kpartx 'peek', I can script it now.

I'd been looking for an easy , "built-in" backup step.  This seems as close as 
I get.

Bill

_______________________________________________
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®.