Problem with "gpart add"

Warren Block wblock at wonkity.com
Sun Jul 6 05:16:08 UTC 2014


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 at 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.


More information about the freebsd-questions mailing list