From owner-freebsd-stable@FreeBSD.ORG Wed Apr 1 06:31:49 2015 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 38F0CF50; Wed, 1 Apr 2015 06:31:49 +0000 (UTC) Received: from smtp2.wemm.org (smtp2.wemm.org [IPv6:2001:470:67:39d::78]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp2.wemm.org", Issuer "StartCom Class 1 Primary Intermediate Server CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 200798C5; Wed, 1 Apr 2015 06:31:49 +0000 (UTC) Received: from overcee.wemm.org (canning.wemm.org [192.203.228.65]) by smtp2.wemm.org (Postfix) with ESMTP id E54422F9; Tue, 31 Mar 2015 23:31:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wemm.org; s=m20140428; t=1427869907; bh=D0hli2TK03iZo5kzNWg8Ltj1+aM8dH3AZpTVLvHQrmw=; h=From:To:Subject:Date:In-Reply-To:References; b=OrZLht5vjZsMNvAYQKM2aS48PiveH2CKG9d9ZaNGrYPtLld9taCZUDlXto0DvBrtI 2G7V4GrOVCjeQnX38XE521uwPLNoltV5G/8RX8+Bg+DK2GQfabmYeOhggtVaRTQ48n GB0W20QBzKw8/2l4EXqBRQFUDP6z2Otriy++dqzU= From: Peter Wemm To: freebsd-stable@freebsd.org, Daniel Eischen Subject: Re: Trying to clone a ZFS drive, can't get ashift=12 Date: Tue, 31 Mar 2015 23:31:47 -0700 Message-ID: <2588497.o59NqK340E@overcee.wemm.org> User-Agent: KMail/4.14.3 (FreeBSD/11.0-CURRENT; KDE/4.14.3; amd64; ; ) In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Apr 2015 06:31:49 -0000 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