This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
Home Products Support Community News


[Xen-users] Re: which disks/block device does Xen use at the moment?

To: xen-users@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-users] Re: which disks/block device does Xen use at the moment?
From: "Alex Bodom" <news@xxxxxxxxxx>
Date: Wed, 21 Nov 2007 09:03:08 +0300
Delivery-date: Tue, 20 Nov 2007 22:04:14 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-users-request@lists.xensource.com?subject=help>
List-id: Xen user discussion <xen-users.lists.xensource.com>
List-post: <mailto:xen-users@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=unsubscribe>
References: <47419CE6.9010603@xxxxxxxx> <4741AC22.3000407@xxxxxxxxx><4741AE51.7050806@xxxxxxxx> <4741B5C7.9010201@xxxxxxxxx>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx

Maybe you'll find these one-liners useful for your case, I've wrote them for 
machines that use image files as their disks:

for i in `xm list | grep -v Name | grep -v Domain | awk '{print $1}'`; do 
vpath=`xm block-list $i | head -n 2 | tail -n 1 | awk '{print $7}'`; echo 
$i: `xenstore-read $vpath/params`; done

In other words, I do
xm block-list domUname | awk '{print $7}'
to get virtual paths for domU's block devices and then
xenstore-read $vpath/params
to find out which image is in use.

You can also try
xenstore-read $vpath/node
I get a name of loop device that image is connected to through this line.

"Nico Kadel-Garcia" <nkadel@xxxxxxxxx> wrote in message 
> Tomasz Chmielewski wrote:
>> Nico Kadel-Garcia schrieb:
>> Would be great if Xen registered some "holders" in /sys/block for a 
>> device it uses - like LVM or RAID does in /sys/block/<device>/holders/

Xen-users mailing list

<Prev in Thread] Current Thread [Next in Thread>