Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 16 May 2011 15:22:46 -0400
From:      Robert Simmons <rsimmons0@gmail.com>
To:        freebsd-questions@freebsd.org
Subject:   Re: adding new disk >2TB, gpt?
Message-ID:  <BANLkTim8PzACJfJCz5hcmr7ESV7d1o-hfA@mail.gmail.com>
In-Reply-To: <BANLkTikoqWdpcAhe0ykrcUpd1NFArFoK4w@mail.gmail.com>
References:  <BANLkTikoqWdpcAhe0ykrcUpd1NFArFoK4w@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, May 16, 2011 at 10:27 AM, n dhert <ndhertbsd@gmail.com> wrote:
> I have a running FreeBSD-8.2-amd system,
> FreeBSD was installed in jan 2009 (then FreeBSD 7.0), which a fisk disk o=
f
> 200 GB
> for /, swap /usr /var /tmp.
> Later that month, I added a 9 TB disk using /sbin/gpt
> (since sysinstall uses bsdlabel/fdisk, it can't create disks larger than =
2
> TB)
>
> I want to add an extra >2TB disk... and thought to use gpt again as I did=
 in
> the past ..
>
> The FreeBSD book (in its 2011 version), section 18.3 still refers to usin=
g
> gpt for disks >2TB
> but the link gpt(8) leads to nowhere and /sbin/gpt no longer exists in
> FreeBSD !
>
> There seem to be two alternatives:
> 1) /sbin/gpart, of which the man page is quite similar to what gpt used t=
o
> be, but tells me
> it is ''for disk partitoning GEOM class",
> whereas gpt man pages (in 2009) said: gpt - "GUID partition table
> maintenance utility".
>
> 2) a port sysutils/gdisk of which the Long Description says:
> =A0"Edit GUID partition table (GPT) definitions in Linux, FreeBSD, MacOS =
X or
> Windows"
> but its web site shows a completely different command line interface, not
> resembling the old gpt at all..
>
> What is exactly that difference between GEOM and GUID ?
> I'd like to have things as similar as possible ..
> Can I use /sbin/gpart for the extra 9 GB disk ? or do I have to stick wit=
h
> GUID and use gdisk ?

gpart create -s gpt ad0
is the command you want to use.  Just replace ad0 with your device
node. Also, "gpart show" will give a list of slices and partitions.
You will then want to do:
gpart add -s <size> -t <type> ad0
The size and type syntax are in the gpart man page.
If you want it bootable you will need a small partition at the
beginning of the disk:
gpart add -s 128k -t freebsd-boot ad0
gpart bootcode -b /boot/pmbr -p /boot/gptboot -i 1 ad0

You may adjust the size to shrink it to exactly fit the files, but I
think if you're working in TBs you can spare a few wasted k.

I submitted a PR to get the handbook updated to reflect gpart(8).

Cheers,
Rob



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