From owner-freebsd-stable@freebsd.org Sun Jul 19 16:16:54 2015 Return-Path: Delivered-To: freebsd-stable@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 E01789A5118 for ; Sun, 19 Jul 2015 16:16:54 +0000 (UTC) (envelope-from jmg@gold.funkthat.com) Received: from gold.funkthat.com (gate2.funkthat.com [208.87.223.18]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "gold.funkthat.com", Issuer "gold.funkthat.com" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 8366E10ED for ; Sun, 19 Jul 2015 16:16:53 +0000 (UTC) (envelope-from jmg@gold.funkthat.com) Received: from gold.funkthat.com (localhost [127.0.0.1]) by gold.funkthat.com (8.14.5/8.14.5) with ESMTP id t6JGGpRp080991 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 19 Jul 2015 09:16:51 -0700 (PDT) (envelope-from jmg@gold.funkthat.com) Received: (from jmg@localhost) by gold.funkthat.com (8.14.5/8.14.5/Submit) id t6JGGpin080990; Sun, 19 Jul 2015 09:16:51 -0700 (PDT) (envelope-from jmg) Date: Sun, 19 Jul 2015 09:16:51 -0700 From: John-Mark Gurney To: Marc UBM Cc: freebsd-stable Subject: Re: problem with geli and LSI controller Message-ID: <20150719161651.GQ8523@funkthat.com> References: <20150719173432.16bfa3be6d110571cbc8fe2a@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150719173432.16bfa3be6d110571cbc8fe2a@gmail.com> X-Operating-System: FreeBSD 9.1-PRERELEASE amd64 X-PGP-Fingerprint: 54BA 873B 6515 3F10 9E88 9322 9CB1 8F74 6D3F A396 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html X-TipJar: bitcoin:13Qmb6AeTgQecazTWph4XasEsP7nGRbAPE X-to-the-FBI-CIA-and-NSA: HI! HOW YA DOIN? can i haz chizburger? User-Agent: Mutt/1.5.21 (2010-09-15) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.7 (gold.funkthat.com [127.0.0.1]); Sun, 19 Jul 2015 09:16:51 -0700 (PDT) X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Jul 2015 16:16:55 -0000 Marc UBM via freebsd-stable wrote this message on Sun, Jul 19, 2015 at 17:34 +0200: > a few weeks ago our Highpoint Rocket Raid controller (hptrr) started > biting the dust (spurious channel resets). We bought a LSI 9201-16i > (mps) to replace it. Connected to the hptrr were 4 external e-sata > enclosures, configured in JBOD mode. Together with two disks connected > to the onboard SATA controller, this formed a geli encrypted raidz-2 > zpool. > Just now, I connected the disks to the mps controller. They show > up fine in dmesg. The problem is, when trying to attach the disks > formerly connected to the hptrr controller, geli is unable to find the > metadata on the disks and errors out with: > > "geli: Cannot read metadata from /dev/da4: Invalid argument" > > gpart show says "gpart: No such geom: da4" > > Trying to restore the geli metadata gives: > "geli: Provider size mismatch: wrong backup file?" > > Is it possible that the hptrr controller handled the disks in some > special way and it's only possible to read them there? This sounds like the drives were in raid0 mode, and not raw disk mode... You might be able to recover the disk w/ geli resize, assuming only space was added at the end, not at the begining, but I have never personally tried that myself... I'd recommend trying on a copy of the drive so you don't loose data if that is possible.. You can also try to find the old geli label w/ a command like: dd if= bs=1m iseek= count=5 | strings -n 9 -td And get current disk size using diskinfo... Something like: #diskinfo /dev/ada0 /dev/ada0 512 3000592982016 5860533168 4096 0 5814021 16 63 #dd if=/dev/ada0 iseek=$((3000592982016/1024/1024-1)) bs=1m 2>/dev/null | strings -n 6 -td | grep GEOM:: 1530880 GEOM::ELI 1531392 GEOM::LABEL You might have to go farther back than 1 MB... Good luck... -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not."