From owner-freebsd-geom@FreeBSD.ORG Sun Oct 17 03:29:00 2010 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 65A401065673 for ; Sun, 17 Oct 2010 03:29:00 +0000 (UTC) (envelope-from perryh@pluto.rain.com) Received: from agora.rdrop.com (agora.rdrop.com [199.26.172.34]) by mx1.freebsd.org (Postfix) with ESMTP id 49CB18FC1D for ; Sun, 17 Oct 2010 03:29:00 +0000 (UTC) Received: from agora.rdrop.com (66@localhost [127.0.0.1]) by agora.rdrop.com (8.13.1/8.12.7) with ESMTP id o9H3D6sY006641 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Sat, 16 Oct 2010 20:13:09 -0700 (PDT) (envelope-from perryh@pluto.rain.com) Received: (from uucp@localhost) by agora.rdrop.com (8.13.1/8.12.9/Submit) with UUCP id o9H3D61Y006640 for freebsd-geom@freebsd.org; Sat, 16 Oct 2010 20:13:06 -0700 (PDT) Received: from fbsd61 by pluto.rain.com (4.1/SMI-4.1-pluto-M2060407) id AA07236; Sat, 16 Oct 10 20:02:14 PDT Date: Sat, 16 Oct 2010 20:01:56 -0700 From: perryh@pluto.rain.com To: freebsd-geom@freebsd.org Message-Id: <4cba6724.semecSgu9uAdne2O%perryh@pluto.rain.com> User-Agent: nail 11.25 7/29/05 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Subject: Subdividing a gmirror X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Oct 2010 03:29:00 -0000 How does one go about subdividing a gmirror? Using the 8.1 memstick distribution, I've created a gmirror (which currently contains only one provider -- the other is to be added later), and Fixit can see /dev/mirror/gm0* once I've executed "gmirror load", but neither gpart nor fdisk seems to recognize gm0 as something on which it can operate. bsdlabel sees _something_, but it appears not to be valid. The following is a script(1) starting when I first boot into Fixit# from the memstick. I've inserted a blank line ahead of each command to simplify skipping over output that may not be relevant, and I've inserted some commentary (lines starting with !). The disk already contains the gmirror metadata (created during a previous attempt). Script started on Mon Oct 4 03:42:54 2010 Fixit# dmesg Copyright (c) 1992-2010 The FreeBSD Project. Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California. All rights reserved. FreeBSD is a registered trademark of The FreeBSD Foundation. FreeBSD 8.1-RELEASE #0: Mon Jul 19 02:55:53 UTC 2010 root@almeida.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC i386 Timecounter "i8254" frequency 1193182 Hz quality 0 CPU: Intel Pentium III (731.47-MHz 686-class CPU) Origin = "GenuineIntel" Id = 0x683 Family = 6 Model = 8 Stepping = 3 Features=0x383fbff real memory = 536870912 (512 MB) avail memory = 506056704 (482 MB) ACPI APIC Table: ioapic0: Changing APIC ID to 1 ioapic0 irqs 0-23 on motherboard kbd1 at kbdmux0 acpi0: on motherboard acpi0: [ITHREAD] acpi0: Power Button (fixed) acpi0: reservation of 0, a0000 (3) failed acpi0: reservation of 100000, f00000 (3) failed acpi0: reservation of 1000000, 1ef9e000 (3) failed Timecounter "ACPI-fast" frequency 3579545 Hz quality 1000 acpi_timer0: <24-bit timer at 3.579545MHz> port 0x808-0x80b on acpi0 cpu0: on acpi0 pcib0: port 0xcf8-0xcff on acpi0 pci0: on pcib0 agp0: on hostb0 pcib1: at device 1.0 on pci0 pci1: on pcib1 vgapci0: mem 0xf4000000-0xf5ffffff,0xfcffc000-0xfcffffff,0xfc000000-0xfc7fffff irq 16 at device 0.0 on pci1 pcib2: at device 30.0 on pci0 pci2: on pcib2 xl0: <3Com 3c905C-TX Fast Etherlink XL> port 0xdc80-0xdcff mem 0xf8fffc00-0xf8fffc7f irq 16 at device 4.0 on pci2 miibus0: on xl0 xlphy0: <3c905C 10/100 internal PHY> PHY 24 on miibus0 xlphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto xl0: Ethernet address: 00:b0:d0:22:5a:14 xl0: [ITHREAD] pci2: at device 6.0 (no driver attached) atapci0: port 0xdc70-0xdc7f,0xdc50-0xdc5f,0xdc30-0xdc3f,0xdc10-0xdc1f,0xd8e0-0xd8ff,0xd400-0xd4ff irq 19 at device 11.0 on pci2 atapci0: [ITHREAD] ata2: on atapci0 ata2: [ITHREAD] ata3: on atapci0 ata3: [ITHREAD] ata4: on atapci0 ata4: [ITHREAD] pcib3: at device 14.0 on pci2 pci3: on pcib3 ahc0: port 0xec00-0xecff mem 0xfafff000-0xfaffffff irq 18 at device 10.0 on pci3 ahc0: [ITHREAD] aic7899: Ultra160 Wide Channel A, SCSI Id=7, 32/253 SCBs ahc1: port 0xe800-0xe8ff mem 0xfaffe000-0xfaffefff irq 19 at device 10.1 on pci3 ahc1: [ITHREAD] aic7899: Ultra160 Wide Channel B, SCSI Id=7, 32/253 SCBs isab0: at device 31.0 on pci0 isa0: on isab0 atapci1: port 0x1f0-0x1f7,0x3f6,0x170-0x177,0x376,0xffa0-0xffaf at device 31.1 on pci0 ata0: on atapci1 ata0: [ITHREAD] ata1: on atapci1 ata1: [ITHREAD] uhci0: port 0xff80-0xff9f irq 19 at device 31.2 on pci0 uhci0: [ITHREAD] uhci0: LegSup = 0x2f00 usbus0: on uhci0 pci0: at device 31.3 (no driver attached) atrtc0: port 0x70-0x7f irq 8 on acpi0 fdc0: port 0x3f0-0x3f5,0x3f7 irq 6 drq 2 on acpi0 fdc0: [FILTER] fd0: <1440-KB 3.5" drive> on fdc0 drive 0 atkbdc0: port 0x60,0x64 irq 1 on acpi0 atkbd0: irq 1 on atkbdc0 kbd0 at atkbd0 atkbd0: [GIANT-LOCKED] atkbd0: [ITHREAD] psm0: irq 12 on atkbdc0 psm0: [GIANT-LOCKED] psm0: [ITHREAD] psm0: model Generic PS/2 mouse, device ID 0 uart0: <16550 or compatible> port 0x3f8-0x3ff irq 4 flags 0x10 on acpi0 uart0: [FILTER] uart1: <16550 or compatible> port 0x2f8-0x2ff irq 3 on acpi0 uart1: [FILTER] ppc0: port 0x378-0x37f,0x778-0x77f irq 7 on acpi0 ppc0: SMC-like chipset (ECP/EPP/PS2/NIBBLE) in COMPATIBLE mode ppc0: FIFO with 16/16/8 bytes threshold ppc0: [ITHREAD] ppbus0: on ppc0 plip0: on ppbus0 plip0: [ITHREAD] lpt0: on ppbus0 lpt0: [ITHREAD] lpt0: Interrupt-driven port ppi0: on ppbus0 pmtimer0 on isa0 orm0: at iomem 0xc0000-0xc7fff,0xc8000-0xcdfff,0xce000-0xcffff pnpid ORM0000 on isa0 sc0: at flags 0x100 on isa0 sc0: VGA <16 virtual consoles, flags=0x300> vga0: at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0 Timecounter "TSC" frequency 731469967 Hz quality 800 Timecounters tick every 1.000 msec md0: Preloaded image 4423680 bytes at 0xc0fb5504 usbus0: 12Mbps Full Speed USB v1.0 ad0: 305245MB at ata0-master UDMA66 ugen0.1: at usbus0 uhub0: on usbus0 ad1: 32253MB at ata0-slave UDMA66 uhub0: 2 ports with 2 removable, self powered device_attach: afd0 attach returned 6 ugen0.2: at usbus0 umass0: on usbus0 umass0: SCSI over Bulk-Only; quirks = 0x0000 acd0: CDROM at ata1-slave PIO4 ad4: 61136MB at ata2-master UDMA100 SATA 1.5Gb/s acd1: DVDR at ata3-master UDMA66 SATA 1.5Gb/s ad8: 305245MB at ata4-master UDMA133 umass0:2:0:-1: Attached to scbus2 da0 at ahc0 bus 0 scbus0 target 0 lun 0 da0: Fixed Direct Access SCSI-3 device da0: 160.000MB/s transfers (80.000MHz DT, offset 127, 16bit) da0: Command Queueing enabled da0: 8683MB (17783249 512 byte sectors: 255H 63S/T 1106C) da1 at umass-sim0 bus 0 scbus2 target 0 lun 0 da1: Removable Direct Access SCSI-2 device da1: 1.000MB/s transfers da1: 960MB (1967616 512 byte sectors: 64H 32S/T 960C) GEOM: ad0s2: geometry does not match label (255h,63s != 16h,63s). GEOM: ad8s2: geometry does not match label (255h,63s != 16h,63s). GEOM: da1: geometry does not match label (255h,63s != 64h,32s). GEOM: da1: media size does not match label. Trying to mount root from ufs:/dev/md0 ! make *.ko available Fixit# ln -s /dist/boot/kernel /boot Fixit# gmirror load ! see what "gmirror load" appended to dmesg. I know from watching ! the console that it was only 3 lines, so "tail -5" will provide ! 2 lines of overlap with the previous listing. Fixit# dmesg | tail -5 GEOM: da1: geometry does not match label (255h,63s != 64h,32s). GEOM: da1: media size does not match label. Trying to mount root from ufs:/dev/md0 GEOM_MIRROR: Device mirror/gm0 launched (1/1). GEOM_MIRROR: Cannot add disk ad0s2a to gm0 (error=17). Fixit# ls -la /dev/mirror total 1 dr-xr-xr-x 2 root 0 512 Oct 4 03:44 . dr-xr-xr-x 9 root 0 512 Oct 4 03:42 .. crw-r----- 1 root operator 0, 80 Oct 4 03:43 gm0 crw-r----- 1 root operator 0, 125 Oct 4 03:43 gm0a crw-r----- 1 root operator 0, 126 Oct 4 03:43 gm0b ! so the mirror does exist, despite the "Cannot add" message. Fixit# bsdlabel /dev/mirror/gm0 # /dev/mirror/gm0: 8 partitions: # size offset fstype [fsize bsize bps/cpg] a: 619907518 0 4.2BSD 0 0 0 b: 2097152 619907518 swap c: 622004670 0 unused 0 0 # "raw" part, don't edit partition a: partition extends past end of unit partition b: offset past end of unit partition b: partition extends past end of unit partition c: partition extends past end of unit bsdlabel: partition c doesn't cover the whole unit! bsdlabel: An incorrect partition c may cause problems for standard system utilities ! evidently gm0 does not contain a _valid_ bsdlabel. ! Again, with -A, just in case the additional info is useful. Fixit# bsdlabel -A /dev/mirror/gm0 # /dev/mirror/gm0: type: ESDI disk: ad0s2 label: flags: bytes/sector: 512 sectors/track: 63 tracks/cylinder: 255 sectors/cylinder: 16065 cylinders: 38913 sectors/unit: 625142448 rpm: 3600 interleave: 1 trackskew: 0 cylinderskew: 0 headswitch: 0 # milliseconds track-to-track seek: 0 # milliseconds drivedata: 0 8 partitions: # size offset fstype [fsize bsize bps/cpg] a: 619907518 0 4.2BSD 0 0 0 b: 2097152 619907518 swap c: 622004670 0 unused 0 0 # "raw" part, don't edit bsdlabel: partition c doesn't cover the whole unit! bsdlabel: An incorrect partition c may cause problems for standard system utilities !note that this time there were no complaints about partitions a & b. !dunno if this is of any significance. Fixit# gpart show gm0 gpart: No such geom: gm0. Fixit# gpart show /dev/mirror/gm0 gpart: No such geom: /dev/mirror/gm0. ! So gm0 evidently doesn't have a valid gpart label either. ! What is defining gm0a and gm0b, if it is neither a gpart nor a bsdlabel? ! Try to reslice & label gm0, which "should" appear to be a disk device Fixit# fdisk -v -B -I /dev/mirror/gm0 ******* Working on device /dev/mirror/gm0 ******* parameters extracted from in-core disklabel are: cylinders=38587 heads=255 sectors/track=63 (16065 blks/cyl) Figures below won't work with BIOS for partitions not in cyl 1 parameters to be used for BIOS calculations are: cylinders=38587 heads=255 sectors/track=63 (16065 blks/cyl) Information from DOS bootblock is: 1: sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD) start 63, size 619900092 (302685 Meg), flag 80 (active) beg: cyl 0/ head 1/ sector 1; end: cyl 698/ head 254/ sector 63 2: 3: 4: fdisk: Class not found ! What does this mean? Fixit# ls -la /dev/mirror total 1 dr-xr-xr-x 2 root 0 512 Oct 4 03:44 . dr-xr-xr-x 9 root 0 512 Oct 4 03:42 .. crw-r----- 1 root operator 0, 80 Oct 4 03:46 gm0 crw-r----- 1 root operator 0, 125 Oct 4 03:46 gm0a crw-r----- 1 root operator 0, 126 Oct 4 03:46 gm0b ! The partitioning seems unchanged, but apparently something was ! written (since the timestamps have changed). No telling what it ! may have been. Fixit# ^D Script done on Mon Oct 4 03:48:31 2010