From owner-freebsd-questions@FreeBSD.ORG Tue Mar 31 15:21:48 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E9359106566B; Tue, 31 Mar 2009 15:21:48 +0000 (UTC) (envelope-from jmiscaro@gmail.com) Received: from mail-qy0-f134.google.com (mail-qy0-f134.google.com [209.85.221.134]) by mx1.freebsd.org (Postfix) with ESMTP id 6F40F8FC15; Tue, 31 Mar 2009 15:21:48 +0000 (UTC) (envelope-from jmiscaro@gmail.com) Received: by qyk40 with SMTP id 40so4881620qyk.3 for ; Tue, 31 Mar 2009 08:21:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=8NleBfWZn5XBL/GG8+jRkXlbIMzCwxIinK8UEXyBXeY=; b=ftHW/MQD1vpl8d7AV09NZq/JWUFnz0vfWAkpJ4+xzpExC5yjkN0FhsHavSd+5ft9fA fS465sqiumoWJl8bsQYE1gzqvyOulKfyL8N/JayN5VrVBFxTPHSEq4xVLSe/z1/PFKOy 0/u54dZAg7bHIslujpd5uR7nb4+WN5M5JDYos= 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 :cc:content-type; b=JWgbBOA+MHeJOBkh4MEPlAIVQ7fdPdY+tCY9fl7HIoAu5T+t1fSugoHt/yXPbl0CR9 se1Smam2/QW84CM6b+uLhxcc5n0qZntfoTUYSqh/TGK/W6RSE1vL0G7nry1kIXW7Pgz5 p4d/q2WYxVdeU72kSZ6tCaWWGsdrFMKmJqfRw= MIME-Version: 1.0 Received: by 10.229.110.6 with SMTP id l6mr2481951qcp.52.1238512907731; Tue, 31 Mar 2009 08:21:47 -0700 (PDT) In-Reply-To: References: Date: Tue, 31 Mar 2009 11:21:47 -0400 Message-ID: From: Juan Miscaro To: Ivan Voras Content-Type: multipart/mixed; boundary=00163631053bea64ed04666bc17d Cc: freebsd-questions@freebsd.org Subject: Re: Recovering a GEOM RAID0 array X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Mar 2009 15:21:49 -0000 --00163631053bea64ed04666bc17d Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 2009/3/31 Ivan Voras : > Juan Miscaro wrote: > >>> It looks like you created a both a fdisk partition table and a bsdlabel >>> partition table on the ad3 drive. If so, your data is probably already >>> corrupted. >> >> What is a generic configuration? =C2=A0Or can you explain how you come t= o >> that conclusion? > > RAID 0 means striping data across N drives (2 in your case), with a > fixed stripe size. From the information in kern.geom.confxml (which is > why gstripe list should work), your stripe size is 4 kB, which is good > for this purpose. This kind of setup is usually done with raw drives, > i.e. with GEOM_STRIPE: "gstripe label st0 ad1 ad3". After this, your > array is called stripe/st0 - this is where you create the file system, > etc. "Striping" means that each drive contains only a part of the data. > E.g. if you write 8 kB to the start of your array, the first 4 kB will > be written to ad1, the next 4 kB to ad3. Both smaller and larger > requests are handled logically. This means that the first sector on ad1 > contains the partition table of your array, if you partitioned it (and > it looks like you did). The first sector of ad3 contains whatever data > is at position 4096 in your array - probably nothing important because > your partitions start at 32 kB - 512. > > If you wrote only the partition table to ad3 then it's not a big deal - > it's useless but it may not corrupt anything important. If you proceeded > to to something else on ad3, then there could be problems. > >>> ad1 is also strangely partitioned but since it's your first drive in a >>> stripe this can be acceptable (it will contain the first sectors of the >>> array, including its partition tables). >>> >>>> # gstripe dump ad3 >>>> Can't read metadata from ad3: Invalid argument. >>>> Not fully done. >>> This can happen if the metadata on ad3 is corrupted. You'll need to dum= p >>> the last sector and inspect it to verify. >> >> I've never done that before. =C2=A0Can you be explicit? > > Using information from your previous posts, you should do this: > > # dd if=3D/dev/ad3 of=3Dad3last count=3D1 skip=3D625142447 > # hd ad3last > > Thanks for that great explanation. The file ad3last.txt is attached. -- jm --00163631053bea64ed04666bc17d Content-Type: text/plain; name="ad3last.txt" Content-Disposition: attachment; filename="ad3last.txt" Content-Transfer-Encoding: base64 X-Attachment-Id: f_fsyqk0k61 MDAwMDAwMDAgIDI0IDQ3IDQxIDQ2IDUyIDEwIDQxIDA4ICAwMCAwMCAwMCAwMCAwMCAwMCAwMCAw MCAgfCRHQUZSLkEuLi4uLi4uLi58CjAwMDAwMDEwICAwMCAwMCAwMCAwMCAwMCAwMCAwMCAwMCAg MDAgMDAgNmYgZTIgNDIgMjUgMDAgMDAgIHwuLi4uLi4uLi4ub++/vUIlLi58CjAwMDAwMDIwICAw MCAwMCAwMCAwOCAwMCAwMCAwMCAwMCAgMDAgMDAgMDAgMDAgMDAgMDAgMDAgMDAgIHwuLi4uLi4u Li4uLi4uLi4ufAowMDAwMDAzMCAgMDAgMDAgMDAgMDAgMDAgMDAgMDAgMDAgIDAwIDAwIDAwIDAw IDAwIDAwIDAwIDAwICB8Li4uLi4uLi4uLi4uLi4uLnwKKgowMDAwMDEwMCAgMjYgMzAgMzYgMmYg MzIgMzcgMmYgMzIgIDMwIDMwIDM2IDJkIDUwIDM0IDRkIDM4ICB8JjA2LzI3LzIwMDYtUDRNOHwK MDAwMDAxMTAgIDMwIDMwIDUwIDcyIDZmIDJkIDM4IDMyICAzMyAyZCAzNiA0MSAzNyA0YyAzNiA0 NyAgfDAwUHJvLTgyMy02QTdMNkd8CjAwMDAwMTIwICAwMCAwMCAwMCAwMCAwMCAwMCAwMCAwMCAg MDAgMDAgMDAgMDAgMDAgMDAgMDAgMDAgIHwuLi4uLi4uLi4uLi4uLi4ufAoqCjAwMDAwMjAwCg== --00163631053bea64ed04666bc17d--