Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Recovering reiserfs
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on Sparc
View previous topic :: View next topic  
Author Message
Ferris
Retired Dev
Retired Dev


Joined: 13 Jan 2003
Posts: 426
Location: N. Virginia (USA)

PostPosted: Wed May 14, 2003 6:17 pm    Post subject: Recovering reiserfs Reply with quote

OK, so what I did was unwise... :(
And, this might or might not be sparc-specific, but I'll start here.

As part of a general cleanup this morning, I went through a sequence
umount /home0
#
# This is a reiserfs on /dev/sda4 containing most current user files
#
reiserfsck --check /dev/sda4
reiserfsck --fix-fixable /dev/sda4
#
mount -a
(get back: "mount: Not a directory")

OK, (well, not OK)
shutdown -r now
..<<bootstuff>>
...
mount: Not a directory
...
And system is up, except for having '/home0' mounted

Finally, I have started cloning /dev/sda4 --> /home2/sda4

Now, either
reiserfsck --check /dev/sda4
reiserfsck --check /home2/sda4 (say)
gets lots of complaints.

(Working only with the clone, now),
Another
go-round gives
lacewing home2 # reiserfsck --fix-fixable /home2/sda4

<-------------reiserfsck, 2002------------->
reiserfsprogs 3.6.3

Will check consistency of the filesystem on /home2/sda4
Will fix what can be fixed w/o --rebuild-tree
Will put log info to 'stdout'

Do you want to run this program?[N/Yes] (note need to type Yes):Yes
###########
reiserfsck --fix-fixable started at Wed May 14 17:19:11 2003
###########
Replaying journal..
0 transactions replayed
Checking S+tree../ 2 (of 2)/ 41 (of 131)/ 59 (of 170)node (37865) with wrong level (0) found in the tree (should be 1)
whole subtree skipped / 59 (of 131)/ 59 (of 86)node (40646) with wrong level (0) found in the tree (should be 1)
whole subtree skipped ok
Comparing bitmaps..free block count 1690893 mismatches with a correct one 1691681.
on-disk bitmap does not match to the correct one.
Trying to fix bitmap ..
bitmaps were not recovered.
You can either run rebuild-tree or live with 788 leaked blocks
File size limit exceeded

=========================

So, for fun, try
reiserfsck --rebuild-tree /home2/sda4
....
Pass 1 (will try to insert 31980 leaves):
####### Pass 1 #######
Looking for allocable blocks .. ok
0%....20%....40%....60%....80%....100% left 0, 1390 /sec
Flushing..done
31980 leaves read
31954 inserted
- pointers in indirect items pointing to metadata 2 (zeroed)
26 not inserted
non-unique pointers in indirect items (zeroed) 9
####### Pass 2 #######

Pass2:
0%....20%....40%..are_file_items_correct: convert the indirect item back to direct 30724 30808
..60%.are_file_items_correct: convert the indirect item back to direct 101049 104305
...80%are_file_items_correct: convert the indirect item back to direct 92496 188017
.are_file_items_correct: convert the indirect item back to direct 8019 170674
.are_file_items_correct: convert the indirect item back to direct 180909 180911
.are_file_items_correct: convert the indirect item back to direct 183889 184458
.100% left 0, 0 /sec
Flushing..File size limit exceeded

At that point, all I can do is start over.

Now, if I am lucky, my "clone" is not quite good enough, but I am hesitant
to hurt the actual disk partition even more...

Any useful thoughts? (Beyond I shouldn't have done this, I mean).
Back to top
View user's profile Send private message
Ferris
Retired Dev
Retired Dev


Joined: 13 Jan 2003
Posts: 426
Location: N. Virginia (USA)

PostPosted: Wed May 14, 2003 8:23 pm    Post subject: Reply with quote

I'll answer myself. Here's what seems to work.
(/dev/sda4 is the messed up file system, /dev/sdd4 is on a spare lying
around for backup type work).

1. Build dd_rescue & reiserfs-3.6.7
2. dd_rescue /dev/sda4 /dev/sdd4
3. cd /var/tmp/reiserfsprogs-3.6.7/sbin
4. ./reiserfsck --rebuild-tree /dev/sdd4
5. mount /dev/sdd4 /home0

And now, it seems OK. So, back to repair the real version...

Thanks for letting me thing outloud.
:wink:
Back to top
View user's profile Send private message
tojo
n00b
n00b


Joined: 09 Dec 2002
Posts: 72

PostPosted: Wed May 14, 2003 11:09 pm    Post subject: Reply with quote

Thank you for this information, I had bookmarked this topic for future :)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on Sparc All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum