From owner-freebsd-fs@FreeBSD.ORG Sun May 1 11:36:48 2011 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B648D1065670; Sun, 1 May 2011 11:36:48 +0000 (UTC) (envelope-from alexander@leidinger.net) Received: from mail.ebusiness-leidinger.de (mail.ebusiness-leidinger.de [217.11.53.44]) by mx1.freebsd.org (Postfix) with ESMTP id 714298FC18; Sun, 1 May 2011 11:36:48 +0000 (UTC) Received: from outgoing.leidinger.net (p5B1559A4.dip.t-dialin.net [91.21.89.164]) by mail.ebusiness-leidinger.de (Postfix) with ESMTPSA id BED3D84400D; Sun, 1 May 2011 13:36:33 +0200 (CEST) Received: from unknown (IO.Leidinger.net [192.168.2.110]) by outgoing.leidinger.net (Postfix) with ESMTP id 5A5F5119D; Sun, 1 May 2011 13:36:30 +0200 (CEST) Date: Sun, 1 May 2011 13:36:27 +0200 From: Alexander Leidinger To: "Emil Smolenski" Message-ID: <20110501133627.00006616@unknown> In-Reply-To: References: X-Mailer: Claws Mail 3.7.8cvs47 (GTK+ 2.16.6; i586-pc-mingw32msvc) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-EBL-MailScanner-Information: Please contact the ISP for more information X-EBL-MailScanner-ID: BED3D84400D.A25D0 X-EBL-MailScanner: Found to be clean X-EBL-MailScanner-SpamCheck: not spam, spamhaus-ZEN, SpamAssassin (not cached, score=-0.923, required 6, autolearn=disabled, ALL_TRUSTED -1.00, TW_ZD 0.08) X-EBL-MailScanner-From: alexander@leidinger.net X-EBL-MailScanner-Watermark: 1304854595.26307@WuxNArPge6heNDqm83txWA X-EBL-Spam-Status: No Cc: freebsd-fs@freebsd.org, dfr@FreeBSD.org, jhb@FreeBSD.org Subject: Re: [ZFS] Booting from zpool created on 4k-sector drive X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 May 2011 11:36:48 -0000 On Tue, 21 Dec 2010 15:29:01 +0100 "Emil Smolenski" wrote: > Hello, > > There is a hack to force zpool creation with minimum sector size > equal to 4k: > > # gnop create -S 4096 ${DEV0} > # zpool create tank ${DEV0}.nop > # zpool export tank > # gnop destroy ${DEV0}.nop > # zpool import tank > > Zpool created this way is much faster on problematic 4k sector > drives which lies about its sector size (like WD EARS). This hack > works perfectly fine when system is running. Gnop layer is created > only for "zpool create" command -- ZFS stores information about > sector size in its metadata. After zpool creation one can export the > pool, remove gnop layer and reimport the pool. Difference can be seen > in the output from the zdb command: > > - on 512 sector device (2**9 = 512): > % zdb tank |grep ashift > ashift=9 > > - on 4096 sector device (2**12 = 4096): > % zdb tank |grep ashift > ashift=12 > > This change is permanent. The only possibility to change the value > of ashift is: zpool destroy/create and restoring pool from backup. > > But there is one problem: I cannot boot from such pool. Error message: > > ZFS: i/o error - all block copies unavailable > ZFS: can't read MOS > ZFS: unexpected object set type 0 FYI: I can boot successfully from a ZFS v28 pool which was created like this in a GPT partition (tested with 9-current). Bye, Alexander. -- http://www.Leidinger.net Alexander @ Leidinger.net: PGP ID = B0063FE7 http://www.FreeBSD.org netchild @ FreeBSD.org : PGP ID = 72077137