From owner-freebsd-questions@freebsd.org Thu Jun 23 22:57:57 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 2039EB73825 for ; Thu, 23 Jun 2016 22:57:57 +0000 (UTC) (envelope-from perikillo@gmail.com) Received: from mail-lf0-x22d.google.com (mail-lf0-x22d.google.com [IPv6:2a00:1450:4010:c07::22d]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 85E9F1F7A for ; Thu, 23 Jun 2016 22:57:56 +0000 (UTC) (envelope-from perikillo@gmail.com) Received: by mail-lf0-x22d.google.com with SMTP id f6so104851540lfg.0 for ; Thu, 23 Jun 2016 15:57:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=+L1NMovq1gyz400A61ZAHGCJhZbo6i7yhN/t8RwP+FE=; b=PP+rDLrjohAlD1ADNVJQZLRSqYZ/AIsaDKXeZ0byKZaaujeNNcoTG1+WcAbZ0kEGxk a85YvIEPQ7gZkpdM0jlF91tIL+3z3fVYsPFLAwJ8u/aB/BY8QP/f7s7Tp5nL9Cyij7jX e7zba7K3k981t7SH+IGuaAwNY8vbaxdp4h78Mo/RHd26rK1W7xERPdILFqpF43d/LeWL XcwNolZx6tFP1gtNuFIicp5ewhE2RIDLB01pHJqGMFzk6KMSVrXjIWW0oLYpk5+j9pdr ArxaRIp/zzC9Gsw/kPOmQMaThqGmdwy8O2VTkHHkulyZYNKiv0Z+B4IRdA+5J2Tkq3gN BdIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=+L1NMovq1gyz400A61ZAHGCJhZbo6i7yhN/t8RwP+FE=; b=QzNxpuUI4Yul3VqOnzFADUBVCBoAlpo52q+jsigOlwfaVn2XxCo5o2D2lAgXK0mUiq eHb7RYa4rCCnzWWxNMnAgtQjVTenMT2vYD2vwYiMUWIcylnKVb8OyXpYoJjWvP+Iv83u gcACAPo0hL9fPW5I4p/MD8BAcHcOeGTmOoHTeYCGFA0atXjBz3L/qU5x9DcNB+Br8xxE XcKgw6/a2qMtrWe/6H1FILLS9qPZLSzUedvuzBSyB0IzcEpkLA9sx5N1urXDk07WDTxl 9+9Xmh7+m5ueIcYqsIoBvdkVArcRG8SMxN6aDg0wfS+5UQh+gssSZ7z95/RyHIKZK0EG iBmA== X-Gm-Message-State: ALyK8tIXAVmR6IeioY4UhCeqnrcByH6u3DoGPJ4VlRxTAO+ZEZSKuhONXvndK2PhPjpmfc+G1hS9U5/7BmmzZA== X-Received: by 10.25.90.209 with SMTP id o200mr236773lfb.193.1466722673944; Thu, 23 Jun 2016 15:57:53 -0700 (PDT) MIME-Version: 1.0 Received: by 10.25.76.7 with HTTP; Thu, 23 Jun 2016 15:57:53 -0700 (PDT) In-Reply-To: <1466717892.674545627.ai2dh1w6@frv35.fwdcdn.com> References: <1466717892.674545627.ai2dh1w6@frv35.fwdcdn.com> From: perikillo Date: Thu, 23 Jun 2016 15:57:53 -0700 Message-ID: Subject: Re: Copy bootcode to mirror disk? To: FreeBSD Mailing List Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.22 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: Thu, 23 Jun 2016 22:57:57 -0000 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? 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 > > > >