From owner-freebsd-fs@FreeBSD.ORG Sun Oct 23 19:51:21 2011 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0E9A51065670 for ; Sun, 23 Oct 2011 19:51:21 +0000 (UTC) (envelope-from kraduk@gmail.com) Received: from mail-gx0-f182.google.com (mail-gx0-f182.google.com [209.85.161.182]) by mx1.freebsd.org (Postfix) with ESMTP id C3C3A8FC08 for ; Sun, 23 Oct 2011 19:51:20 +0000 (UTC) Received: by ggnq2 with SMTP id q2so5047654ggn.13 for ; Sun, 23 Oct 2011 12:51:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=bCV0n+RTh5niL0r60FnGtHqL25SGl9qY3m10jtEU4zY=; b=WzaxdjK1utibYSYoPY9+fQoqpJwX1QJQOYsS8murzR0u3WOyVZuGkmv1eb27iB1+Fa souGcZyOrBeDsG+hv3MJ+dZP72cutYRQvFyeN8UycEHzE5+oaCrhGPeVkWtcYivjUP3x 02KEDvT2C4Qrs1SQZwQOJJ9Y0EKFcXHnYvLXg= MIME-Version: 1.0 Received: by 10.236.181.135 with SMTP id l7mr30872822yhm.85.1319399480047; Sun, 23 Oct 2011 12:51:20 -0700 (PDT) Received: by 10.236.103.18 with HTTP; Sun, 23 Oct 2011 12:51:20 -0700 (PDT) In-Reply-To: References: Date: Sun, 23 Oct 2011 20:51:20 +0100 Message-ID: From: krad To: James Coldwell Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-fs@freebsd.org Subject: Re: Restore a ZFS mirror setup (GPT, ZFS-on-root) X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Oct 2011 19:51:21 -0000 On 23 October 2011 10:26, James Coldwell wrote: > Hello List, > > My Problem: > My server wouldn't come back up after a reboot. > It is a 8.2-RELEASE system, running a two-disk ZFS mirror setup. > It is a dedicated box in a remote datacenter. > I can boot up some linux-based rescue system. > > The way I installed FreeBSD on it was with mfsbsd, the zpool was > created as such: > set poolname="z0" > set dev1="ad4" > set dev2="ad6" > set swapsize="4G" > set zfssize="300G" > gpart delete -i 1 ${dev1} > gpart delete -i 1 ${dev2} > gpart destroy ${dev1} > gpart destroy ${dev2} > gpart create -s gpt ${dev1} > gpart create -s gpt ${dev2} > gpart add -b 34 -s 64k -t freebsd-boot ${dev1} > gpart add -s ${swapsize} -t freebsd-swap -l swap0 ${dev1} > gpart add -s ${zfssize} -t freebsd-zfs -l disk0 ${dev1} > gpart add -b 34 -s 64k -t freebsd-boot ${dev2} > gpart add -s ${swapsize} -t freebsd-swap -l swap1 ${dev2} > gpart add -s ${zfssize} -t freebsd-zfs -l disk1 ${dev2} > gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 ${dev1} > gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 ${dev2} > zpool create ${poolname} mirror /dev/gpt/disk0 /dev/gpt/disk1 > > That worked perfectly for half a year. > Suddenly, it wouldn't come back up after a reboot. > > What I want to do now is mount the filesystem and check for > misconfiguration. > So I once again booted into the linux-based rescue system, dd'd mfsbsd > onto the first disk (/dev/sda), booted it up. > This FreeBSD-based system is called "prealpha". > That's where I am now: > prealpha# gpart show > => 0 976773168 ada0 BSD (466G) > 0 16 - free - (8.0K) > 16 65520 1 !0 (32M) > 65536 976707632 - free - (466G) > > => 34 976773101 ada1 GPT (466G) > 34 128 1 freebsd-boot (64K) > 162 8388608 2 freebsd-swap (4.0G) > 8388770 629145600 3 freebsd-zfs (300G) > 637534370 339238765 - free - (162G) > prealpha# ls /dev/gpt/ > disk1 swap1 > The devices changed name from ad4/ad6 to ada0/ada1 because mfsbsd > loads the ahci module now. > I want to mount the zpool from ada1, and view/edit some configuration > files. > After that, I want to restore the mirror setup with ada0 and ada1 and > try to boot again. > rth > How do I do that? > Any help would be appreciated, I probably forgot to mention vital > details, I am in a bit of a panic right now. > Please tell me if you need for details. > > James > _______________________________________________ > freebsd-fs@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-fs > To unsubscribe, send any mail to "freebsd-fs-unsubscribe@freebsd.org" > I'm curious why did you boot into a linux livecd? Freebsd has a rescue cd, or you could use pcbsd. Opensolaris or Solars 11 cd would work as well, but linux?? 1st thing to do is calm down as you have made one mistake by destroying one disk (what if the one you chose was the good one). Boot into a live cd and DD the remaining zfs disk to a portable drive. You can then play with this image safely, and or have a backup. Can you provide any output from the boot process? Get a remote hands engineer to take a picture. We can then take it from there