From owner-freebsd-stable@FreeBSD.ORG Sun Jun 2 22:07:48 2013 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 6C815E4E for ; Sun, 2 Jun 2013 22:07:48 +0000 (UTC) (envelope-from haramrae@gmail.com) Received: from mail-wi0-x231.google.com (mail-wi0-x231.google.com [IPv6:2a00:1450:400c:c05::231]) by mx1.freebsd.org (Postfix) with ESMTP id 009671A99 for ; Sun, 2 Jun 2013 22:07:47 +0000 (UTC) Received: by mail-wi0-f177.google.com with SMTP id hr14so2116392wib.16 for ; Sun, 02 Jun 2013 15:07:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to:x-mailer; bh=HocGMVos9QL7+7BGdzQcGdhIJ1/fEVE4Gqe3Hriv/7Y=; b=rYmI1A065C6QV38SDTgBiV8pFyvOKro8mrNySNMnxYWW7gfz6XXeHbsbPy6QvD3eRm KpM1M661beTDsmX5ch77R/ghVZSGPfk+HJ7wZRAatOevLn38UGaj57wU681JMBsjgYcf HqPWTwLP6Ra39J/il0lgHn/piBo/mYn0eaBrQHPWgHkjuIn25xYAQ/ssgeoh1Y5Uvzzu TvhSR2Xk1dxhu4sFGfd/+YWpGdX1s20GF7d+wpShaaeyTzIcIA25ZePeJuGcQmh0SHOa 38AAwg3CJgxC+YKf7ddFMNYCM/IFbuZhUMjV9Xur6vvHu7rjxRURWmIeGOUqUFob7HY9 g8qA== X-Received: by 10.180.198.140 with SMTP id jc12mr10029651wic.53.1370210867194; Sun, 02 Jun 2013 15:07:47 -0700 (PDT) Received: from hollewijn.internal (8d690a59.ftth.concepts.nl. [141.105.10.89]) by mx.google.com with ESMTPSA id q20sm19495120wiv.7.2013.06.02.15.07.45 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 02 Jun 2013 15:07:46 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 6.3 \(1503\)) Subject: Re: Corrupt GPT header on disk from twa array - fixable? From: Alban Hertroys In-Reply-To: <20130602154832.GA23072@icarus.home.lan> Date: Mon, 3 Jun 2013 00:07:44 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: <17D7EC66-768B-462F-97DC-2550FDE1AB59@gmail.com> References: <7ABBEE71A96E411793E41BD97DA72BCE@multiplay.co.uk> <2943982C-719E-45D0-9B26-43B725738F83@gmail.com> <3659A498-F0EA-4AF3-80EA-40038DCA9CC7@gmail.com> <20130602154832.GA23072@icarus.home.lan> To: Jeremy Chadwick X-Mailer: Apple Mail (2.1503) Cc: Warren Block , Kimmo Paasiala , freebsd-stable@freebsd.org X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.14 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, 02 Jun 2013 22:07:48 -0000 On Jun 2, 2013, at 17:48, Jeremy Chadwick wrote: > On Sun, Jun 02, 2013 at 05:12:48PM +0200, Alban Hertroys wrote: >>=20 >> On Jun 2, 2013, at 16:46, Warren Block wrote: >>=20 >>> On Sun, 2 Jun 2013, Alban Hertroys wrote: >>>=20 >>>> On Jun 2, 2013, at 16:12, Kimmo Paasiala = wrote: >>>>>=20 >>>>> Looking at the gpart(8) output it seems that only 20GBs of the = disk is >>>>> recognized by the disk driver but the GPT table still shows the = full >>>>> capacity 910GB. I'd say that the GPT table is in fact correct and = if >>>>> you can somehow get the disks to be recognized with full capacity = they >>>>> should be usable as they are. What does dmesg(8) say about the = disks? >>>>=20 >>>> =46rom dmesg: >>>>=20 >>>> ada2 at ahcich2 bus 0 scbus2 target 0 lun 0 >>>> ada2: usb_alloc_device: set address 2 failed (USB_ERR_IOERROR, = ignored) >>>> ATA-8 SATA 2.x device >>>> usbd_setup_device_desc: getting device descriptor at addr 2 failed, = USB_ERR_IOERROR >>>> ada2: 300.000MB/s transfers (SATA 2.x, UDMA6, PIO 8192bytes) >>>> ada2: Command Queueing enabled >>>> ada2: 476940MB (976773168 512 byte sectors: 16H 63S/T 16383C) >>>> ada2: Previously was known as ad8 >>>> ada3 at ahcich3 bus 0 scbus3 target 0 lun 0 >>>> ada3: ATA-8 SATA 2.x device >>>> ada3: 300.000MB/s transfers (SATA 2.x, UDMA6, PIO 8192bytes) >>>> ada3: Command Queueing enabled >>>> ada3: 476940MB (976773168 512 byte sectors: 16H 63S/T 16383C) >>>> ada3: Previously was known as ad10 >>>> ada4 at ahcich4 bus 0 scbus4 target 0 lun 0 >>>> ada4: ATA-8 SATA 2.x device >>>> usbd_req_re_enumerate: addr=3D2, set address failed! = (USB_ERR_IOERROR, ignored) >>>> ada4: 300.000MB/s transfers (SATA 2.x, usbd_setup_device_desc: = getting device descriptor at addr 2 failed, USB_ERR_IOERROR >>>> UDMA6, PIO 8192bytes) >>>> ada4: Command Queueing enabled >>>> ada4: 953869MB (1953525168 512 byte sectors: 16H 63S/T 16383C) >>>> ada4: Previously was known as ad12 >>>> ada5 at ahcich5 bus 0 scbus5 target 0 lun 0 >>>> ada5: ATA-8 SATA 3.x device >>>> ada5: 600.000MB/s transfers (SATA 3.x, UDMA6, PIO 8192bytes) >>>> ada5: Command Queueing enabled >>>> ada5: 953869MB (1953525168 512 byte sectors: 16H 63S/T 16383C) >>>> ada5: Previously was known as ad14 >>>> SMP: AP CPU #1 Launched! >>>> Timecounter "TSC-low" frequency 13371081 Hz quality 800 >>>> GEOM: ada2: the secondary GPT header is not in the last LBA. >>>> GEOM: ada3: the secondary GPT header is not in the last LBA. >>>> GEOM_MIRROR: Device mirror/boot launched (2/2). >>>> GEOM_MIRROR: Device mirror/swap launched (2/2). >>>> GEOM_MIRROR: Device mirror/root launched (2/2). >>>> GEOM: ada4: the secondary GPT header is not in the last LBA. >>>> GEOM: ada5: the secondary GPT header is not in the last LBA. >>>=20 > I think you're missing what Warren is telling you, because you have > multiple things going on/complexities to deal with simultaneously. >=20 > You haven't provided any details about your gmirror setup either. All > we know at this point: >=20 >>>> GEOM_MIRROR: Device mirror/boot launched (2/2). >>>> GEOM_MIRROR: Device mirror/swap launched (2/2). >>>> GEOM_MIRROR: Device mirror/root launched (2/2). >=20 > My gut feeling is ada2 and ada3 make up the mirror, and the mirror is = at > the disk level (ada2 and ada3). I'm basing this on past evidence > presented in the thread, and having to make assumptions. No "gmirror > status" output =3D we have to make assumptions. The gmirror is actually on ada0+ada1, and not at all on the disks that I = copied the dmesg information of. Those disks weren't in the hardware = RAID array of the old server, and the gmirror isn't on the disks that = were in that RAID controller. I took care to keep those separate until I = can erase them and add them as "normal" disks. > Now, what Warren is telling you: gmirror + GPT do not play well > together. This is a design flaw** on the part of gmirror. If you = want > to use gmirror with disks using GPT, your only solutions are to mirror > the partitions (adaXpX) and not the disk (adaX), which has its own set > of caveats, or to use the MBR scheme (and if these are 4K sectors = disks, > or you plan on using those, you're even more screwed). I didn't know that, but just incidentally mirrored my partitions on ada0 = and ada1 instead of the entire disks. For the sake of removing the = confusion from this thread: # gmirror status Name Status Components mirror/boot COMPLETE ada0p1 (ACTIVE) ada1p1 (ACTIVE) mirror/swap COMPLETE ada0p2 (ACTIVE) ada1p2 (ACTIVE) mirror/root COMPLETE ada0p3 (ACTIVE) ada1p3 (ACTIVE) > The errors you see on ada4 and ada5 about the backup GPT header can be > dealt with in a different manner. >=20 > But for (again, assuming) ada2 and ada3, you will see GPT "backup = header > corruption" messages indefinitely because of the above flaw. I think that those messages actually stem from the same issue as I'm = having with the (hardware-)RAID volumes on ada4 and ada5: Apparently the = RAID controller reserved some space at the end of those volumes to store = information about the volume layout, very similar to how geom does that. The geom labels that I put on the partitions inside those volumes are = therefore not in the last sector of the disk, but they were in the last = sector of each volume while the disks were still attached to the = controller. Those messages on ada2 & 3 don't really bother me. I can read what's on = those disks the way they are (unlike the second volume on disks ada4 & = 5). Once I'm confident that I don't need anything that's on them = anymore, they'll be repartitioned and the problem will be gone. Alban Hertroys -- If you can't see the forest for the trees, cut the trees and you'll find there is no forest.