NetBSD Problem Report #48870

From www@NetBSD.org  Wed Jun  4 18:40:10 2014
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
	(using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits))
	(Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (verified OK))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 58161A65CE
	for <gnats-bugs@gnats.NetBSD.org>; Wed,  4 Jun 2014 18:40:10 +0000 (UTC)
Message-Id: <20140604184008.285BCA6606@mollari.NetBSD.org>
Date: Wed,  4 Jun 2014 18:40:07 +0000 (UTC)
From: marcotte@panix.com
Reply-To: marcotte@panix.com
To: gnats-bugs@NetBSD.org
Subject: Problem with disks larger than 2 TB in Xen
X-Send-Pr-Version: www-1.0

>Number:         48870
>Category:       kern
>Synopsis:       Problem with disks larger than 2 TB in Xen
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    kern-bug-people
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Jun 04 18:45:00 +0000 2014
>Closed-Date:    Sat Dec 27 23:38:11 +0000 2014
>Last-Modified:  Sat Dec 27 23:38:11 +0000 2014
>Originator:     Brian Marcotte
>Release:        6.1.4
>Organization:
Public Access Networks, Corp.
>Environment:
NetBSD backup3.nyc.access.net 6.1.4 NetBSD 6.1.4 (PANIX-XEN-STD) #1: Tue Jun  3 12:04:23 EDT 2014  root@juggler.panix.com:/misc/obj/misc/devel/netbsd/6.1.4/src/sys/arch/i386/compile/PANIX-XEN-STD i386

>Description:
I'm having a problem with virtual disks larger than 2 TB.

A 3 TB virtual disk probes correctly:

        xbd12: 3072 GB, 512 bytes/sect x 6442450944 sectors

read/write appears to work correctly against the whole disk.

The problem is that the disklabel/gpt programs think the size is the
size modulo 2 TB. I would expect disklabel to max out at 2 TB, but in
this example, it's sees a 1 TB disk. So does gpt.

It looks like something is returning the size as a 32 bit number.

My dom0 is linux, and both dom0 and domU are 32 bit. Xen is 64 bit.

>How-To-Repeat:
Give a greater than 2 TB disk to a NetBSD/xen 32-bit domU. Try to
use "gpt" to partition the disk.

A sparse file is fine if actual large disks are not available.

>Fix:

>Release-Note:

>Audit-Trail:

State-Changed-From-To: open->feedback
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Thu, 06 Nov 2014 16:04:34 +0000
State-Changed-Why:
mlelstv says this should be fixed by now (although I'm not sure the fixes
will have gotten into the 6.1 teeny branches)


From: Brian Marcotte <marcotte@panix.com>
To: dholland@NetBSD.org
Cc: kern-bug-people@netbsd.org, netbsd-bugs@netbsd.org,
	gnats-admin@netbsd.org, gnats-bugs@NetBSD.org
Subject: Re: kern/48870 (Problem with disks larger than 2 TB in Xen)
Date: Sun, 16 Nov 2014 01:26:14 -0500

 > Synopsis: Problem with disks larger than 2 TB in Xen
 > 
 > mlelstv says this should be fixed by now (although I'm not sure the fixes
 > will have gotten into the 6.1 teeny branches)

 It looks to be fixed in -7 and -current.

 Can you point me to the the commit message or files which were changed
 so I can include the changes in my local -6 build?

 Thanks.

 --
 - Brian

From: mlelstv@serpens.de (Michael van Elst)
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: kern/48870 (Problem with disks larger than 2 TB in Xen)
Date: Sun, 16 Nov 2014 09:21:55 +0000 (UTC)

 marcotte@panix.com (Brian Marcotte) writes:

 >> Synopsis: Problem with disks larger than 2 TB in Xen
 >> 
 >> mlelstv says this should be fixed by now (although I'm not sure the fixes
 >> will have gotten into the 6.1 teeny branches)

 >It looks to be fixed in -7 and -current.

 >Can you point me to the the commit message or files which were changed
 >so I can include the changes in my local -6 build?


 Sat Oct 11 12:01:27 UTC 2014 mlelstv
    | src/sys/dev: ccd.c dksubr.c ld.c vnd.c
    | src/sys/dev/raidframe: rf_netbsdkintf.c
  clamp total number of sectors to UINT32_MAX instead of providing the
  lower 32bit of the 64bit number.
 =========================================


 Sat Oct 11 12:36:25 UTC 2014 mlelstv
    | src/sys/dev: ccd.c dksubr.c
    | src/sys/dev/raidframe: rf_netbsdkintf.c
  No longer warn about differences bewteen disk size and total sector count
  in disklabel when the latter is just clamped to the maximum.
 =========================================

From: Brian Marcotte <marcotte@panix.com>
To: Michael van Elst <mlelstv@serpens.de>
Cc: kern-bug-people@netbsd.org, gnats-admin@netbsd.org,
	netbsd-bugs@netbsd.org, gnats-bugs@NetBSD.org
Subject: Re: kern/48870 (Problem with disks larger than 2 TB in Xen)
Date: Tue, 25 Nov 2014 13:21:29 -0500

 >     | src/sys/dev: ccd.c dksubr.c ld.c vnd.c
 >     | src/sys/dev/raidframe: rf_netbsdkintf.c
 >   clamp total number of sectors to UINT32_MAX instead of providing the
 >   lower 32bit of the 64bit number.
 >  =========================================
 >     | src/sys/dev: ccd.c dksubr.c
 >     | src/sys/dev/raidframe: rf_netbsdkintf.c
 >   No longer warn about differences bewteen disk size and total sector count
 >   in disklabel when the latter is just clamped to the maximum.

 Those changes appear to be make it so that disklabels can use the first
 2 TB of a disk. I can verify that problem is fixed, but that's not the
 main problem of this ticket. I'm not trying to use disklabels (or CCD,
 VND or RAIDframe).

 The main problem is also fixed in -7 and -current.

 It looks like a lot has changed in dksubr.c.

 You can close the ticket anyway as I only need this in one place for now
 and I can use a -7 kernel there.

 Thanks.

 --
 - Brian

State-Changed-From-To: feedback->closed
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Sat, 27 Dec 2014 23:38:11 +0000
State-Changed-Why:
Submitter says that the problem fixed in -6 isn't the problem he was
concerned about, but it's fixed in -7 and he'll use a -7 kernel.


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2014 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.