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: 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 0xf800-0xfbff 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-0xfebf 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:
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: 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 0xf800-0xfbff 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-0xfebf 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.
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: 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_
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]"