Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 31 Mar 2015 23:31:47 -0700
From:      Peter Wemm <peter@wemm.org>
To:        freebsd-stable@freebsd.org, Daniel Eischen <deischen@freebsd.org>
Subject:   Re: Trying to clone a ZFS drive, can't get ashift=12
Message-ID:  <2588497.o59NqK340E@overcee.wemm.org>
In-Reply-To: <Pine.GSO.4.64.1504010016170.26089@sea.ntplx.net>
References:  <Pine.GSO.4.64.1504010016170.26089@sea.ntplx.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wednesday, April 01, 2015 12:30:46 AM Daniel Eischen wrote:
> I have an Oracle (nee Sun) X4-2 server with identical 300GB SAS
> drives.  I did an MBR ZFS install from FreeBSD 10.1-RELEASE CD
> and have it updated to p6:
[..]
>    # zpool create -o cachefile=/tmp/newpool.cache bootpoolNew label/boot0
>    # zdb -U /tmp/newpool.cache | grep ashift
>                ashift: 9
> 
> What gives?  How do I get it to use 4k?

Before creating the pool, try:
#  sysctl vfs.zfs.min_auto_ashift=12

But watch your alignment of the MBR slices/partitions. I think you'll find it 
easier to manage with gpt for a data disk, eg:

# gpart create -s gpt da1
# gpart add -t freebsd-zfs -a 4k da1
combine that with the sysctl above you should have everything on 4k.

Setting -a just sets the rounding for the start/end sectors, it doesn't affect 
zfs when its sizing the sector size internally.

btw; for a 300G drive you might not want 4k - this changes the base allocation 
size to be 8 times larger.  You might find your space efficiency less than ideal 
if you have a lot of tiny files.


-- 
Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com; KI6FJV
UTF-8: for when a ' or ... just won\342\200\231t do\342\200\246



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