Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 5 Jul 2014 23:16:05 -0600 (MDT)
From:      Warren Block <wblock@wonkity.com>
To:        Mike Clarke <jmc-freebsd2@milibyte.co.uk>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Problem with "gpart add"
Message-ID:  <alpine.BSF.2.11.1407052311490.15491@wonkity.com>
In-Reply-To: <41313663.OOGA20ln3i@curlew.lan>
References:  <41313663.OOGA20ln3i@curlew.lan>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, 5 Jul 2014, Mike Clarke wrote:

>
> FreeBSD curlew.lan 9.1-RELEASE-p14 FreeBSD 9.1-RELEASE-p14 #0: Tue Jun
> 3 08:56:12 UTC 2014     root@amd64-
> builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC  amd64
>
> I'm experiencing problems setting up a partition in some free space
> between two existing partitions on a drive:
>
> This is the current setup:
>
> curlew:/root# gpart show ada2
> =>       63  625142385  ada2  MBR  (298G)
>         63  125829081     1  freebsd  (60G)
>  125829144  186731496        - free -  (89G)
>  312560640  312576705     2  ntfs  (149G)
>  625137345       5103        - free -  (2.5M)
>
> I'd assumed that I could do this, but it fails
>
> curlew:/root# gpart add -t freebsd-zfs -b 125829144 -s 186731496 ada2
> gpart: Invalid argument
>
> What am I doing wrong?

MBR is touchy about CHS values.  It might be complaining about the 
starting location or size.  Without those options, it should use all of 
the first available space, rounding for CHS values.  So (after a 
backup) try:

   gpart add -t freebsd-zfs ada2

A 320G drive is not likely to use 4K blocks, but that's worth checking. 
Block misalignment is very easy with MBR, and can make for terrible 
write performance.



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