From owner-freebsd-questions@FreeBSD.ORG Tue Nov 18 17:22:17 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 44224D7C for ; Tue, 18 Nov 2014 17:22:17 +0000 (UTC) Received: from mail5.networktest.com (mail5.networktest.com [204.109.60.142]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 101E7906 for ; Tue, 18 Nov 2014 17:22:16 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail5.networktest.com (Postfix) with ESMTP id 118982FCCB9 for ; Tue, 18 Nov 2014 09:22:09 -0800 (PST) Received: from mail5.networktest.com ([127.0.0.1]) by localhost (mail5.networktest.com [127.0.0.1]) (maiad, port 10024) with ESMTP id 33800-09 for ; Tue, 18 Nov 2014 09:22:08 -0800 (PST) Received: from tejay.local (unknown [76.89.160.208]) (using TLSv1 with cipher ECDHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: dnewman@networktest.com) by mail5.networktest.com (Postfix) with ESMTPSA id C2D7C2FCCB1 for ; Tue, 18 Nov 2014 09:22:08 -0800 (PST) Message-ID: <546B8040.1090508@networktest.com> Date: Tue, 18 Nov 2014 09:22:08 -0800 From: David Newman Organization: Network Test Inc. User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:24.0) Gecko/20100101 Thunderbird/24.7.0 MIME-Version: 1.0 CC: freebsd-questions@freebsd.org Subject: Re: upgrading 9.3 / ZFS v28 References: <54697AA5.6040804@networktest.com> <20141117123929.GB60429@ozzmosis.com> <546A1538.4040801@networktest.com> <20141117181527.GA62908@ozzmosis.com> <546A91D4.3070009@networktest.com> <20141118064714.GA75897@ozzmosis.com> In-Reply-To: <20141118064714.GA75897@ozzmosis.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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 17:22:17 -0000 On 11/17/14, 10:47 PM, andrew clarke wrote: > 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? Yup. > > 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 Sorry for not including the gpart output. It's pasted below. You're correct about incorrect usage of index numbers. I should just be using '-i 1' for all disks. Previously I used bogus values '-i 2' and '-i 3'. Is it sufficient to rerun the gpart bootcode with '-i 1' to correct this, or are other remedial steps needed? Thanks again for your help. dn => 34 1953525101 ada0 GPT (932G) 34 128 1 freebsd-boot (64K) 162 8388608 2 freebsd-swap (4.0G) 8388770 1945136365 3 freebsd-zfs (928G) => 34 1953525101 ada1 GPT (932G) 34 128 1 freebsd-boot (64K) 162 8388608 2 freebsd-swap (4.0G) 8388770 1945136365 3 freebsd-zfs (928G) => 34 1953525101 ada2 GPT (932G) 34 128 1 freebsd-boot (64K) 162 8388608 2 freebsd-swap (4.0G) 8388770 1945136365 3 freebsd-zfs (928G) => 34 1953525101 ada3 GPT (932G) 34 128 1 freebsd-boot (64K) 162 8388608 2 freebsd-swap (4.0G) 8388770 1945136365 3 freebsd-zfs (928G) > > Regards > Andrew >