LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > *BSD
User Name
Password
*BSD This forum is for the discussion of all BSD variants.
FreeBSD, OpenBSD, NetBSD, etc.

Notices


Reply
  Search this Thread
Old 07-03-2008, 01:33 PM   #1
rautamiekka
LQ Newbie
 
Registered: Jun 2007
Location: Finland
Distribution: Ubuntu Ibex32/64 | FreeNAS on fBSD7 | Linpus Linux on Fedora8
Posts: 14

Rep: Reputation: 0
FreeBSD7 - USB Drive with important data: Bad Superblock


I am having trouble with an USB HDD whose Superblock has corrupted. The drive contains extremely inreplacable data so formatting/writing FileSystem again is out of question. Drive is formatted with UFS (GPT+Soft Updates).

The drive is mountable and readable but very slow. The drive is not mounted now tho to avoid loss of data.
 
Old 07-03-2008, 01:49 PM   #2
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora
Posts: 3,935
Blog Entries: 5

Rep: Reputation: Disabled
Quote:
Originally Posted by rautamiekka
The drive is mountable and readable but very slow.
What is your question? The drive is readable, so (slowly or otherwise) retrieve the data and put it somewhere safe.
 
Old 07-03-2008, 07:36 PM   #3
chort
Senior Member
 
Registered: Jul 2003
Location: Silicon Valley, USA
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660

Rep: Reputation: 76
If reading the driver is very slow, then there's a good chance the physical media is damaged in some way. Backup all the information on it ASAP. You should mount it read-only (-r) to minimize the possibility of further corruption.
 
Old 07-04-2008, 03:12 AM   #4
rautamiekka
LQ Newbie
 
Registered: Jun 2007
Location: Finland
Distribution: Ubuntu Ibex32/64 | FreeNAS on fBSD7 | Linpus Linux on Fedora8
Posts: 14

Original Poster
Rep: Reputation: 0
"Howto repair the Superblock ?"

I can see the files but copying stops after few files.
 
Old 07-04-2008, 02:54 PM   #5
chort
Senior Member
 
Registered: Jul 2003
Location: Silicon Valley, USA
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660

Rep: Reputation: 76
A quick Google search brought up this, but I'm not certain it will work the same with your FS. You should try to make a copy of the disk image with dd first before attempting to recover the superblock.




This will supposedly copy an alternative superblock to the standard location:
Code:
dd if=<disk> skip=32 of=<disk> seek=16 bs=512 count=16
 
Old 07-04-2008, 04:14 PM   #6
rautamiekka
LQ Newbie
 
Registered: Jun 2007
Location: Finland
Distribution: Ubuntu Ibex32/64 | FreeNAS on fBSD7 | Linpus Linux on Fedora8
Posts: 14

Original Poster
Rep: Reputation: 0
UFS (GPT+Soft Updates) is FreeBSD's native FS, doesn't ? Odd that nobody knows howto fix it :S
 
Old 07-05-2008, 10:18 AM   #7
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora
Posts: 3,935
Blog Entries: 5

Rep: Reputation: Disabled
Might be time to revisit your approach. When starting a thread it's usually a good idea to post a) what it is you're doing/trying to do; b) the error messages you're seeing (not your interpretation of them); and c) exactly what your question is.

Quote:
Originally Posted by rautamiekka
"Howto repair the Superblock ?"
This is silly. Is the data valuable? Or is the drive valuable? From your first post it sounds like the data is what you really care about. So take an image of it, as was already suggested.

If you're feeling like a gambler, you can run fsck against the drive (which will attempt to locate an alternate superblock).

Good luck.

Last edited by anomie; 07-05-2008 at 10:19 AM.
 
Old 07-05-2008, 12:51 PM   #8
chort
Senior Member
 
Registered: Jul 2003
Location: Silicon Valley, USA
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660

Rep: Reputation: 76
fsck will locate an alternative superblock, but apparently the FreeBSD version of fsck no longer copies that superblock to the main one, so you have to run the dd command that I posted in order to perform that last step... at least, that was the information I collected via Google.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Bad SuperBlock! How to recover data? kr5 Linux - Hardware 20 09-30-2020 12:04 PM
USB drive bad superblock dtmbmw325i Linux - Hardware 7 09-20-2009 09:51 AM
usb drive won't mount - error: wrong fs type, bad option, bad superblock on /dev/sda1 bluecog6 Linux - Hardware 4 01-27-2007 09:07 AM
bad superblock when trying to mount a USB hard drive shubb Linux - Hardware 4 04-29-2005 12:00 AM
bad superblock, corupt data, dd, Oh my! veroth Linux - General 2 03-17-2004 10:55 AM

LinuxQuestions.org > Forums > Other *NIX Forums > *BSD

All times are GMT -5. The time now is 10:14 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration