From owner-freebsd-questions@freebsd.org Fri Jun 24 00:38:20 2016 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 06B01B72027 for ; Fri, 24 Jun 2016 00:38:20 +0000 (UTC) (envelope-from universite@ukr.net) Received: from frv196.fwdcdn.com (frv196.fwdcdn.com [212.42.77.196]) (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 B2A1312EB for ; Fri, 24 Jun 2016 00:38:19 +0000 (UTC) (envelope-from universite@ukr.net) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=ukr.net; s=ffe; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References:In-Reply-To:Message-Id:Cc:To:Subject:From:Date; bh=wsQ7PzdpTH3efNlpS+MkqCp5atGgW72mWTzVKF9ReTs=; b=Ebybhe7Fq+uMnDd7jR60MIL4xFjeELP70tLFdhp+i1eoFge+uBzploM6afUwdy0m5c62NDuT2eT9rp7elfFMgQfdgNQylMxMZNR4dsIOvGXjcbSDkJCKoHMzlB6vVSK+cEdwWMbjCwpPfHbneLe5QiD5hBynFu3/lzxnf9UMMmg=; Received: from [10.10.10.35] (helo=frv35.fwdcdn.com) by frv196.fwdcdn.com with smtp ID 1bGF8T-0006p0-IW for freebsd-questions@freebsd.org; Fri, 24 Jun 2016 03:38:17 +0300 Date: Fri, 24 Jun 2016 03:38:16 +0300 From: Vladislav Prodan Subject: Re[2]: Re[2]: Copy bootcode to mirror disk? To: perikillo Cc: FreeBSD Mailing List X-Mailer: mail.ukr.net 5.0 Message-Id: <1466728696.778596880.0qwmo21g@frv35.fwdcdn.com> In-Reply-To: References: <1466717892.674545627.ai2dh1w6@frv35.fwdcdn.com> <1466725107.953028829.tc1fmx6e@frv35.fwdcdn.com> X-Reply-Action: reply Received: from universite@ukr.net by frv35.fwdcdn.com; Fri, 24 Jun 2016 03:38:17 +0300 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: binary Content-Disposition: inline X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Jun 2016 00:38:20 -0000 Please show: gpart show gmirror status --- Original message --- From: "perikillo" Date: 24 June 2016, 02:53:34 > sysctl kern.geom.debugflags=16 > kern.geom.debugflags: 0 -> 16 > > root@spam:~ # gpart bootcode -b /boot/pmbr -p /boot/gptboot -i 1 ada0 > gpart: /dev/ada0p1: Operation not permitted > > On Thu, Jun 23, 2016 at 4:40 PM, Vladislav Prodan > wrote: > > > > > > > > > --- Original message --- > > From: "perikillo" > > Date: 24 June 2016, 01:58:05 > > > > > > > > > Thanks for your quick answer, I got this error: > > > > > > gpart bootcode -b /boot/pmbr -p /boot/gptboot -i 1 ada0 > > > > > > gpart: /dev/ada0p1: Operation not permitted > > > > > > Do I need remove first from mirror or some step before this? > > > > No. > > > > Try to enter in the console: > > sysctl kern.geom.debugflags=16 > > And then try again: > > gpart bootcode -b /boot/pmbr -p /boot/gptboot -i 1 ada0 > > > > > > > > > > Thanks. > > > > > > On Thu, Jun 23, 2016 at 2:40 PM, Vladislav Prodan > > > wrote: > > > > > > > > > > > > > > > > > > > --- Original message --- > > > > From: "perikillo" > > > > Date: 23 June 2016, 23:19:27 > > > > > > > > > > > > > > > > > Hi I have a server with 2 hard disk in mirror setup. > > > > > > > > > > My slices are: > > > > > > > > > > Code: > > > > > root@spam:/boot # gpart show ada1 > > > > > 34 976773101 ada1 GPT (466G) > > > > > 34 6 - free - (3.0K) > > > > > 40 128 1 freebsd-boot (64K) > > > > > 168 2097152 2 freebsd-ufs (1.0G) > > > > > 2097320 16777216 3 freebsd-ufs (8.0G) > > > > > 18874536 16777216 4 freebsd-ufs (8.0G) > > > > > 35651752 1048576 5 freebsd-ufs (512M) > > > > > 36700328 1048576 6 freebsd-swap (512M) > > > > > 37748904 939024231 - free - (448G) > > > > > > > > > > > > > > > My mirror has ada0 ada1, ada0 var slice fails, them I decide to > > replace > > > > the > > > > > whole disk and follow the instructions for that using gpart and > > backup my > > > > > current good disk layout into my new disk. > > > > > > > > > > gpart backup ada1 | gpart restore -F /dev/ada0 > > > > > > > > > > > > > > > This create my slices, I forget each mirror slice and add each slice > > into > > > > > the mirror again. > > > > > > > > > > Everything working, but looks like I forget to add the bootcode to > > my new > > > > > disk because it won't boot. > > > > > > > > > > Now is booting from 2nd disk but need to boot from all hard disk, if > > ada1 > > > > > fails I will have issues. > > > > > > > > > > > > Install the GPT bootcode into the boot partition: > > > > > > > > # gpart bootcode -b /boot/pmbr -p /boot/gptboot -i 1 ada0 > > > > > > > > -- > > > > Vladislav V. Prodan > > > > System & Network Administrator > > > > support.od.ua > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > freebsd-questions@freebsd.org mailing list > > > https://lists.freebsd.org/mailman/listinfo/freebsd-questions > > > To unsubscribe, send any mail to " > > freebsd-questions-unsubscribe@freebsd.org" > > > > > > > > > -- > > Vladislav V. Prodan > > System & Network Administrator > > support.od.ua > > > > > > > > > _______________________________________________ > freebsd-questions@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org" > -- Vladislav V. Prodan System & Network Administrator support.od.ua