Re: disk recovery problem(s)

2010-11-19 Thread perryh
Thomas Exner thomas.ex...@uni-konstanz.de wrote:

 when running fsck the first error message is ROOT INODE UNALLOCATED
 ...
 Is there a chance to get the data back?

Dunno about current versions, but IIRC some earlier versions of
dump(8) could handle even a badly-corrupted FS.  No harm in trying,
since it will not try to write anything to the FS being dumped.  Of
course, you need to find a place to dump it to (and I would _not_
advise piping the output into restore(8) in this kind of situation
-- save the dumpfile itself somewhere in case you find yourself
needing to hack on restore(8) to extract files from it).
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


disk recovery problem(s)

2010-11-18 Thread Thomas Exner

Dear all:

I have a very similar problem as Roland Smith almost two years ago. My 
hard drive got corrupted (I do not really know why) and when running 
fsck the first error message is ROOT INODE UNALLOCATED (the full 
output of fsck is given below. I can then type y and it looks like 
that fsck is doing something. But in phase 3, when it tries to reconnect 
the inodes and put them in the lost+found directory, this directory 
cannot be created. If I mount the file system, there is still no root 
directory on the drive (no . and .. or anything else) and if I run 
fsck again, the exact same error massages occur again. If I only perform 
the ALLOCATE? and answer all the other questions with no, I get a 
. and .. in the root directory but nothing more. Running again fsck 
destroys everything again. Does anyone have an idea why fsck is not able 
to perform the recovery or why the changes are undone at one point? Is 
there a chance to get the data back? I do not know if it is important 
but the file system is on a raid5.


Any help would be highly appreciated.
Best,
Thomas



Full fsck output:
nas1:/mnt# /sbin/fsck -t ufs -f /dev/raid5/nasraid1p1
** /dev/raid5/nasraid1p1
** Last Mounted on /mnt/nasraid1
** Phase 1 - Check Blocks and Sizes
** Phase 2 - Check Pathnames
ROOT INODE UNALLOCATED
UNEXPECTED SOFT UPDATE INCONSISTENCY

ALLOCATE? [yn] y

BAD TYPE VALUE  I=2  OWNER=root MODE=40755
SIZE=2048 MTIME=Nov 16 17:21 2010
DIR=/

UNEXPECTED SOFT UPDATE INCONSISTENCY

FIX? [yn] y

BAD TYPE VALUE  I=2  OWNER=root MODE=40755
SIZE=2048 MTIME=Nov 16 17:21 2010
DIR=/

UNEXPECTED SOFT UPDATE INCONSISTENCY

FIX? [yn] y

BAD TYPE VALUE FOR '..'  I=151745536  OWNER=root MODE=40755
SIZE=512 MTIME=Oct 19 17:19 2010
DIR=?

UNEXPECTED SOFT UPDATE INCONSISTENCY

FIX? [yn] y

BAD TYPE VALUE  I=2  OWNER=root MODE=40755
SIZE=2048 MTIME=Nov 16 17:21 2010
DIR=

UNEXPECTED SOFT UPDATE INCONSISTENCY

FIX? [yn] y

BAD TYPE VALUE FOR '..'  I=301465600  OWNER=root MODE=40755
SIZE=19968 MTIME=Nov 12 09:16 2010
DIR=?

UNEXPECTED SOFT UPDATE INCONSISTENCY

FIX? [yn] y

BAD TYPE VALUE  I=2  OWNER=root MODE=40755
SIZE=2048 MTIME=Nov 16 17:21 2010
DIR=

UNEXPECTED SOFT UPDATE INCONSISTENCY

FIX? [yn] y

** Phase 3 - Check Connectivity
UNREF DIR  I=151745536  OWNER=root MODE=40755
SIZE=512 MTIME=Oct 19 17:19 2010
RECONNECT? [yn] y

NO lost+found DIRECTORY
CREATE? [yn] y

SORRY. CANNOT CREATE lost+found DIRECTORY
UNEXPECTED SOFT UPDATE INCONSISTENCY


UNREF DIR  I=301465600  OWNER=root MODE=40755
SIZE=19968 MTIME=Nov 12 09:16 2010
RECONNECT? [yn] y

NO lost+found DIRECTORY
CREATE? [yn] y

SORRY. CANNOT CREATE lost+found DIRECTORY
UNEXPECTED SOFT UPDATE INCONSISTENCY


UNREF DIR  I=151745536  OWNER=root MODE=40755
SIZE=512 MTIME=Oct 19 17:19 2010
RECONNECT? [yn] y

NO lost+found DIRECTORY
CREATE? [yn] y

SORRY. CANNOT CREATE lost+found DIRECTORY
UNEXPECTED SOFT UPDATE INCONSISTENCY


** Phase 4 - Check Reference Counts
** Phase 5 - Check Cyl groups
SUMMARY INFORMATION BAD
SALVAGE? [yn] y

BLK(S) MISSING IN BIT MAPS
SALVAGE? [yn] y

35257960 files, 1247115068 used, 171932417 free (5559497 frags, 20796615 
blocks, 0.4% fragmentation)


* FILE SYSTEM MARKED CLEAN *

* FILE SYSTEM WAS MODIFIED *
--


Dr. Thomas E. Exner
Juniorprofessur Theoretische Chemische Dynamik
Fachbereich Chemie
Universität Konstanz
78457 Konstanz

Tel.: +49-(0)7531-882015
Fax:  +49-(0)7531-883587
Email: thomas.ex...@uni-konstanz.de


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


disk recovery problem(s)

2009-02-06 Thread Robert Huff

Had a power outage recently; when trying to fsck several
external hard drives I'm getting unexpected errors.
For example:

huff@ fsck /dev/da3a
** /dev/da3a
** Last Mounted on /backup
** Phase 1 - Check Blocks and Sizes
** Phase 2 - Check Pathnames
ROOT INODE UNALLOCATED
ALLOCATE? [yn] 

a) what's probably happened?
b) is there a way to recover the data?  I can scrub the disk
and restore, but would like to avoid that if at all possible.


Robert Huff

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: disk recovery problem(s)

2009-02-06 Thread Roland Smith
On Fri, Feb 06, 2009 at 02:48:41PM -0500, Robert Huff wrote:
 
   Had a power outage recently; when trying to fsck several
 external hard drives I'm getting unexpected errors.
   For example:
 
 huff@ fsck /dev/da3a
 ** /dev/da3a
 ** Last Mounted on /backup
 ** Phase 1 - Check Blocks and Sizes
 ** Phase 2 - Check Pathnames
 ROOT INODE UNALLOCATED
 ALLOCATE? [yn] 
 
   a) what's probably happened?

Error messages are explained in Appendix A of
/usr/share/doc/smm/03.fsck/paper.ascii.gz

Unfortunately it says that this error should never happen. :-/

Is the drive connected by USB? Some USB disk interface chips are quite quirky.

   b) is there a way to recover the data?

Answer y, and all directorys and files found in the root will appear in
lost+found, unless the attempt to allocate the root inode fails.. 

Roland
-- 
R.F.Smith   http://www.xs4all.nl/~rsmith/
[plain text _non-HTML_ PGP/GnuPG encrypted/signed email much appreciated]
pgp: 1A2B 477F 9970 BA3C 2914  B7CE 1277 EFB0 C321 A725 (KeyID: C321A725)


pgpBz44yeGud9.pgp
Description: PGP signature


Re: disk recovery problem(s)

2009-02-06 Thread Polytropon
On Fri, 6 Feb 2009 14:48:41 -0500, Robert Huff roberth...@rcn.com wrote:
 
   Had a power outage recently; when trying to fsck several
 external hard drives I'm getting unexpected errors.
   For example:
 
 huff@ fsck /dev/da3a
 ** /dev/da3a
 ** Last Mounted on /backup
 ** Phase 1 - Check Blocks and Sizes
 ** Phase 2 - Check Pathnames
 ROOT INODE UNALLOCATED
 ALLOCATE? [yn] 
 
   a) what's probably happened?
   b) is there a way to recover the data?  I can scrub the disk
 and restore, but would like to avoid that if at all possible.

I really hope you don't get into the trouble that I have (allthough
you mentioned that you've got backups)...

Your fsck output seems to indicate that fsck can handle the damage.
You could now let it continue. If a parent inode has disappeared,
its child inodes (orphaned ones) - or, to be correct, the files or
directories they represent - get restored in the lost+found/ directory
where their name (probably lost) gets replaced by the inode number.
If it's a directory, it content will usually be present with the
file names, only the topmost part of a hierarchy will be affected.




-- 
Polytropon
From Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: disk recovery problem(s)

2009-02-06 Thread Robert Huff

Roland Smith writes:

   huff@ fsck /dev/da3a
   ** /dev/da3a
   ** Last Mounted on /backup
   ** Phase 1 - Check Blocks and Sizes
   ** Phase 2 - Check Pathnames
   ROOT INODE UNALLOCATED
   ALLOCATE? [yn] 
   
  a) what's probably happened?
  
  Error messages are explained in Appendix A of
  /usr/share/doc/smm/03.fsck/paper.ascii.gz
  
  Unfortunately it says that this error should never happen. :-/
  
  Answer y, and all directorys and files found in the root will
  appear in lost+found, unless the attempt to allocate the root
  inode fails..

Thank you.
That worked ... sort of.


Robert Huff

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org