Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 17 May 2011 14:34:42 -0400
From:      Robert Simmons <rsimmons0@gmail.com>
To:        freebsd-questions@freebsd.org
Subject:   Re: adding new disk >2TB, gpt?
Message-ID:  <BANLkTikJULghWmU6_FCwr67TXyS5JVGGyg@mail.gmail.com>
In-Reply-To: <201105171540.36757.milu@dat.pl>
References:  <BANLkTikoqWdpcAhe0ykrcUpd1NFArFoK4w@mail.gmail.com> <BANLkTim8PzACJfJCz5hcmr7ESV7d1o-hfA@mail.gmail.com> <BANLkTinE5V2hmW%2BPZS_FwV%2Bj8d3YVm-J7w@mail.gmail.com> <201105171540.36757.milu@dat.pl>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, May 17, 2011 at 9:40 AM, Maciej Milewski <milu@dat.pl> wrote:
> On Tuesday 17 of May 2011 15:19:40, n dhert wrote:
>> Thanks for your answer!
>> I am trying out gpart.
>> On an old PC with 38 GB disk, I have triple boot Windows, OpenSuSE and
>> FreeBSD-8.2.
>> I created an unalloated space of 973 MB at the end.
>> To see the actuel disk geometry, I used =A0FreeBSDs =A0sysinstall
>> # sysinstall
>> Disk name: =A0 =A0 =A0ad0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =
=A0 =A0 =A0 =A0 =A0 =A0 =A0FDISK Partition
>> Editor
>> DISK Geometry: =A079780 cyls/16 heads/63 sectors =3D 80418240 sectors (3=
9266MB)
>> Offset =A0 =A0 =A0 Size(ST) =A0 =A0 =A0 =A0End =A0 =A0 Name =A0PType =A0=
 =A0 =A0 Desc =A0Subtype
>> Flags
>> =A0 =A0 =A0 =A0 =A00 =A0 =A0 =A0 =A0 63 =A0 =A0 =A0 =A0 62 =A0 =A0 =A0 =
=A0- =A0 =A0 12 =A0 =A0 unused =A0 =A0 =A0 =A00
>> =A0 =A0 =A0 =A0 63 =A0 22233897 =A0 22233959 =A0 =A0ad0s1 =A0 =A0 =A04 N=
TFS/HPFS/QNX =A0 =A0 =A0 =A07
>> =A0 22233960 =A0 29639736 =A0 51873695 =A0 =A0ad0s3 =A0 =A0 =A08 =A0 =A0=
freebsd =A0 =A0 =A0165
>> =A0 51873696 =A0 =A0 =A0 =A0189 =A0 51873884 =A0 =A0 =A0 =A0- =A0 =A0 12=
 =A0 =A0 unused =A0 =A0 =A0 =A00
>> =A0 51873885 =A0 26539380 =A0 78413264 =A0 =A0ad0s2 =A0 =A0 =A04 extende=
d DOS, LBA =A0 =A0 =A0 15
>> =A0 78413265 =A0 =A01992060 =A0 80405324 =A0 =A0ad0s4 =A0 =A0 =A04 =A0 =
=A0 ext2fs =A0 =A0 =A0131
>> =A0 80405325 =A0 =A0 =A012915 =A0 80418239 =A0 =A0 =A0 =A0- =A0 =A0 12 =
=A0 =A0 unused =A0 =A0 =A0 =A00
>>
>> ad0s1 is my Windows,
>> ad0s2 is the extended partition where SuSE resides (swap and / partition=
)
>> ad0s3 is my FreeBSD-8.2 (with sections a, e, f, d for /, /tmp, /usr, /va=
r)
>> and ad0s4 is the new freed space of 1992060 sectors =3D 973 MB
>>
>> I tried
>> # gpart create -s gpt ad0s4
>> gpart: provider: Device not configured
>> ( gpart create -s gtp /dev/ad0s4 : =A0same error)
>>
>> # gpart show
>> =3D> =A0 =A0 =A063 =A080418177 =A0ad0 =A0MBR =A0(38G)
>> =A0 =A0 =A0 =A0 63 =A022233897 =A0 =A01 =A0ntfs =A0(11G)
>> =A0 22233960 =A029639736 =A0 =A03 =A0freebsd =A0[active] =A0(14G)
>> =A0 51873696 =A0 =A0 =A0 189 =A0 =A0 =A0 - free - =A0(95K)
>> =A0 51873885 =A026539380 =A0 =A02 =A0!15 =A0(13G)
>> =A0 78413265 =A0 1992060 =A0 =A04 =A0!131 =A0(973M)
>> =A0 80405325 =A0 =A0 12915 =A0 =A0 =A0 - free - =A0(6.3M)
>>
>> =3D> =A0 =A0 =A0 0 =A026539380 =A0ad0s2 =A0EBR =A0(13G)
>> =A0 =A0 =A0 =A0 =A00 =A0 2072385 =A0 =A0 =A01 =A0!130 =A0(1.0G)
>> =A0 =A02072385 =A018249840 =A032896 =A0!131 =A0(8.7G)
>> =A0 20322225 =A0 6152895 =A0322576 =A0!131 =A0(2.9G)
>> =A0 26475120 =A0 =A0 64260 =A0 =A0 =A0 =A0 - free - =A0(31M)
>>
>> =3D> =A0 =A0 =A0 0 =A029639736 =A0ad0s3 =A0BSD =A0(14G)
>> =A0 =A0 =A0 =A0 =A00 =A0 1048576 =A0 =A0 =A01 =A0freebsd-ufs =A0(512M)
>> =A0 =A01048576 =A0 1994384 =A0 =A0 =A02 =A0freebsd-swap =A0(974M)
>> =A0 =A03042960 =A0 3092480 =A0 =A0 =A04 =A0freebsd-ufs =A0(1.5G)
>> =A0 =A06135440 =A0 1048576 =A0 =A0 =A05 =A0freebsd-ufs =A0(512M)
>> =A0 =A07184016 =A022455720 =A0 =A0 =A06 =A0freebsd-ufs =A0(11G)
>> # gpart create -s gpt ad4
>> gpart: provider 'ad4': Invalid argument
>>
>> how do I address the 974 MB partition ???
> You can't create gpt table on top of existing MBR table.
> If you want to use gpt you need to have clean hard drive for that(removed=
 all
> partitions and destroy current table)
> If you just want to add ad0s4 you should do gpart add ...

Right.  If you do this, you will end up with ad0p1, ad0p2 etc each
with an appropriate type (freebsd-boot, freebsd-swap, freebsd-ufs) and
you can then newfs the gpt partition.

Needless to say, backup all your data.

Rob



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