Re: Can't mount existing data disk after upgrade (disklabel gone)
Joe S wrote: 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: [EMAIL PROTECTED] 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 offsetfstype [fsize bsize bps/cpg] a: 586099316 16unused0 0 c: 5860993320unused0 0 I changed it to this: # /dev/ad4s1: 8 partitions: #size offsetfstype [fsize bsize bps/cpg] a: 584002180 2097215 4.2BSD 2048 16384 0 # /data c: 5860993320unused0 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: [EMAIL PROTECTED] bsdlabel -r ad4 # /dev/ad4: 8 partitions: #size offsetfstype [fsize bsize bps/cpg] a: 586114688 16unused0 0 c: 5861147040unused0 0 [EMAIL PROTECTED] bsdlabel -r ad4s1 # /dev/ad4s1: 8 partitions: #size offsetfstype [fsize bsize bps/cpg] a: 586099316 16unused0 0 c: 5860993320unused0 0 [EMAIL PROTECTED] [EMAIL PROTECTED] bsdlabel -r ad4s1a # /dev/ad4s1a: 8 partitions: #size offsetfstype [fsize bsize bps/cpg] a: 586099300 16unused0 0 c: 5860993160unused0 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 [EMAIL PROTECTED]:/usr/obj/usr/src/sys/GENERIC ACPI APIC Table: INTEL D865PERL 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=0xbfebfbffFPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,DTS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE Features2=0x4400CNTX-ID,b14 real memory = 1072889856 (1023 MB) avail memory = 1040945152 (992 MB) ioapic0 Version 2.0 irqs 0-23 on motherboard npx0: [FAST] npx0: math processor on motherboard npx0: INT 16 interface acpi0: INTEL D865PERL on motherboard acpi0: Power Button (fixed) pci_link0: ACPI PCI Link LNKA irq 11 on acpi0 pci_link1: ACPI PCI Link LNKB irq 3 on acpi0 pci_link2: ACPI PCI Link LNKC irq 10 on acpi0 pci_link3: ACPI PCI Link LNKD irq 5 on acpi0 pci_link4: ACPI PCI Link LNKE irq 0 on acpi0 pci_link5: ACPI PCI Link LNKF irq 0 on acpi0 pci_link6: ACPI PCI Link LNKG irq 9 on acpi0 pci_link7: ACPI PCI Link LNKH 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: ACPI CPU on acpi0 acpi_throttle0: ACPI CPU Throttling on cpu0 pcib0: ACPI Host-PCI bridge port 0xcf8-0xcff on acpi0 pci0: ACPI PCI bus on pcib0 agp0: Intel 82865 host to AGP bridge mem 0xf800-0xfbff at device 0.0 on pci0 pcib1: ACPI PCI-PCI bridge at device 1.0 on pci0 pci1: ACPI PCI bus on pcib1 pci1: display, VGA at device 0.0 (no driver attached) uhci0: Intel 82801EB (ICH5) USB controller USB-A port 0xcc00-0xcc1f irq 16 at device 29.0 on pci0 uhci0: [GIANT-LOCKED] usb0: Intel 82801EB (ICH5) USB controller USB-A 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: Intel 82801EB (ICH5) USB controller USB-B port 0xd000-0xd01f irq 19 at device 29.1 on pci0 uhci1: [GIANT-LOCKED] usb1: Intel 82801EB (ICH5) USB controller USB-B 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: Intel 82801EB (ICH5) USB controller USB-C port 0xd400-0xd41f irq 18 at device 29.2 on pci0
RE: Can't mount existing data disk after upgrade (disklabel gone)
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: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 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: [EMAIL PROTECTED] 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 offsetfstype [fsize bsize bps/cpg] a: 586099316 16unused0 0 c: 5860993320unused0 0 I changed it to this: # /dev/ad4s1: 8 partitions: #size offsetfstype [fsize bsize bps/cpg] a: 584002180 2097215 4.2BSD 2048 16384 0 # /data c: 5860993320unused0 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: [EMAIL PROTECTED] bsdlabel -r ad4 # /dev/ad4: 8 partitions: #size offsetfstype [fsize bsize bps/cpg] a: 586114688 16unused0 0 c: 5861147040unused0 0 [EMAIL PROTECTED] bsdlabel -r ad4s1 # /dev/ad4s1: 8 partitions: #size offsetfstype [fsize bsize bps/cpg] a: 586099316 16unused0 0 c: 5860993320unused0 0 [EMAIL PROTECTED] [EMAIL PROTECTED] bsdlabel -r ad4s1a # /dev/ad4s1a: 8 partitions: #size offsetfstype [fsize bsize bps/cpg] a: 586099300 16unused0 0 c: 5860993160unused0 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 [EMAIL PROTECTED]:/usr/obj/usr/src/sys/GENERIC ACPI APIC Table: INTEL D865PERL 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=0xbfebfbffFPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA ,CMOV,PAT,PSE36,CLFLUSH,DTS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE Features2=0x4400CNTX-ID,b14 real memory = 1072889856 (1023 MB) avail memory = 1040945152 (992 MB) ioapic0 Version 2.0 irqs 0-23 on motherboard npx0: [FAST] npx0: math processor on motherboard npx0: INT 16 interface acpi0: INTEL D865PERL on motherboard acpi0: Power Button (fixed) pci_link0: ACPI PCI Link LNKA irq 11 on acpi0 pci_link1: ACPI PCI Link LNKB irq 3 on acpi0 pci_link2: ACPI PCI Link LNKC irq 10 on acpi0 pci_link3: ACPI PCI Link LNKD irq 5 on acpi0 pci_link4: ACPI PCI Link LNKE irq 0 on acpi0 pci_link5: ACPI PCI Link LNKF irq 0 on acpi0
Re: Can't mount existing data disk after upgrade (disklabel gone)
On 1/20/06, Joe S [EMAIL PROTECTED] wrote: First of all, I have learned something VERY important about FreeBSD. SAVE your DISKLABELS! 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. Silly question: did you: newfs -U /dev/ad4s1a ? -- ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]