Problem with "gpart add"

Mike Clarke jmc-freebsd2 at
Sun Jul 6 09:36:26 UTC 2014

On Saturday 05 July 2014 23:16:05 Warren Block wrote:

> 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

I still get the error.

The following extract from "truss gpart add -t freebsd-zfs ada2" might 
be relevant

open("/dev/geom.ctl",O_RDONLY,00)		 = 3 (0x3)
ioctl(3,GEOM_CTL,0x1418040)			 = 0 (0x0)
close(3)					 = 0 (0x0)
gpart: write(2,"gpart: ",7)				 = 7 (0x7)
stat("/usr/share/nls/C/",0x7fffffff8910) ERR#2 'No such file or 
stat("/usr/share/nls/libc/C",0x7fffffff8910)	 ERR#2 'No such file or 
stat("/usr/local/share/nls/C/",0x7fffffff8910) ERR#2 'No such file 
or directory'
stat("/usr/local/share/nls/libc/C",0x7fffffff8910) ERR#2 'No such file or 
madvise(0x801420000,0x1000,0x5,0x1f,0x7fffffff8000,0xffffffff) = 0 (0x0)
madvise(0x801421000,0x1000,0x5,0x20,0x7fffffff8000,0x7fffffff7fa0) = 0 (0x0)
Invalid argument
write(2,"Invalid argument\n",17)		 = 17 (0x11)

Checking the relevant directories gives the following:

curlew:/root# ls -l /usr/share/nls/C
total 6
-r--r--r--  1 root  wheel  7924 26 Oct  2012
curlew:/root# ls -l /usr/share/nls/libc
ls: /usr/share/nls/libc: No such file or directory
curlew:/root# ls -l /usr/local/share/nls/C
total 0
curlew:/root# ls -l /usr/local/share/nls/libc
ls: /usr/local/share/nls/libc: No such file or directory

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

Checking with smartctl shows 512 bytes logical/physical

Mike Clarke

More information about the freebsd-questions mailing list