Date: Mon, 21 Jun 2010 06:59:03 +1000 From: Antony Mawer <lists@mawer.org> To: Scott Long <scottl@samsco.org> Cc: oizs <oizs@freemail.hu>, Steven Hartland <killing@multiplay.co.uk>, freebsd-current@freebsd.org Subject: Re: Dell Perc 5/i Performance issues Message-ID: <AANLkTikT2O_9k5nsUbqpIOWXZqyMY-VZwmwL-u-H4XDL@mail.gmail.com> In-Reply-To: <A799F335-8EA0-4A3D-9A96-A8BE4F1C9D5B@samsco.org> References: <4C1AB4C0.4020604@freemail.hu> <A594C946-32C0-4C4A-AA37-0E81D270162A@mac.com> <4C1B3792.9000007@freemail.hu> <AANLkTimsHZLREByndqXEjt2yjdvOYVV7Rnw8AMjqxYIl@mail.gmail.com> <4C1C0ED9.8090103@freemail.hu> <2F904ED8-BC95-459F-8536-A889ADDA8D31@samsco.org> <0B4F09B43AE84F24954E3B940FA0ECBB@multiplay.co.uk> <A799F335-8EA0-4A3D-9A96-A8BE4F1C9D5B@samsco.org>
index | next in thread | previous in thread | raw e-mail
On Mon, Jun 21, 2010 at 4:50 AM, Scott Long <scottl@samsco.org> wrote:
> I just set up a machine with the following GPT scheme:
>
> => 34 5853511613 mfid0 GPT (2.7T)
> 34 128 1 freebsd-boot (64K)
> 162 862 - free - (431K)
> 1024 2097152 2 freebsd-ufs (1.0G)
> 2098176 4194304 3 freebsd-swap (2.0G)
> 6292480 2097152 4 freebsd-ufs (1.0G)
> 8389632 104857600 5 freebsd-ufs (50G)
> 113247232 5740264414 6 freebsd-ufs (2.7T)
> 5853511646 1 - free - (512B)
>
> After the first partition, I created a deliberate gap for alignment, reflected in the second line. The third line shows a starting offset of sector 1024, which is 512KB. This should be a good generic start point for most RAID geometries with a stripe size <= 512KB. The rest are normal /, swap, /var, /usr and /opt partitions. The single free sector on the final 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. It's not very automated, you'll need to have 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
<= 1MB stripe size:
# Device to partition
diskdev="/dev/da0"
# First partition offset in 512-byte sectors. This should be aligned with
# any RAID stripe size for maximum performance. 2048 aligns the partition
# start boundary at the 1MiB, consistent with Vista/Windows 7. This should
# match all common stripe sizes such as 64kb, 128kb and 256kb.
root_offset="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="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 # boot 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 # swap p3
gpart add -l var -t freebsd-ufs -s 4G $diskdev # /var p4
gpart add -l usr -t freebsd-ufs $diskdev # /usr 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
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTikT2O_9k5nsUbqpIOWXZqyMY-VZwmwL-u-H4XDL>
