From nobody@FreeBSD.org  Sun Sep  5 19:05:57 2004
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id B481816A4CE
	for <freebsd-gnats-submit@FreeBSD.org>; Sun,  5 Sep 2004 19:05:57 +0000 (GMT)
Received: from www.freebsd.org (www.freebsd.org [216.136.204.117])
	by mx1.FreeBSD.org (Postfix) with ESMTP id A746743D2F
	for <freebsd-gnats-submit@FreeBSD.org>; Sun,  5 Sep 2004 19:05:57 +0000 (GMT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.12.11/8.12.11) with ESMTP id i85J5vjC060357
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 5 Sep 2004 19:05:57 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.12.11/8.12.11/Submit) id i85J5v7c060356;
	Sun, 5 Sep 2004 19:05:57 GMT
	(envelope-from nobody)
Message-Id: <200409051905.i85J5v7c060356@www.freebsd.org>
Date: Sun, 5 Sep 2004 19:05:57 GMT
From: Nick Evans <nevans@talkpoint.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: bsdlabel refuses to label a 2.7TB array on a 3ware 9500-12 SATA controller
X-Send-Pr-Version: www-2.3

>Number:         71408
>Category:       bin
>Synopsis:       [2TB] bsdlabel refuses to label a 2.7TB array on a 3ware 9500-12 SATA controller
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    brooks
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Sep 05 19:10:19 GMT 2004
>Closed-Date:    Mon Oct 04 18:43:56 GMT 2004
>Last-Modified:  Mon Oct 04 18:43:56 GMT 2004
>Originator:     Nick Evans
>Release:        5.3-BETA2
>Organization:
Talkpoint Communications, Inc.
>Environment:
FreeBSD karmacoma.talkpoint.com 5.3-BETA2 FreeBSD 5.3-BETA2 #1: Sat Aug 28 21:29:15 UTC 2004     root@mack.dcsl.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  i386

>Description:
3ware Escalade 9500-12 SATA controller with 12 Western Digital 250Mb SATA
drives attached and a RAID5 array built at 2.7 Terabytes refuses to accept
a label via bsdlabel for the entire partition. The following basic label:

# /dev/da0:
8 partitions:
#        size   offset    fstype   [fsize bsize bps/cpg]
  c: 5859115008        0    unused        0     0         # "raw" part, don't edit

Gives the following error:

partition c: partition extends past end of unit
disklabel: partition c doesn't cover the whole unit!
disklabel: An incorrect partition c may cause problems for standard system utilities

Using fdisk or sysinstall to label the drive yields a ~700Gig partition as follows:

8 partitions:
#        size   offset    fstype   [fsize bsize bps/cpg]
  c: 1157627904        0    unused        0     0         # "raw" part, don't edit
  e: 1155530752        0    4.2BSD     4096 32768     0 


DMESG from the controller:

da0 at twa0 bus 0 target 0 lun 0
da0: <3ware Logical Disk 00 1.00> Fixed Direct Access SCSI-0 device 
da0: 100.000MB/s transfers
da0: 2860896MB (5859115008 512 byte sectors: 255H 63S/T 364713C)

I have a 5.1-RELEASE system with a 3ware 8000 series controller and a
1.7 Terabyte array for which the handbook procedure for adding a
dedicated disk worked perfectly.
>How-To-Repeat:
Handbook procedure for adding a dedicated disk to the system consistently
returns the error. I've tried variations on partition sizes, made
partition c smaller than the block size reported via dmesg on the
controller, etc.
>Fix:
None known.
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-i386->freebsd-bugs 
Responsible-Changed-By: simon 
Responsible-Changed-When: Sun Sep 5 22:50:25 GMT 2004 
Responsible-Changed-Why:  
This does not sound i386 specific. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=71408 

From: Nick Evans <nevans@talkpoint.com>
To: FreeBSD-gnats-submit@FreeBSD.org
Cc:  
Subject: Re: bin/71408: bsdlabel refuses to label a 2.7TB array on a 3ware
 9500-12 SATA controller
Date: Tue, 7 Sep 2004 12:40:04 -0400

 5.3-BETA3 exhibits the same problems as 5.3-BETA2.

From: Nick Evans <nevans@talkpoint.com>
To: "'freebsd-gnats-submit@FreeBSD.org'" <freebsd-gnats-submit@FreeBSD.org>
Cc:  
Subject: Re: bin/71408: bsdlabel refuses to label a 2.7TB array on a 3ware
	 9500-12 SATA controller
Date: Wed, 8 Sep 2004 11:14:59 -0400 

 Recreated an array with total size 1.81TB:
 
 da0 at twa0 bus 0 target 0 lun 0
 da0: <3ware Logical Disk 00 1.00> Fixed Direct Access SCSI-0 device
 da0: 100.000MB/s transfers
 da0: 1907264MB (3906076672 512 byte sectors: 255H 63S/T 243142C)
 
 karmacoma# bsdlabel -w da0 auto
 karmacoma# bsdlabel da0  
 # /dev/da0:
 8 partitions:
 #        size   offset    fstype   [fsize bsize bps/cpg]
   a: 3906076656       16    unused        0     0       
   c: 3906076672        0    unused        0     0         # "raw" part,
 don't edit
 
 bsdlabel behaves fine.
 
 Recreated with total size ~2.2TB
 
 da0 at twa0 bus 0 target 0 lun 0
 da0: <3ware Logical Disk 00 1.00> Fixed Direct Access SCSI-0 device 
 da0: 100.000MB/s transfers
 da0: 2384080MB (4882595840 512 byte sectors: 255H 63S/T 303927C)
 
 karmacoma# bsdlabel -w da0 auto
 karmacoma# bsdlabel da0  
 # /dev/da0:
 8 partitions:
 #        size   offset    fstype   [fsize bsize bps/cpg]
   a: 587628528       16    unused        0     0
   c: 587628544        0    unused        0     0         # "raw" part, don't
 edit
 
 bsdlabel creates a 280gig partition...
 
 It seems that 2 terabytes is the treshold when bsdlabel starts acting funny.

From: Brooks Davis <brooks@one-eyed-alien.net>
To: freebsd-gnats-submit@FreeBSD.org
Cc: nevans@talkpoint.com
Subject: Re: bin/71408: bsdlabel refuses to label a 2.7TB array on a 3ware 9500-12 SATA controller
Date: Wed, 8 Sep 2004 10:55:09 -0700

 --45Z9DzgjV8m4Oswq
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
 Content-Transfer-Encoding: quoted-printable
 
 On Wed, Sep 08, 2004 at 03:20:32PM +0000, Nick Evans wrote:
 >  It seems that 2 terabytes is the treshold when bsdlabel starts acting fu=
 nny.
 
 The on disk format of the BSD label does not support partitions greater
 then 2TB.  What we probably need to do is detect attempts to label such
 disks and refuse.
 
 If you don't need to boot off of the array you can use gpt(8) partitions
 instead.
 
 -- Brooks
 
 --=20
 Any statement of the form "X is the one, true Y" is FALSE.
 PGP fingerprint 655D 519C 26A7 82E7 2529  9BF0 5D8E 8BE9 F238 1AD4
 
 --45Z9DzgjV8m4Oswq
 Content-Type: application/pgp-signature
 Content-Disposition: inline
 
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.2.1 (GNU/Linux)
 
 iD8DBQFBP0d8XY6L6fI4GtQRAvYeAJwMhvNEI/CUGstApvBNNLxP8cii+gCfVR73
 SIOJGdlJ7gv4YdDKqY9YIGA=
 =wpqO
 -----END PGP SIGNATURE-----
 
 --45Z9DzgjV8m4Oswq--
State-Changed-From-To: open->patched 
State-Changed-By: brooks 
State-Changed-When: Thu Sep 9 07:48:15 GMT 2004 
State-Changed-Why:  
I've committed some seatbelts to bsdlabel.  A note in the handbook is 
probably also a good idea. 


Responsible-Changed-From-To: freebsd-bugs->brooks 
Responsible-Changed-By: brooks 
Responsible-Changed-When: Thu Sep 9 07:48:15 GMT 2004 
Responsible-Changed-Why:  
I'll take this one. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=71408 
State-Changed-From-To: patched->closed 
State-Changed-By: brooks 
State-Changed-When: Mon Oct 4 18:41:21 GMT 2004 
State-Changed-Why:  
Added a note about the 2TB limit to the handbook.  This is as done as 
it's going to get until we switch to a more modern scheme. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=71408 
>Unformatted:
