From owner-freebsd-questions@FreeBSD.ORG Tue Nov 18 06:47:26 2014 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 45DF2E9E for ; Tue, 18 Nov 2014 06:47:26 +0000 (UTC) Received: from icp-osb-irony-out3.external.iinet.net.au (icp-osb-irony-out3.external.iinet.net.au [203.59.1.219]) by mx1.freebsd.org (Postfix) with ESMTP id BBC9288A for ; Tue, 18 Nov 2014 06:47:25 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvwKADHralR8lKxs/2dsb2JhbABbgw6BLoI2tg4GmxMCgRAWAQEBAQF9hAMBAQMBOj8FCwsNARMlDwUYMROIOAjTMAEBAQEGAQEBAQEdhjmKDUIHgy2BHgWeVYdrQI5PhA8pMIEIgUMBAQE X-IronPort-AV: E=Sophos;i="5.07,408,1413216000"; d="scan'208";a="53953130" Received: from unknown (HELO smtp.phoenix) ([124.148.172.108]) by icp-osb-irony-out3.iinet.net.au with ESMTP; 18 Nov 2014 14:47:14 +0800 Received: by smtp.phoenix (Postfix, from userid 1001) id 46C5CAE3; Tue, 18 Nov 2014 17:47:14 +1100 (AEDT) Date: Tue, 18 Nov 2014 17:47:14 +1100 From: andrew clarke To: David Newman Subject: Re: upgrading 9.3 / ZFS v28 Message-ID: <20141118064714.GA75897@ozzmosis.com> References: <54697AA5.6040804@networktest.com> <20141117123929.GB60429@ozzmosis.com> <546A1538.4040801@networktest.com> <20141117181527.GA62908@ozzmosis.com> <546A91D4.3070009@networktest.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <546A91D4.3070009@networktest.com> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Nov 2014 06:47:26 -0000 On Mon 2014-11-17 16:24:52 UTC-0800, David Newman (dnewman@networktest.com) wrote: > This command will upgrade the zpool, even when mounted: > > zpool upgrade -a > > This command will take the system offline, as I learned the hard way: > > zfs upgrade > > The right way to do this: > > 1. Boot into a LiveCD. I used the FreeBSD 10.1 DVD. > > 2. For each boot partition, use this command: > > # gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 ada0 > > This assumes that (a) the freebsd-boot partition is first on the disk > and ada0 is the disk. Use "gpart show" to verify this. > > This system has four disks, each with a freebsd-boot partition, so I > went on like this: > > # gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 2 ada1 > # gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 3 ada2 > # gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 4 ada3 > > ...and I got an invalid index error on that last one, even though it's > set up the same as the others. > > The system seems to boot and run OK, but I'm not sure why that last > command failed. In what way did "zfs upgrade" take the system offline? Kernel panic? You did not paste the output of "gpart show", but I suspect you may have got the gpart index parameter wrong on ada{1,2,3}. On my two disk system, "gpart show" outputs: => 34 1953525101 ada0 GPT (932G) 34 128 1 freebsd-boot (64K) 162 1953524973 2 freebsd-zfs (932G) => 34 1953525101 ada1 GPT (932G) 34 128 1 freebsd-boot (64K) 162 1953524973 2 freebsd-zfs (932G) Therefore the correct commands were: gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 ada0 gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 ada1 Regards Andrew