Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 06 Jul 2014 10:36:07 +0100
From:      Mike Clarke <jmc-freebsd2@milibyte.co.uk>
To:        freebsd-questions@freebsd.org
Subject:   Re: Problem with "gpart add"
Message-ID:  <1589340.EJfV1hpdGW@curlew.lan>
In-Reply-To: <alpine.BSF.2.11.1407052311490.15491@wonkity.com>
References:  <41313663.OOGA20ln3i@curlew.lan> <alpine.BSF.2.11.1407052311490.15491@wonkity.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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/libc.cat",0x7fffffff8910) ERR#2 'No such file or 
directory'
stat("/usr/share/nls/libc/C",0x7fffffff8910)	 ERR#2 'No such file or 
directory'
stat("/usr/local/share/nls/C/libc.cat",0x7fffffff8910) ERR#2 'No such file 
or directory'
stat("/usr/local/share/nls/libc/C",0x7fffffff8910) ERR#2 'No such file or 
directory'
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 ee.cat
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



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