How do I create large partitions in FreeBSD?

Maxim Khitrov mkhitrov at gmail.com
Tue Dec 8 19:14:01 UTC 2009


On Tue, Dec 8, 2009 at 1:36 PM, Peter Steele <psteele at maxiscale.com> wrote:
> 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:
>
> [snip]

You cannot use fdisk for this, because fdisk creates MBR partition
tables and these partitions are limited to 2 TB. You have three
options:

1. Use GPT instead of MBR. This is handled by gpt (FreeBSD 7) and
gpart (FreeBSD 8) commands.
2. Use a "dangerously dedicated" partitioning scheme.
3. Bypass all partitioning issues and do what Polytropon suggested.

The third option will only work if you don't need to boot from the
array and are happy with a single 11TB file system.

The second option gives you partitions and the ability to boot
FreeBSD, but no other operating system will recognize the array.
Device names will be da1a, da1b, etc. To do this run the following
commands:

bsdlabel -w -B da1
bsdlabel -e da1
<edit your partitions>
newfs /dev/da1a
newfs -U /dev/da1d
...

I've never used GPT, but that's what you would have become familiar
with if you want these arrays to be recognized by operating systems
other than FreeBSD.

- Max


More information about the freebsd-questions mailing list