From owner-freebsd-questions@FreeBSD.ORG Fri Jan 20 19:30:33 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 655C316A41F for ; Fri, 20 Jan 2006 19:30:33 +0000 (GMT) (envelope-from rubenl@bloemgarten.demon.nl) Received: from post-22.mail.nl.demon.net (post-22.mail.nl.demon.net [194.159.73.192]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0DDE143D79 for ; Fri, 20 Jan 2006 19:30:09 +0000 (GMT) (envelope-from rubenl@bloemgarten.demon.nl) Received: from axelds.demon.nl ([83.160.138.74]:52388 helo=abubbletprpdda) by post-22.mail.nl.demon.net with esmtp (Exim 4.51) id 1F01xY-000PFq-PV; Fri, 20 Jan 2006 19:30:09 +0000 From: "Ruben Bloemgarten" To: "'Joe S'" Date: Fri, 20 Jan 2006 20:29:56 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook, Build 11.0.6353 In-Reply-To: X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1506 Thread-Index: AcYd5aDaXW33Dt+PRS2mLyE/C3QHfwADpeFwAADn/FA= Message-Id: <20060120193009.0DDE143D79@mx1.FreeBSD.org> Cc: freebsd-questions@freebsd.org Subject: RE: Can't mount existing data disk after upgrade (disklabel gone) X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: ruben@bloemgarten.demon.nl List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Jan 2006 19:30:33 -0000 Joe, If you did not touch ad4 the disklabel it should still have been there, but I presume that you have destroyed it by now. Did you make any kind of backup ? such as a dump of the filesystem ? How did you try to mount ad4s1a ? ( I am assuming you tried to mount the 'partition' and not the slice (ad4s1) or the device (ad4)). Why are you changing the offset of ad4s1a from 16 to 2097215 ? Is there another partition on there somewhere or do you just not want to use that part of your disk ? Also, you scan_ffs ad4 instead of ad4s1 which is what you should be interested in. The size differences are normal because there's a difference between ad4 ad4s1 and ad4s1a. You want to write the correct disklabel to ad4s1 and then mount ad4s1a. You're 'a' partition extends past the size of the disk (c) because a(584002180)+offset(2097215)= 586099395 > c:( 586099332) (by 63) If you can correctly replicate the exact disklabel you should be able to access your data. Otherwise, chalk it up to experience. I hope this helps. Ruben -----Original Message----- From: owner-freebsd-questions@freebsd.org [mailto:owner-freebsd-questions@freebsd.org] On Behalf Of Joe S Sent: January 20, 2006 6:18 PM To: freebsd-questions@freebsd.org Cc: Joe S Subject: Can't mount existing data disk after upgrade (disklabel gone) First of all, I have learned something VERY important about FreeBSD. SAVE your DISKLABELS! I have 2 drives in my home file server. One 80GB drive (ad0) for the OS and one 300 GB drive for my data. A few days ago, I performed a clean install of FreeBSD 6.0 on the 1st drive (ad0). After the install I tried to mount ad4, but could not. I read somewhere that I was supposed to save my disklabels. DOH! I did not do this, nor have I ever read about this in the FreeBSD handbook. After reading through the handbook and googling, I found a tool called scan_ffs that can help me recreate my disklabels by scanning my drive for partitions. Great! Here is the output of scan_ffs on ad4: root@coruscant# scan_ffs -l /dev/ad4 X: 584002180 2097215 4.2BSD 2048 16384 0 # /data Good. That is my /data partition. Its UFS2, created in FBSD 5.4. Next, I tried editing the disklabel. It starts out like this: # /dev/ad4s1: 8 partitions: # size offset fstype [fsize bsize bps/cpg] a: 586099316 16 unused 0 0 c: 586099332 0 unused 0 0 I changed it to this: # /dev/ad4s1: 8 partitions: # size offset fstype [fsize bsize bps/cpg] a: 584002180 2097215 4.2BSD 2048 16384 0 # /data c: 586099332 0 unused 0 0 But, I get this error: partition a: partition extends past end of unit re-edit the label? [y]: Here is the output of bsdlabel. Notice the different sizes: root@coruscant# bsdlabel -r ad4 # /dev/ad4: 8 partitions: # size offset fstype [fsize bsize bps/cpg] a: 586114688 16 unused 0 0 c: 586114704 0 unused 0 0 root@coruscant# bsdlabel -r ad4s1 # /dev/ad4s1: 8 partitions: # size offset fstype [fsize bsize bps/cpg] a: 586099316 16 unused 0 0 c: 586099332 0 unused 0 0 root@coruscant# root@coruscant# bsdlabel -r ad4s1a # /dev/ad4s1a: 8 partitions: # size offset fstype [fsize bsize bps/cpg] a: 586099300 16 unused 0 0 c: 586099316 0 unused 0 0 When I try to mount /dev/ad4s1a to /data, I get this error: coruscant# mount /dev/ad4s1a /mnt mount: /dev/ad4s1a on /mnt: incorrect super block How can I properly re-create the disklabel? It seems this is what I need to do in order to get to my data. Any help would be greatly appreciated. -joe PS> Here is my dmesg: Copyright (c) 1992-2005 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 6.0-SECURITY #0: Mon Dec 19 23:46:33 UTC 2005 root@builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC ACPI APIC Table: Timecounter "i8254" frequency 1193182 Hz quality 0 CPU: Intel(R) Pentium(R) 4 CPU 2.40GHz (2394.01-MHz 686-class CPU) Origin = "GenuineIntel" Id = 0xf29 Stepping = 9 Features=0xbfebfbff Features2=0x4400> real memory = 1072889856 (1023 MB) avail memory = 1040945152 (992 MB) ioapic0 irqs 0-23 on motherboard npx0: [FAST] npx0: on motherboard npx0: INT 16 interface acpi0: on motherboard acpi0: Power Button (fixed) pci_link0: irq 11 on acpi0 pci_link1: irq 3 on acpi0 pci_link2: irq 10 on acpi0 pci_link3: irq 5 on acpi0 pci_link4: irq 0 on acpi0 pci_link5: irq 0 on acpi0 pci_link6: irq 9 on acpi0 pci_link7: irq 9 on acpi0 Timecounter "ACPI-fast" frequency 3579545 Hz quality 1000 acpi_timer0: <24-bit timer at 3.579545MHz> port 0x408-0x40b on acpi0 cpu0: on acpi0 acpi_throttle0: on cpu0 pcib0: port 0xcf8-0xcff on acpi0 pci0: on pcib0 agp0: mem 0xf8000000-0xfbffffff at device 0.0 on pci0 pcib1: at device 1.0 on pci0 pci1: on pcib1 pci1: at device 0.0 (no driver attached) uhci0: port 0xcc00-0xcc1f irq 16 at device 29.0 on pci0 uhci0: [GIANT-LOCKED] usb0: on uhci0 usb0: USB revision 1.0 uhub0: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1 uhub0: 2 ports with 2 removable, self powered uhci1: port 0xd000-0xd01f irq 19 at device 29.1 on pci0 uhci1: [GIANT-LOCKED] usb1: on uhci1 usb1: USB revision 1.0 uhub1: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1 uhub1: 2 ports with 2 removable, self powered uhci2: port 0xd400-0xd41f irq 18 at device 29.2 on pci0 uhci2: [GIANT-LOCKED] usb2: on uhci2 usb2: USB revision 1.0 uhub2: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1 uhub2: 2 ports with 2 removable, self powered uhci3: port 0xd800-0xd81f irq 16 at device 29.3 on pci0 uhci3: [GIANT-LOCKED] usb3: on uhci3 usb3: USB revision 1.0 uhub3: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1 uhub3: 2 ports with 2 removable, self powered ehci0: mem 0xfebffc00-0xfebfffff irq 23 at device 29.7 on pci0 ehci0: [GIANT-LOCKED] usb4: EHCI version 1.0 usb4: companion controllers, 2 ports each: usb0 usb1 usb2 usb3 usb4: on ehci0 usb4: USB revision 2.0 uhub4: Intel EHCI root hub, class 9/0, rev 2.00/1.00, addr 1 uhub4: 8 ports with 8 removable, self powered pcib2: at device 30.0 on pci0 pci2: on pcib2 atapci0: port 0xbc00-0xbc07,0xb800-0xb803,0xb400-0xb407,0xb000-0xb003,0xac00-0xac0f mem 0xfeaf0000-0xfeafffff irq 22 at device 1.0 on pci2 ata2: on atapci0 ata3: on atapci0 ahc0: port 0xa800-0xa8ff mem 0xfeadf000-0xfeadffff irq 17 at device 2.0 on pci2 ahc0: [GIANT-LOCKED] aic7890/91: Ultra2 Wide Channel A, SCSI Id=7, 32/253 SCBs fxp0: port 0xa400-0xa43f mem 0xfeade000-0xfeadefff,0xfe900000-0xfe9fffff irq 18 at device 4.0 on pci2 miibus0: on fxp0 inphy0: on miibus0 inphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto fxp0: Ethernet address: 00:d0:b7:9f:dd:0f 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 ata1: on atapci1 atapci2: port 0xec00-0xec07,0xe800-0xe803,0xe400-0xe407,0xe000-0xe003,0xdc00-0xdc0f irq 18 at device 31.2 on pci0 atapci2: failed to enable memory mapping! ata4: on atapci2 ata5: on atapci2 pci0: at device 31.3 (no driver attached) acpi_button0: on acpi0 atkbdc0: port 0x60,0x64 irq 1 on acpi0 atkbd0: irq 1 on atkbdc0 kbd0 at atkbd0 atkbd0: [GIANT-LOCKED] sio0: configured irq 4 not in bitmap of probed irqs 0 sio0: port may not be enabled sio0: <16550A-compatible COM port> port 0x3f8-0x3ff irq 4 flags 0x10 on acpi0 sio0: type 16550A ppc0: port 0x378-0x37f irq 7 on acpi0 ppc0: Generic chipset (NIBBLE-only) in COMPATIBLE mode ppbus0: on ppc0 plip0: on ppbus0 lpt0: on ppbus0 lpt0: Interrupt-driven port ppi0: on ppbus0 pmtimer0 on isa0 orm0: at iomem 0xc0000-0xcf7ff,0xcf800-0xd7fff,0xd8000-0xd87ff,0xd8800-0xd9fff,0xda000-0xda fff on isa0 sc0: at flags 0x100 on isa0 sc0: VGA <16 virtual consoles, flags=0x300> sio1: configured irq 3 not in bitmap of probed irqs 0 sio1: port may not be enabled vga0: at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0 Timecounter "TSC" frequency 2394008600 Hz quality 800 Timecounters tick every 1.000 msec Waiting 5 seconds for SCSI devices to settle ad0: 76319MB at ata0-master UDMA100 acd0: CDROM at ata1-master UDMA33 ad4: 286188MB at ata2-master UDMA100 ad4: Promise subdisks has no flags sa0 at ahc0 bus 0 target 0 lun 0 sa0: Removable Sequential Access SCSI-2 device sa0: 20.000MB/s transfers (10.000MHz, offset 15, 16bit) Trying to mount root from ufs:/dev/ad0s1a _______________________________________________ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org" -- No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.1.371 / Virus Database: 267.14.18/230 - Release Date: 01/14/2006 -- No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.1.371 / Virus Database: 267.14.18/230 - Release Date: 01/14/2006