From owner-freebsd-current@FreeBSD.ORG Wed Jun 3 09:33:08 2009 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 754A31065672; Wed, 3 Jun 2009 09:33:08 +0000 (UTC) (envelope-from paul@fletchermoorland.co.uk) Received: from hydra.fletchermoorland.co.uk (hydra.fletchermoorland.co.uk [78.33.209.59]) by mx1.freebsd.org (Postfix) with ESMTP id DE48B8FC1C; Wed, 3 Jun 2009 09:33:07 +0000 (UTC) (envelope-from paul@fletchermoorland.co.uk) Received: from [192.168.0.154] (demophon.fletchermoorland.co.uk [192.168.0.154]) by hydra.fletchermoorland.co.uk (8.14.2/8.14.2) with ESMTP id n539X4c6089795; Wed, 3 Jun 2009 10:33:05 +0100 (BST) (envelope-from paul@fletchermoorland.co.uk) Message-ID: <4A264350.2000908@fletchermoorland.co.uk> Date: Wed, 03 Jun 2009 10:33:04 +0100 From: Paul Wootton User-Agent: Thunderbird 2.0.0.21 (X11/20090504) MIME-Version: 1.0 To: Doug Rabson References: <4A1D5E7B.4030605@fletchermoorland.co.uk> <4A1D9AC6.2020603@fletchermoorland.co.uk> <13C11BDA-1354-4108-B087-09956C2A8F63@rabson.org> <4A2018EE.5020204@fletchermoorland.co.uk> <9476D694-4825-4DDD-80AE-B34B367A85B4@rabson.org> In-Reply-To: <9476D694-4825-4DDD-80AE-B34B367A85B4@rabson.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Scanned-By: MIMEDefang 2.64 on 192.168.0.1 Cc: dfr@freebsd.org, freebsd-current@freebsd.org Subject: Re: Booting from ZFS RaidZ X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jun 2009 09:33:08 -0000 Doug Rabson wrote: > > On 29 May 2009, at 18:18, Paul Wootton wrote: > >> Doug Rabson wrote: >>> >>> On 27 May 2009, at 20:55, Paul Wootton wrote: >>> >>>> Doug Rabson wrote: >>>>> >>>>> On 27 May 2009, at 16:38, Paul Wootton wrote: >>>>> >>>>>> Hi, >>>>>> >>>>>> With the recent changes allowing RaidZ boot, I thought I would >>>>>> finally drop my mirror pack and go RaidZ. >>>>>> >>>>>> The only problem I now have is >>>>>> demophon# zpool set bootfs=DemoPool/root DemoPool >>>>>> cannot set property for 'DemoPool': operation not supported on >>>>>> this type of pool >>>>>> >>>>>> Is this still a work in progress, or do I have something a-miss? >>>>>> >>>>>> I am using current as of today >>>>>> "demophon# uname -a >>>>>> FreeBSD demophon 8.0-CURRENT FreeBSD 8.0-CURRENT #17: Wed May 27 >>>>>> 13:18:06 BST 2009 >>>>>> paul@demophon:/usr/obj/usr/src/sys/DEMOPHON amd64" >>>>> >>>>> This is a limitation which I will remove as soon as I have a >>>>> little time to work on it. Basically, Solaris can only boot from >>>>> simple structures such as mirrors and collections of mirrors. The >>>>> code enforces this by stopping you from setting the bootfs >>>>> property if the pool configuration is too complex for the Solaris >>>>> boot code. I will simply remove this limitation for FreeBSD since >>>>> we can now boot from any pool configuration. >>>>> >>>>> In the meantime, you can still boot if you put your root >>>>> filesystem files in the root of the pool. Not ideal I know but >>>>> I'll try to fix it properly soon. >>>>> >>>> >>>> This does seem to work correctly for me as I get a BTX crash (see >>>> below) >>>> >>>> Verifying DMI Poll Data ............. >>>> \ >>>> FreeBSD/i386 boot >>>> Default:DemoPool:/boot/kernel/kernel >>>> boot: >>>> | >>>> int=00000000 err=00000000 elf=00010083 eip=00192adf >>>> eax=00192e02a ebx=df5610ed ecx=d485b986 edx=00000000 >>>> esi=00000040 edi=000935d0 ebp=0009339c esp=00000000 >>>> cs=0008 ds=0010 es=0010 fs-0010 gs=0010 ss=0010 >>>> cs:eip=c5 e4 00 66 0f 73 dc 02-ff e4 b8 8d 8d bc f2 2a >>>> e9 ba e6 f4 2a 8a d8 24-df 86 c4 be 00 2b e9 8b >>>> ss:esp=16 e8 00 f0 16 e8 00 f0-c3 e2 00 f0 16 e8 00 f0 >>>> 16 e8 00 f0 54 ff 00 f0-b8 6e 00 f0 16 e8 00 f0 >>>> BTX halted >>> >>> How frustrating. Can you give me some idea on your ZFS pool >>> configuration. Also, if you can dig out the symbol table for >>> /boot/loader (it should be lurking somewhere in your /usr/obj tree >>> as loader.sym), it would be interesting to see where it crashed >>> (i.e. whats the closest symbol to the value of EIP above). >>> >>> _______________________________________________ >>> freebsd-current@freebsd.org mailing list >>> http://lists.freebsd.org/mailman/listinfo/freebsd-current >>> To unsubscribe, send any mail to >>> "freebsd-current-unsubscribe@freebsd.org" >>> >> Erm, Opps.... Im an idiot.... >> I went back over my steps and realised the I had forgotten to do a >> "make distrib-dirs" and "make distribution" >> Now it boots the kernel but I can not get it to mount the root filing >> system. >> I have got a few more thinks to try before I throw my hands in the >> air, but unfortunately that will not be until after the weekend (the >> BSD is my main PC at work) > > What do you have in /etc/fstab for the root filesystem? I'm not > exactly sure if the root mounting code can cope with mounting the root > of the pool as root filesystem. You might try the attached patch which > should allow setting bootfs on raidz pools to something more useful > than the root. > > > _______________________________________________ > freebsd-current@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to > "freebsd-current-unsubscribe@freebsd.org" I only have my swaps in the fstab file. This is the same as what i did for for my single and mirror setup. In /boot/loader.conf I specified "vfs.root.mountfrom=zfs:DemoPool/root" The kernel loads and then fails just before switching to user land with an error saying trying to mount root from zfs:DemoPool/root and failed. It then asks for user intervention and specify where to load root filing system from. Pressing ? lists all my drives and ufs slices, but not any zfs partitions. zfsroot is an ex-mirror setup, only running on one drive now. This boots fine and all is happy - again, nothing really in fstab but vfs.root.mountfrom=zfs:zfsroot/root in /boot/loader.conf During all the tests, I was swapping the mountpoints so not to cause conflicts with each other... As an experiment, I bootup from the raidz pool but changed to vfs.root.mountfrom=zfs:zfsroot/root The kernel loaded but as before, bombed out asking for user intervention for where to find root. Then is tried bootinng from the zfsroot single disk pool and set vfs.root.mountfrom=zfs:DemoPool/root. This booted up correctly and the machine was happy, although it meant that I had to use a none raidz drive to bootstrap - not really what I was looking for. I have bootfs=DemoPool/root on DemoPool. Any ideas? Paul ----------------------------------------------------------------------------------- Fletcher Moorland Limited is a company registered in England and Wales. Registration number: 2984467. Registered office: Elenora Street, Stoke on Trent, Staffordshire, ST4 1QG. VAT Registration number: 478730606 Telephone: 01782 411021 | Fax: 01782 744470 | http://www.fletchermoorland.co.uk