From owner-freebsd-fs@FreeBSD.ORG Tue Oct 19 21:03:12 2010 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 A413A106566B for ; Tue, 19 Oct 2010 21:03:12 +0000 (UTC) (envelope-from fjwcash@gmail.com) Received: from mail-gw0-f54.google.com (mail-gw0-f54.google.com [74.125.83.54]) by mx1.freebsd.org (Postfix) with ESMTP id 5DE368FC14 for ; Tue, 19 Oct 2010 21:03:11 +0000 (UTC) Received: by gwb20 with SMTP id 20so1599425gwb.13 for ; Tue, 19 Oct 2010 14:03:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=UyqnUJdYpPgJmj1VoENyfHaPPe9fTIE4x/B80CjLF+4=; b=IA2/LKgE4hdsRT0DrEuUqLMmh5gmbf5NGLPrMv4ApVuYd0612gsJoEiiJEWnK+D51I hxUfu12oI5WMToqoNW/0o3sOVet1RMTAdbsiWE4rkSvZ2qtvwaElqx9ZEhi1h95pnTbk fgFTJoD10CTsVJueJJtAOZxSKjVJKAEzKEaUA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=bUQ1ztv/wS2S2UkPTunXWjk7xx29oATeLY/QcHjEmLtsr9V5sAxSwOQSt8HEo+FPpU R5RXAgPQaKaUMis4w1jpQz7Mk8j9LjmLsBQeLR5mi+kjAbYpVLC08ZdsAafoa6zStukq 8gQchy1/ys8QfwUVnu/X+75MILabaEKLdtCVA= MIME-Version: 1.0 Received: by 10.90.103.2 with SMTP id a2mr3033528agc.73.1287522191374; Tue, 19 Oct 2010 14:03:11 -0700 (PDT) Received: by 10.90.56.10 with HTTP; Tue, 19 Oct 2010 14:03:11 -0700 (PDT) In-Reply-To: <4CBDFFF6.5080701@digiware.nl> References: <20101019151602.GA61733@icarus.home.lan> <7BEF90D9F4D4CB985F3573C3@HexaDeca64.dmpriest.net.uk> <4CBDFFF6.5080701@digiware.nl> Date: Tue, 19 Oct 2010 14:03:11 -0700 Message-ID: From: Freddie Cash To: freebsd-fs@freebsd.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: ZFS 'read-only' device / pool scan / import? 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: Tue, 19 Oct 2010 21:03:12 -0000 On Tue, Oct 19, 2010 at 1:30 PM, Willem Jan Withagen wrot= e: > On 2010-10-19 17:30, Karl Pielorz wrote: > >> As there is such a large aspect of human error (and controller >> behaviour), I don't think it's worth digging into any deeper. It's the >> first pool we've ever "lost" under ZFS, and like I said a combination of >> the controller collapsing devices, and humans replacing wrong disks, >> 'twas doomed to fail from the start. >> >> We've replaced failed drives on this system before - but never rebooted >> after a failure, before a replacement - and never replaced the wrong >> drive :) >> >> Definitely a good advert for backups though :) > > I'm running my ZFS stuff on a 3ware and an areca controller, and they onc= e > in a while forgot their order of disks during booting. > (the 3ware got fixed by a bios upgrade) > The areca just keeps reordering no matter how hard you like to tell it > otherwise. > > But GPT really proves useful since reallocation of disks does not result = in > a different device in the gpt directory. > > eg.: > =C2=A0pool: zroot > =C2=A0state: ONLINE > =C2=A0scrub: none requested > config: > > =C2=A0 =C2=A0 =C2=A0 =C2=A0NAME =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 STATE = =C2=A0 =C2=A0 READ WRITE CKSUM > =C2=A0 =C2=A0 =C2=A0 =C2=A0zroot =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0ONLINE= =C2=A0 =C2=A0 =C2=A0 0 =C2=A0 =C2=A0 0 =C2=A0 =C2=A0 0 > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0mirror =C2=A0 =C2=A0 =C2=A0 ONLINE =C2= =A0 =C2=A0 =C2=A0 0 =C2=A0 =C2=A0 0 =C2=A0 =C2=A0 0 > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0gpt/root4 =C2=A0ONLINE =C2=A0 = =C2=A0 =C2=A0 0 =C2=A0 =C2=A0 0 =C2=A0 =C2=A0 0 > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0gpt/root6 =C2=A0ONLINE =C2=A0 = =C2=A0 =C2=A0 0 =C2=A0 =C2=A0 0 =C2=A0 =C2=A0 0 > > I could even migrate a disk from the 3ware controller to the std SATA > interfaces without losing the the gpt-label. While using labelled devices (be it glabel, gpt label, or whatever) certainly helps keep things ordered and working. However, ZFS also labels the devices in the pool. A simple "zpool export poolname" followed by a "zpool import poolname" will scan the metadata on the drives, find all the devices in the pool, re-order things internally, and carry on. Back when I started with ZFS, I used unlabelled drives (also on 3Ware controllers) and made the mistake once of booting with a failed drive removed. Pool came up faulted saying all the drives after the missing one were also faulted. Thought I lost the whole pool. However, some digging online showed the export/import info, and I was able to continue on without losing any data. --=20 Freddie Cash fjwcash@gmail.com