From owner-freebsd-current@FreeBSD.ORG Wed Oct 6 19:54:42 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0CD0B16A4CE for ; Wed, 6 Oct 2004 19:54:42 +0000 (GMT) Received: from zibbi.icomtek.csir.co.za (zibbi.icomtek.csir.co.za [146.64.24.58]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4C60C43D1D for ; Wed, 6 Oct 2004 19:54:33 +0000 (GMT) (envelope-from jhay@icomtek.csir.co.za) Received: from zibbi.icomtek.csir.co.za (localhost [127.0.0.1]) i96JsSZV009484 for ; Wed, 6 Oct 2004 21:54:28 +0200 (SAST) (envelope-from jhay@zibbi.icomtek.csir.co.za) Received: (from jhay@localhost) by zibbi.icomtek.csir.co.za (8.12.10/8.12.10/Submit) id i96JsSUj009483 for freebsd-current@freebsd.org; Wed, 6 Oct 2004 21:54:28 +0200 (SAST) (envelope-from jhay) Date: Wed, 6 Oct 2004 21:54:28 +0200 From: John Hay To: freebsd-current@freebsd.org Message-ID: <20041006195428.GA8886@zibbi.icomtek.csir.co.za> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.1i Subject: geom mirror problem X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Oct 2004 19:54:42 -0000 Hi, I have been trying to setup a geom mirror on this machine but each time I reboot geom gives an error and only use one disk. Anybody know where I should look? I have two other machines that work properly. :-/ Anyway here are some more detail. I'm running the latest RELENG_5 with Pawel's with g_mirror.c v 1.34 and 1.35 from current applied. After syncing and rebooting I see these messages: ##################################################### ad0: 114473MB [232581/16/63] at ata0-master UDMA100 ad2: 114473MB [232581/16/63] at ata1-master UDMA100 GEOM_MIRROR: Device gm0 created (id=861616013). GEOM_MIRROR: Device gm0: provider ad0 detected. GEOM_MIRROR: Device gm0: provider ad2 detected. GEOM_MIRROR: Device gm0: provider ad2 activated. GEOM_MIRROR: Cannot update metadata on disk ad0 (error=1). GEOM_MIRROR: Device gm0: provider ad0 activated. GEOM_MIRROR: Device gm0: provider mirror/gm0 launched. GEOM_MIRROR: Cannot update metadata on disk ad0 (error=1). GEOM_MIRROR: Device gm0: provider ad0 disconnected. Mounting root from ufs:/dev/mirror/gm0s1a ##################################################### What is error=1 and how can I find out why it happens? A sysctl -b kern.geom.conftxt lookslike this: ##################################################### 0 DISK ad2 120034123776 512 hd 16 sc 63 1 MIRROR mirror/gm0 120034123264 512 2 MBR mirror/gm0s1 120031478784 512 i 0 o 32256 ty 165 3 BSD mirror/gm0s1f 118984074240 512 i 5 o 1047404544 ty 7 3 BSD mirror/gm0s1e 268435456 512 i 4 o 778969088 ty 7 3 BSD mirror/gm0s1d 268435456 512 i 3 o 510533632 ty 7 3 BSD mirror/gm0s1c 120031478784 512 i 2 o 0 ty 0 3 BSD mirror/gm0s1b 242098176 512 i 1 o 268435456 ty 1 3 BSD mirror/gm0s1a 268435456 512 i 0 o 0 ty 7 0 DISK ad0 120034123776 512 hd 16 sc 63 1 MBR ad0s1 120031478784 512 i 0 o 32256 ty 165 2 BSD ad0s1f 118984074240 512 i 5 o 1047404544 ty 7 2 BSD ad0s1e 268435456 512 i 4 o 778969088 ty 7 2 BSD ad0s1d 268435456 512 i 3 o 510533632 ty 7 2 BSD ad0s1c 120031478784 512 i 2 o 0 ty 0 2 BSD ad0s1b 242098176 512 i 1 o 268435456 ty 1 2 BSD ad0s1a 268435456 512 i 0 o 0 ty 7 ##################################################### And gmirror list looks like this: ##################################################### Geom name: gm0 State: DEGRADED Components: 2 Balance: split Slice: 4096 Flags: NONE SyncID: 11 ID: 861616013 Providers: 1. Name: mirror/gm0 Mediasize: 120034123264 (112G) Sectorsize: 512 Mode: r5w5e2 Consumers: 1. Name: ad2 Mediasize: 120034123776 (112G) Sectorsize: 512 Mode: r5w5e3 State: ACTIVE Priority: 0 Flags: DIRTY, HARDCODED SyncID: 11 ID: 3011562079 Geom name: gm0.sync ##################################################### If I do a "gmirror activate -v gm0 ad0" it is activated and starts synchronising and to my eye everything looks ok, but if I wait until it finish syncing and then reboots, the same thing happens. This is with and without Pawel's patch. I have also tried his other patch that waits vfs_mountroot(), but that didn't make a difference. After the activate command, sysctl -b kern.geom.conftxt looks like this: ##################################################### 0 DISK ad2 120034123776 512 hd 16 sc 63 1 MIRROR mirror/gm0 120034123264 512 2 MBR mirror/gm0s1 120031478784 512 i 0 o 32256 ty 165 3 BSD mirror/gm0s1f 118984074240 512 i 5 o 1047404544 ty 7 3 BSD mirror/gm0s1e 268435456 512 i 4 o 778969088 ty 7 3 BSD mirror/gm0s1d 268435456 512 i 3 o 510533632 ty 7 3 BSD mirror/gm0s1c 120031478784 512 i 2 o 0 ty 0 3 BSD mirror/gm0s1b 242098176 512 i 1 o 268435456 ty 1 3 BSD mirror/gm0s1a 268435456 512 i 0 o 0 ty 7 0 DISK ad0 120034123776 512 hd 16 sc 63 1 MIRROR mirror/gm0 120034123264 512 2 MBR mirror/gm0s1 120031478784 512 i 0 o 32256 ty 165 3 BSD mirror/gm0s1f 118984074240 512 i 5 o 1047404544 ty 7 3 BSD mirror/gm0s1e 268435456 512 i 4 o 778969088 ty 7 3 BSD mirror/gm0s1d 268435456 512 i 3 o 510533632 ty 7 3 BSD mirror/gm0s1c 120031478784 512 i 2 o 0 ty 0 3 BSD mirror/gm0s1b 242098176 512 i 1 o 268435456 ty 1 3 BSD mirror/gm0s1a 268435456 512 i 0 o 0 ty 7 ##################################################### And gmirror list looks like this: ##################################################### Geom name: gm0 State: DEGRADED Components: 2 Balance: split Slice: 4096 Flags: NONE SyncID: 11 ID: 861616013 Providers: 1. Name: mirror/gm0 Mediasize: 120034123264 (112G) Sectorsize: 512 Mode: r6w5e2 Consumers: 1. Name: ad2 Mediasize: 120034123776 (112G) Sectorsize: 512 Mode: r6w5e3 State: ACTIVE Priority: 0 Flags: DIRTY, HARDCODED SyncID: 11 ID: 3011562079 2. Name: ad0 Mediasize: 120034123776 (112G) Sectorsize: 512 Mode: r0w1e1 State: SYNCHRONIZING Priority: 0 Flags: DIRTY, HARDCODED, SYNCHRONIZING SyncID: 11 Synchronized: 4% ID: 460446288 Geom name: gm0.sync Consumers: 1. Name: mirror/gm0 Mediasize: 120034123264 (112G) Sectorsize: 512 Mode: r1w0e0 ##################################################### John -- John Hay -- John.Hay@icomtek.csir.co.za / jhay@FreeBSD.org