[ZFS] Booting from zpool created on 4k-sector drive
krad
kraduk at gmail.com
Tue May 3 08:34:55 UTC 2011
On 2 May 2011 01:47, ambrosehuang ambrose <ambrosehua at gmail.com> wrote:
> 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 <Alexander at leidinger.net>:
> > On Tue, 21 Dec 2010 15:29:01 +0100 "Emil Smolenski" <am at raisa.eu.org>
> > 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
> > _______________________________________________
> > freebsd-fs at freebsd.org mailing list
> > http://lists.freebsd.org/mailman/listinfo/freebsd-fs
> > To unsubscribe, send any mail to "freebsd-fs-unsubscribe at freebsd.org"
> >
> _______________________________________________
> freebsd-fs at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-fs
> To unsubscribe, send any mail to "freebsd-fs-unsubscribe at freebsd.org"
>
or grab these prebuilt boot blocks and install them
http://people.freebsd.org/~pjd/zfsboot/
worked for me a treat with exactly the problem you have
More information about the freebsd-fs
mailing list