From owner-freebsd-current@FreeBSD.ORG Sun Jun 20 20:59:05 2010 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0EC7E1065676 for ; Sun, 20 Jun 2010 20:59:05 +0000 (UTC) (envelope-from lists@mawer.org) Received: from mail-vw0-f54.google.com (mail-vw0-f54.google.com [209.85.212.54]) by mx1.freebsd.org (Postfix) with ESMTP id C07998FC13 for ; Sun, 20 Jun 2010 20:59:04 +0000 (UTC) Received: by vws1 with SMTP id 1so66944vws.13 for ; Sun, 20 Jun 2010 13:59:04 -0700 (PDT) MIME-Version: 1.0 Received: by 10.220.80.68 with SMTP id s4mr1452810vck.190.1277067543503; Sun, 20 Jun 2010 13:59:03 -0700 (PDT) Received: by 10.220.194.5 with HTTP; Sun, 20 Jun 2010 13:59:03 -0700 (PDT) In-Reply-To: References: <4C1AB4C0.4020604@freemail.hu> <4C1B3792.9000007@freemail.hu> <4C1C0ED9.8090103@freemail.hu> <2F904ED8-BC95-459F-8536-A889ADDA8D31@samsco.org> <0B4F09B43AE84F24954E3B940FA0ECBB@multiplay.co.uk> Date: Mon, 21 Jun 2010 06:59:03 +1000 Message-ID: From: Antony Mawer To: Scott Long Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: oizs , Steven Hartland , freebsd-current@freebsd.org Subject: Re: Dell Perc 5/i Performance issues X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Jun 2010 20:59:05 -0000 On Mon, Jun 21, 2010 at 4:50 AM, Scott Long wrote: > I just set up a machine with the following GPT scheme: > > =3D> =A0 =A0 =A0 =A034 =A05853511613 =A0mfid0 =A0GPT =A0(2.7T) > =A0 =A0 =A0 =A0 =A034 =A0 =A0 =A0 =A0 128 =A0 =A0 =A01 =A0freebsd-boot = =A0(64K) > =A0 =A0 =A0 =A0 162 =A0 =A0 =A0 =A0 862 =A0 =A0 =A0 =A0 - free - =A0(431K= ) > =A0 =A0 =A0 =A01024 =A0 =A0 2097152 =A0 =A0 =A02 =A0freebsd-ufs =A0(1.0G) > =A0 =A0 2098176 =A0 =A0 4194304 =A0 =A0 =A03 =A0freebsd-swap =A0(2.0G) > =A0 =A0 6292480 =A0 =A0 2097152 =A0 =A0 =A04 =A0freebsd-ufs =A0(1.0G) > =A0 =A0 8389632 =A0 104857600 =A0 =A0 =A05 =A0freebsd-ufs =A0(50G) > =A0 113247232 =A05740264414 =A0 =A0 =A06 =A0freebsd-ufs =A0(2.7T) > =A05853511646 =A0 =A0 =A0 =A0 =A0 1 =A0 =A0 =A0 =A0 - free - =A0(512B) > > After the first partition, I created a deliberate gap for alignment, refl= ected in the second line. =A0The third line shows a starting offset of sect= or 1024, which is 512KB. =A0This should be a good generic start point for m= ost RAID geometries with a stripe size <=3D 512KB. =A0The rest are normal /= , swap, /var, /usr and /opt partitions. =A0The single free sector on the fi= nal line is probably a calculation error on my part, there's no particular = reason for it. > > The gpart man page has good descriptions on how to create partitions and = make the GPT scheme bootable. =A0It's not very automated, you'll need to ha= ve a calculator handy, but it works. I scripted this as part of our custom installer - it uses the same 1MB offset that Vista/Win7 do which should align for anything with a <=3D 1MB stripe size: # Device to partition diskdev=3D"/dev/da0" # First partition offset in 512-byte sectors. This should be aligned wi= th # any RAID stripe size for maximum performance. 2048 aligns the partiti= on # start boundary at the 1MiB, consistent with Vista/Windows 7. This sho= uld # match all common stripe sizes such as 64kb, 128kb and 256kb. root_offset=3D"2048" # Boot partition offset. This sits just before our first root partition= and # stores the boot loader which is used to load the OS. boot_offset=3D"2032" # Initialise the disk with a GPT partition table gpart create -s gpt $diskdev # # System disk partitioning layout # gpart add -l boot -t freebsd-boot -s 16 -b $boot_offset $diskdev # bo= ot p1 gpart add -l root -t freebsd-ufs -s 2G -b $root_offset $diskdev # / = p2 gpart add -l swap -t freebsd-swap -s 4G $diskdev # sw= ap p3 gpart add -l var -t freebsd-ufs -s 4G $diskdev # /v= ar p4 gpart add -l usr -t freebsd-ufs $diskdev # /u= sr p5 # Install the gpt boot code (pmbr into the PMBR, gptboot into our boot partition p1) gpart bootcode -b /boot/pmbr -p /boot/gptboot -i 1 $diskdev # Make the first partition active # (required for older BIOSes to boot from the GPT PMBR) echo 'a 1' | fdisk -f - $diskdev gpart is smart enough to figure out most of the math for you these days... -- Antony