Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 8 Dec 2009 12:36:54 -0600
From:      Peter Steele <psteele@maxiscale.com>
To:        "freebsd-questions@freebsd.org" <freebsd-questions@freebsd.org>
Subject:   How do I create large partitions in FreeBSD?
Message-ID:  <7B9397B189EB6E46A5EE7B4C8A4BB7CB33D0D44A@MBX03.exg5.exghost.com>

next in thread | raw e-mail | index | archive | help
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.





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?7B9397B189EB6E46A5EE7B4C8A4BB7CB33D0D44A>