From owner-freebsd-fs@FreeBSD.ORG Mon May 2 00:47:51 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 437DE106574E for ; Mon, 2 May 2011 00:47:51 +0000 (UTC) (envelope-from ambrosehua@gmail.com) Received: from mail-qy0-f175.google.com (mail-qy0-f175.google.com [209.85.216.175]) by mx1.freebsd.org (Postfix) with ESMTP id D45158FC16 for ; Mon, 2 May 2011 00:47:50 +0000 (UTC) Received: by qyk35 with SMTP id 35so1181268qyk.13 for ; Sun, 01 May 2011 17:47:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=v+7zZ90snEZJdCGWaWVgG4iLnU/cqcGUVWBtVWFe/68=; b=oQmqqfWalaJ1Dw4zRdJ+seo1fKVR+L4wbaiWgWzAa3BnL9Ghz29NtutEpccIY8KK1v ZPTdgyxiwmRqcZePgoaAsB7ROjQLXRe5IQVl218KdNJHTwJEgP/OKkbd4+gQRi6/nZi4 IUJJobmaXTAAq3j2IBcD4PCNDMLsNtOaxQW5g= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=QNrGYsTvSKTQSDDEpiWkr5C0kZ5gtBWXUuJIRL3zpIwLAyqpvEhLkZn0NEgAXZmfrJ GG+soN/qN4DadkUmAJOm/05MPi1O++YSiYQiK8ptYQO3UJDWoDI5Zcas4Rdem4b7aBTt BkzxkX3q+dj7YrDiSuC2bhFfBU7jd2hTPJl/0= MIME-Version: 1.0 Received: by 10.229.77.142 with SMTP id g14mr17835qck.10.1304297269847; Sun, 01 May 2011 17:47:49 -0700 (PDT) Received: by 10.229.18.68 with HTTP; Sun, 1 May 2011 17:47:49 -0700 (PDT) In-Reply-To: <20110501133627.00006616@unknown> References: <20110501133627.00006616@unknown> Date: Mon, 2 May 2011 08:47:49 +0800 Message-ID: From: ambrosehuang ambrose To: Alexander Leidinger Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-fs@freebsd.org, dfr@freebsd.org, Emil Smolenski 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: Mon, 02 May 2011 00:47:51 -0000 Here is my trick: 1 Download the ZFS V28 patch for 8-stable, 2 patch the 8-stable , 3 make buildkernel, 4 then you will get gptzfsboot, zfsloader, pmbr 5 install pmbr according to wiki/GPTboot 6 replace your old gptzfsboot, zfsloader with new ones; then you can work around this. It works for me( 3 WD10ears + ZFS V15 + 8-stable) 2011/5/1 Alexander Leidinger : > 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 =3D 512): >> % zdb tank |grep ashift >> ashift=3D9 >> >> - on 4096 sector device (2**12 =3D 4096): >> % zdb tank |grep ashift >> ashift=3D12 >> >> 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 =A0 =A0Alexander @ Leidinger.net: PGP ID =3D B00= 63FE7 > http://www.FreeBSD.org =A0 =A0 =A0 netchild @ FreeBSD.org =A0: PGP ID =3D= 72077137 > _______________________________________________ > freebsd-fs@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-fs > To unsubscribe, send any mail to "freebsd-fs-unsubscribe@freebsd.org" >