From owner-freebsd-questions@FreeBSD.ORG Tue Dec 8 18:36:57 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C52DD1065676 for ; Tue, 8 Dec 2009 18:36:57 +0000 (UTC) (envelope-from psteele@maxiscale.com) Received: from server505.appriver.com (server505c.appriver.com [98.129.35.7]) by mx1.freebsd.org (Postfix) with ESMTP id 8D6628FC18 for ; Tue, 8 Dec 2009 18:36:57 +0000 (UTC) X-Policy: GLOBAL - maxiscale.com X-Primary: psteele@maxiscale.com X-Note: This Email was scanned by AppRiver SecureTide X-ALLOW: psteele@maxiscale.com ALLOWED X-Virus-Scan: V- X-Note: Spam Tests Failed: X-Country-Path: UNITED STATES->UNITED STATES->UNITED STATES X-Note-Sending-IP: 98.129.23.15 X-Note-Reverse-DNS: ht02.exg5.exghost.com X-Note-WHTLIST: psteele@maxiscale.com X-Note: User Rule Hits: X-Note: Global Rule Hits: 112 113 114 115 119 120 131 218 X-Note: Mail Class: ALLOWEDSENDER X-Note: Headers Injected Received: from [98.129.23.15] (HELO ht02.exg5.exghost.com) by server505.appriver.com (CommuniGate Pro SMTP 5.2.14) with ESMTPS id 19104401 for freebsd-questions@freebsd.org; Tue, 08 Dec 2009 12:36:55 -0600 Received: from mbx03.exg5.exghost.com ([169.254.1.164]) by ht02.exg5.exghost.com ([98.129.23.15]) with mapi; Tue, 8 Dec 2009 12:36:56 -0600 From: Peter Steele To: "freebsd-questions@freebsd.org" Date: Tue, 8 Dec 2009 12:36:54 -0600 Thread-Topic: How do I create large partitions in FreeBSD? Thread-Index: Acp4NWot4TsZHcgBT6yUiuyP1iZAkQ== Message-ID: <7B9397B189EB6E46A5EE7B4C8A4BB7CB33D0D44A@MBX03.exg5.exghost.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: How do I create large partitions in FreeBSD? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Dec 2009 18:36:57 -0000 We have 3U systems with 3Ware raid controllers configured to give us large = 11TB logical drives. The diskinfo command shows this: # diskinfo -v da1 da1 512 # sectorsize 11999933104128 # mediasize in bytes (11T) 23437369344 # mediasize in sectors 1458908 # Cylinders according to firmware. 255 # Heads according to firmware. 63 # Sectors according to firmware. Y08210901E792700BAB9 # Disk ident. We want to create a BSD slice to cover the entire drive. My plan was to use= the fdisk -I option: # fdisk -I da1 ******* Working on device /dev/da1 ******* fdisk: Class not found # fdisk -p da1 # /dev/da1 g c1458908 h255 s63 p 1 0xa5 63 1962532467 a 1 but as you can see, the partition size that this creates is only 1TB (19625= 32467*512=3D1004816623104 bytes). The fdisk command clearly knows how large= the disk really is: # fdisk da1 ******* Working on device /dev/da1 ******* parameters extracted from in-core disklabel are: cylinders=3D1458908 heads=3D255 sectors/track=3D63 (16065 blks/cyl) Figures below won't work with BIOS for partitions not in cyl 1 parameters to be used for BIOS calculations are: cylinders=3D1458908 heads=3D255 sectors/track=3D63 (16065 blks/cyl) If I compute 1458908*255*63*512 this gives me 11999926794240, which is the = correct size. But the -I option doesn't create a full sized partition. How do we resolve this? We want a full size partition spanning the entire d= isk, and we need a scriptable solution since the configuration of these ser= vers is handled through an automated process.