From owner-freebsd-geom@FreeBSD.ORG Tue Oct 31 20:00:14 2006 Return-Path: X-Original-To: freebsd-geom@freebsd.org Delivered-To: freebsd-geom@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 04FC316A40F for ; Tue, 31 Oct 2006 20:00:13 +0000 (UTC) (envelope-from rick@kiwi-computer.com) Received: from kiwi-computer.com (megan.kiwi-computer.com [63.224.10.3]) by mx1.FreeBSD.org (Postfix) with SMTP id 32B1743D76 for ; Tue, 31 Oct 2006 20:00:02 +0000 (GMT) (envelope-from rick@kiwi-computer.com) Received: (qmail 55773 invoked by uid 2001); 31 Oct 2006 20:00:02 -0000 Date: Tue, 31 Oct 2006 14:00:02 -0600 From: "Rick C. Petty" To: freebsd-geom@freebsd.org Message-ID: <20061031200002.GA55693@keira.kiwi-computer.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.1i Subject: burnt again by gmirror X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: rick-freebsd@kiwi-computer.com List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Oct 2006 20:00:14 -0000 [please ignore any duplicate message-- it was sent from wrong email] A few days ago, one of my machines rebooted (6.2-PRERELEASE). It's using gmirror, two SATA disks of equal model/size: ad4 & ad8. Today I noticed ad4 was loaded and ad8 said 0% (using systat). I tried: # gmirror status Name Status Components mirror/gm0 DEGRADED ad4 # gmirror list Geom name: gm0 State: DEGRADED Components: 2 Balance: round-robin Slice: 4096 Flags: NONE GenID: 1 SyncID: 4 ID: 793566958 Providers: 1. Name: mirror/gm0 Mediasize: 320072932864 (298G) Sectorsize: 512 Mode: r7w6e8 Consumers: 1. Name: ad4 Mediasize: 320072933376 (298G) Sectorsize: 512 Mode: r1w1e1 State: ACTIVE Priority: 0 Flags: DIRTY GenID: 1 SyncID: 4 ID: 3554825454 and noticed ad8 is not listed. Wonderful. A quick check that ad8 is indeed present: # atacontrol list ATA channel 0: Master: no device present Slave: no device present ATA channel 1: Master: acd0 <16X8 DVD DUAL/A070> ATA/ATAPI revision 5 Slave: no device present ATA channel 2: Master: ad4 Serial ATA II Slave: no device present ATA channel 3: Master: no device present Slave: no device present ATA channel 4: Master: ad8 Serial ATA II Slave: no device present ATA channel 5: Master: no device present Slave: no device present # atacontrol reinit ata4 Master: ad8 Serial ATA II Slave: no device present As expected, but reiniting the channel doesn't attach ad8 to the mirror, because the disk is already there. So I tried detach/attach of ata4 and noticed this in dmesg: kernel: subdisk8: detached kernel: ad8: detached kernel: ad8: 305245MB at ata4-master SATA300 GEOM_MIRROR: Component ad8 (device gm0) broken, skipping. GEOM_MIRROR: Cannot add disk ad8 to gm0 (error=22). I tried a few more things: # gmirror rebuild gm0 ad8 No such provider: ad8. # gmirror insert gm0 ad8 Not all disks connected. # gmirror activate gm0 ad8 (in dmesg, the same GEOM_MIRROR errors showed up). What is going on here? This was working just fine until my last reboot. /var/run/dmesg.boot was empty, presumably because the msg buffer overran itself. The error messages are misleading (assuming they are even remotely correct) and quite unhelpful. Why didn't gmirror pick up the ad8 provider on startup? Why does it think there's another, unconnected disk (which makes sense) but doesn't allow it to be re-attached? Is there any way to have gmirror consume the ad8 provider? -- Rick C. Petty