From owner-freebsd-hackers@FreeBSD.ORG Thu Nov 27 00:05:52 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 15ECB1065672 for ; Thu, 27 Nov 2008 00:05:52 +0000 (UTC) (envelope-from mwm-keyword-freebsdhackers2.e313df@mired.org) Received: from mired.org (five.mired.org [66.92.153.75]) by mx1.freebsd.org (Postfix) with ESMTP id 909EE8FC1D for ; Thu, 27 Nov 2008 00:05:51 +0000 (UTC) (envelope-from mwm-keyword-freebsdhackers2.e313df@mired.org) Received: (qmail 64310 invoked by uid 1001); 26 Nov 2008 19:05:46 -0500 Received: from bhuda.mired.org (localhost.localdomain [127.0.0.1]) by bhuda (tmda-ofmipd) with ESMTP; Wed, 26 Nov 2008 19:05:46 -0500 Date: Wed, 26 Nov 2008 19:05:45 -0500 To: "Peter Steele" Message-ID: <20081126190545.17b79195@bhuda.mired.org> In-Reply-To: <2ACA3DE8F9758A48B8BE2C7A847F91F240CE99@polaris.maxiscale.com> References: <2ACA3DE8F9758A48B8BE2C7A847F91F240CE6B@polaris.maxiscale.com> <20081126153510.6062cd55@bhuda.mired.org> <2ACA3DE8F9758A48B8BE2C7A847F91F240CE99@polaris.maxiscale.com> Organization: Meyer Consulting X-Mailer: Claws Mail 3.5.0 (GTK+ 2.12.11; amd64-portbld-freebsd7.0) Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAG1BMVEXguIzRkGnhyaz069mXhW0WHRnbrnR9WCQ6LB0CchNMAAACSUlEQVQ4jV2TQW7jMAxFGaPQOgQEdZaGMsgBrAvUA03dCxj1Uu4U2gfwQD7AGNax51NK07RcxXz6/CSl0Ij450vkPG1jzpIZM1UwDCl/xB14TWnNX8A00Qj5a0mnVFVbVUz4MeErea2HikSRqZzY894zwg9p2+/AtO8LzxFED+tNAUFeU29iFOLRxlZAcdo9A8wi8ZBMV4BKPde82Oxrvs6BTkulQIClte0DLFzzsKk9j1MBex8iUaP00Bd78S/muyFScrTXz6zLkEUxJp+SabQfNOs4f4Jpx5qSZ/304PWwlEWP1cOn/mJQR7EOD+uKhjcBLziuL7xoY5Xm+VFAUSw/LwwwsHEHxihpwV4EJH0xXRkbw1PkRw+X4pEuSJwBggqk+HEYKkiL5/74/nQkogigzQsAFrakxZyfw3wMIEEZPv4AWMfxwqE5GNxGaERjmH+PG8AE0L4/w9g0lsp1raLYAN5azQa+AOoO9NwcpFkTrG2VKNMNEL5UKUUAw34tha0z7onUG0oBoNtczE04GwFE3wCHc0ChezAJ6A1WMV81AtY7wDAJSlXwV+4cwBvsOsrQMRawfQEBz0deEZ7WNpV2szckIKo5VpDHDSDvF1GItwqqAlG01Hh50BGtVhuUkjkasg/14bYFGCgWg1fSWHvmOoJck2xdp9ZvZBHzDVTzX23TkrOn7qe5U2COEw5D4Vx3qEQpFY2Z/3QFnJxzp7YCmSMG19nOUoe869zZfOQb5ywQuWu0yCn5+8gxZz+BE7vG3j4/wbf4D/sXN9Wug1s7AAAAAElFTkSuQmCC Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Delivery-Agent: TMDA/1.1.12 (Macallan) From: Mike Meyer Cc: freebsd-hackers@freebsd.org Subject: Re: FreeBSD boot menu is missing X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Nov 2008 00:05:52 -0000 On Wed, 26 Nov 2008 14:46:44 -0800 "Peter Steele" wrote: > >The phrase "and copy the file systems over to the mirror" worries > >me. Do you actually copy the file systems, or do you let the mirror > >system do it for you? In particular, are you mirroring file systems or > >the entire disk? Because the boot blocks aren't part of any file > >system, so you won't have copied them over, hence you'll be getting > >whatever boot software the second drive has installed. > > I'm more or less using the approach described here: > > http://people.freebsd.org/~rse/mirror/ > > This assumes you have an existing OS installed on one drive of a > multi-drive system. You then use gmirror to create mirror devices on a > second drive to match the partitions of the boot drive, transfer the > data to the newly established mirror, adjust /etc/fstab on the mirrored > root partition to mount the appropriate mirrored devices, then reboot, > telling the boot loader to boot from the mirrored drive instead of the > original boot drive (via an entry in boot.config). After it comes up, > you can then add the original boot drive to the mirror (and any other > drive if there are more than two drives that you want to mirror) using > gmirror insert. This all works fine, except I'm not getting the boot > menu. I know this isn't part of the mirroring, but it is a step I need > to perform as part of the whole process. The question is what do I need > to do to make sure the appropriate boot loader is setup? He had you install a stock MBR on the second disk. You never copied the boot loader from the first disk, so that's what you're going to use when you boot from the second disk. You need to install the boot block you want on the second disk. Which probably means boot0. boot0cfg will do that for you. You probably want boot0cfg -B -s 1 # The device - ad1, not the slice! > >My recommendation for gmirror is to set up one drive to boot from, > >then us gmirror label to create a gmirror device on each partition > >(excluding swap). Edit /etc/fstab to use the gmirror devices thus > >created, and reboot to make sure it's working properly. It will > >initially boot from the disk device (pretty much required until > >gmirror is started), then switch to the mirrored root partition. Now > >use gmirror insert to add the matching partitions on the second disk, > >and let gmirror update the bits on the second drive. You'll need to > >copy the boot blocks from the first drive to the second drive by hand > >if you want to boot off the second drive. > I think you are describing more or less the same process here. Um, no. He reduced the size of one partition because he's overly paranoid about gmirror failing to recognize the providers properly, which forces him to dump and restore one partition - which leads to doing them all to get them on one disk. If you don't need to resize the partitions, you can just labelling the disk you're already using. Once you've done that, you can gmirror insert the second drive into the mirror, and it will resilver the second drive while providing full access to the first one. No need to copy any data at all. His analysis of the choices is pretty shallow as well. He lets wanting to use different-sized disks dominate the analysis, which is great if you're building your mirror with disks from the parts bin. I tend to by drives to pairs if I want to mirror them, so that's immaterial. Once that's gone, mirroring a full disk slice just doesn't make sense at all - either mirror the entire disk (to get the MBR), or mirror the partitions in the slice (for extra flexibility and less painful resilvering). Better instructions for getting a full-disk mirror can be found here: http://www.onlamp.com/pub/a/bsd/2005/11/10/FreeBSD_Basics.html http://www.mired.org/consulting.html Independent Network/Unix/Perforce consultant, email for more information. O< ascii ribbon campaign - stop html mail - www.asciiribbon.org