WARNING - OLD ARCHIVES

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/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

RE: [Xen-devel] Getting xen to recognise large disks

To: "Robin Bowes" <robin-lists@xxxxxxxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: RE: [Xen-devel] Getting xen to recognise large disks
From: "Ian Pratt" <m+Ian.Pratt@xxxxxxxxxxxx>
Date: Mon, 20 Nov 2006 23:31:12 -0000
Delivery-date: Mon, 20 Nov 2006 15:31:59 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <ejtat2$qs2$1@xxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AccM9crnmo/I4j+dSkqZewAFg5rQtgAA3l/g
Thread-topic: [Xen-devel] Getting xen to recognise large disks
>  - 8x500GB SATA drives combined as /dev/md2 (RAID6)
>  - /dev/md2 designated an LVM PV
>  - Volume Group vg_media created using /dev/md2
>  - Logical Volume lv_media created in vg_media
>  - ext3 filesystem created on lv_media
> 
> 
> I'm using the following disk config in my xen config file:
> 
> disk = [ 'phy:vg_host/lv_slim,xvda,w',
>          'phy:vg_media/lv_media,xvdb,w', ]
> 
> 
> However, /dev/xvdb is not appearing as the correct size in the DomU
guest:
> 
> >From /proc/partitions:
> 
> major minor  #blocks  name
>  202    16  782819328 xvdb
> 
> When I look at the same partition in the host, I see this:
> major minor  #blocks  name
>    9     2 2930303616 md2
> 
> There appears to be a problem in passing the size of the device to the
> DomU guest.

Hmm, 2930303616 - 2^31 = 782819968

Argh -- I can see the problem: see the connect function in blkfront.c.

Fortunately, it can be fixed without an interface change. Just change
'sectors' from an unsigned long to a blkif_sector_t and update the
xenbus_gather to use:  "sectors", "%llu", &sectors 

You'll also need to edit the xenbus_printf (to %llu) in the connect
function in blkback.c too.

Please post a patch!

Thanks,
Ian







_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel