From owner-freebsd-questions@FreeBSD.ORG Fri Jan 20 17:18:13 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 C5B0C16A41F for ; Fri, 20 Jan 2006 17:18:13 +0000 (GMT) (envelope-from js.lists@gmail.com) Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.192]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4067043D45 for ; Fri, 20 Jan 2006 17:18:13 +0000 (GMT) (envelope-from js.lists@gmail.com) Received: by wproxy.gmail.com with SMTP id i31so505976wra for ; Fri, 20 Jan 2006 09:18:12 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:user-agent:mime-version:to:cc:subject:content-type:content-transfer-encoding; b=mDWslaVNOST/4BQCd1khdQ9PmKeXNkDocxZo+4D6N1NEAynkNW8X6+QJfJqPlCmLmZz8tgbIAkzg3d8lQuGjS4QaR/mf5gdAILTKeTOSzG/Xnh2tQRNCGfpbGiNkE/1pgAKcRpPh99X+odj34w1lWu2R3mm2mtbng+H3WBKq7CU= Received: by 10.64.83.9 with SMTP id g9mr163629qbb; Fri, 20 Jan 2006 09:18:12 -0800 (PST) Received: from ?10.100.58.33? ( [204.176.49.46]) by mx.gmail.com with ESMTP id a29sm415974qbd.2006.01.20.09.18.11; Fri, 20 Jan 2006 09:18:11 -0800 (PST) Message-ID: <43D11B4F.90806@gmail.com> Date: Fri, 20 Jan 2006 09:18:07 -0800 From: Joe S User-Agent: Thunderbird 1.5 (Windows/20051201) MIME-Version: 1.0 To: freebsd-questions@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Joe S Subject: Can't mount existing data disk after upgrade (disklabel gone) X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Jan 2006 17:18:13 -0000 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-0xdafff 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