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] Re: Getting xen to recognise large disks

To: Robin Bowes <robin-lists@xxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] Re: Getting xen to recognise large disks
From: "Daniel P. Berrange" <berrange@xxxxxxxxxx>
Date: Tue, 21 Nov 2006 01:51:04 +0000
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Mon, 20 Nov 2006 17:51:16 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <ejtlfj$of8$1@xxxxxxxxxxxxx>
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> <8A87A9A84C201449A0C56B728ACF491E01F905@xxxxxxxxxxxxxxxxxxxxxxxxxxx> <ejtj57$j01$1@xxxxxxxxxxxxx> <ejtlfj$of8$1@xxxxxxxxxxxxx>
Reply-to: "Daniel P. Berrange" <berrange@xxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.4.1i
On Tue, Nov 21, 2006 at 01:41:07AM +0000, Robin Bowes wrote:
> Robin Bowes wrote:
> > I'd love to post a patch, but I'm afraid I'm not a coder.
> > 
> > I'm downloading the SRPMS as I type and I'll give it a go, but it might
> > be an idea if someone with more coding skills fixes this.
> > 
> > I'll post an update when I've had a go.
> 
> OK, I've made the change to blkfront.c but there is no xenbus_printf in
> blkback.c so I didn't make that change. (I'm using xen-3.0.3 from the
> FC6 SRPM)
> 
> I've rebuilt the xen RPM with this patch:
> 
> diff -ur
> xen-3.0.3-rc3/linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c
> xen-3.0.3-rc3.patched/linux-2.6-xen-sp
> arse/drivers/xen/blkfront/blkfront.c
> --- xen-3.0.3-rc3/linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c
> 2006-10-10 15:23:43.000000000 +0100
> +++
> xen-3.0.3-rc3.patched/linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c
>  2006-11-21 01:10:54.000000000 +000
> 0
> @@ -294,7 +294,8 @@
>   */
>  static void connect(struct blkfront_info *info)
>  {
> -       unsigned long sectors, sector_size;
> +       blkif_sector_r sectors;
> +    unsigned long sector_size;
>         unsigned int binfo;
>         int err;
> 
> @@ -305,7 +306,7 @@
>         DPRINTK("blkfront.c:connect:%s.\n", info->xbdev->otherend);
> 
>         err = xenbus_gather(XBT_NIL, info->xbdev->otherend,
> -                           "sectors", "%lu", &sectors,
> +                           "sectors", "%llu", &sectors,
>                             "info", "%u", &binfo,
>                             "sector-size", "%lu", &sector_size,
>                             NULL);
> 
> 
> I installed the resulting RPMs (xen and xen-libs) and rebooted the dom0
> host.
> However, the xvdb device still only shows up like this:
> 
> major minor  #blocks  name
>  202    16  782819328 xvdb
> 
> Did I not do it right?

I'm afraid not.

blkfront is the device driver for the DomU guest kernel, rather than Dom0.
Also in Fedora, the 'xen' RPM only contains the userspace parts of xen
for Dom0. The hypervisor & kernel itself are in the kernel-xen RPM (which
is one of many built from the kernel SRPM).

FYI, I opened a bugzilla against Fedora to track this problem since I can
also trivially reproduce it by creating a (sparse) 5 TB block device and
exporting it to a guest.

https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=216555

On x86_64 meanwhile everything is sizing up correctly - I succesfully
exported a 15 PB (yes, PB) block device to a PV guest.

Regards,
Dan.
-- 
|=- Red Hat, Engineering, Emerging Technologies, Boston.  +1 978 392 2496 -=|
|=-           Perl modules: http://search.cpan.org/~danberr/              -=|
|=-               Projects: http://freshmeat.net/~danielpb/               -=|
|=-  GnuPG: 7D3B9505   F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505  -=| 

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