Solved

recover reiserfs

Posted on 2006-07-18
6
1,219 Views
Last Modified: 2013-12-15
First sign of trouble was grub error 17

After all the following I have no more a grub error but it does not boot.

Working from live kanotix:

Could not mount reiserfs partition /dev/hda1:
Could not mount device.
The reported error was:
mount: wrong fs type, bad option, bad superblock on /dev/hda1,
missing codepage or other error
In some cases useful info is found in syslog - try
dmesg | tail or so

root@0[knoppix]# dmesg | tail
ReiserFS: hda1: found reiserfs format "3.6" with standard journal
ReiserFS: hda1: using ordered data mode
ReiserFS: hda1: journal params: device hda1, size 8192, journal first block 18, max trans len 1024, max batch 900, max commit age 30, max trans age 30
ReiserFS: hda1: checking transaction log (hda1)
ReiserFS: hda1: warning: vs-7000: search_by_entry_key: search_by_key returned item position == 0
ReiserFS: hda1: found reiserfs format "3.6" with standard journal
ReiserFS: hda1: using ordered data mode
ReiserFS: hda1: journal params: device hda1, size 8192, journal first block 18, max trans len 1024, max batch 900, max commit age 30, max trans age 30
ReiserFS: hda1: checking transaction log (hda1)
ReiserFS: hda1: warning: vs-7000: search_by_entry_key: search_by_key returned item position == 0


Tried:

1)
reiserfsck --check /dev/hda1
Replaying journal..
Reiserfs journal '/dev/hda1' in blocks [18..8211]: 0 transactions replayed
Checking internal tree..finished
Comparing bitmaps..finished
Checking Semantic tree:
finished
No corruptions found
There are on the filesystem:
        Leaves 29031
        Internal nodes 198
        Directories 13116
        Other files 128569
        Data block pointers 1415973 (487 of them are zero)
        Safe links 4
###########
reiserfsck finished at Wed Jul 19 04:39:35 2006
###########


2)
badblocks /dev/hda1>/home/knoppix/badblocks
(file /home/knoppix/badblocks was created empty)

then:

reiserfsck --fix-fixable --badblocks /home/knoppix/badblocks /dev/hda1

reiserfsck 3.6.19 (2003 www.namesys.com)

*************************************************************

Will check consistency of the filesystem on /dev/hda1
and will fix what can be fixed without --rebuild-tree
Bad block list will contain only blocks specified in '/home/knoppix/badblocks' file
Will put log info to 'stdout'

Do you want to run this program?[N/Yes] (note need to type Yes if you do):Yes
###########
reiserfsck --fix-fixable started at Wed Jul 19 05:22:39 2006
###########
Replaying journal..
Reiserfs journal '/dev/hda1' in blocks [18..8211]: 0 transactions replayed
Checking internal tree..finished
Comparing bitmaps..finished
Checking Semantic tree:
finished
No corruptions found
There are on the filesystem:
        Leaves 29031
        Internal nodes 198
        Directories 13116
        Other files 128569
        Data block pointers 1415973 (487 of them are zero)
        Safe links 4
###########
reiserfsck finished at Wed Jul 19 05:24:19 2006
###########

3)
reiserfsck --rebuild-sb /dev/hda1

Reiserfs super block in block 16 on 0x301 of format 3.6 with standard journal
Count of blocks on the device: 4883744
Number of bitmaps: 150
Blocksize: 4096
Free blocks (count of blocks - used [journal, bitmaps, data, reserved] blocks): 3430669
Root block: 4096104
Filesystem is clean
Tree height: 5
Hash function used to sort names: not set
Objectid map size 972, max 972
Journal parameters:
        Device [0x0]
        Magic [0x0]
        Size 8193 blocks (including 1 for journal header) (first block 18)
        Max transaction length 1024 blocks
        Max batch size 900 blocks
        Max commit age 30
Blocks reserved by journal: 0
Fs state field: 0x0:
sb_version: 2
inode generation number: 2442403
UUID: bfd1afad-a173-40a6-bbbe-643dc9e68a23
LABEL:
Set flags in SB:

Super block seems to be correct

4)

mount -t reiserfs /dev/hda1 /media/restore
mount: wrong fs type, bad option, bad superblock on /dev/hda1,
       missing codepage or other error
       In some cases useful info is found in syslog - try
       dmesg | tail  or so

Question: can I do anything before going into rebuild-tree? The distribution is kanotix, latest version, kernel 2.6.11. Do you think an update to the HD installation might fix this or is it a serious disk error?
0
Comment
Question by:jlello02
  • 2
6 Comments
 
LVL 22

Expert Comment

by:pjedmond
ID: 17202530
This error looks particularly serious. Data recover is probably the next step....but of course you've got a backup?.....

After this type of error, I'd always advocate a clean install, after a thorough check of drive integrity. However, it is possible to reinstall grub (assuming that your /dev/hda1 was your /boot directory) using the standard process for this:

http://www.terabyteunlimited.com/kb/article.php?id=232

(   (()
(`-' _\
 ''  ''
0
 
LVL 22

Expert Comment

by:pjedmond
ID: 17202561
For future reference, I personally still encourage my users to stick with ext2, and ext3 file systems. They are easier to repair, and there is more recovery software available for it. Reiser FS may provide some performance benefits....but with modern systems, in most cases, the use of reiserFS is not actually needed! What tends to happen, is us system admins just decide to use it for no other reason, other than the thought of doing something a 'little different';)

(   (()
(`-' _\
 ''  ''

0
 

Author Comment

by:jlello02
ID: 17203058
Thank you. In fact I ended up doing a rebuild-tree, what fixed the disk and ended up upgrading the distribution. Block 0 was damaged and I got the impression that --check cheks from block 18 on. Whatever, it's up, giving me bad dreams, though. Yes - of course - there was a backup. Anyway, I did a fresh one using a live CD, you never know.

You may be right about reiserFS. I have everything with it, including an internet server that has been up without interruption for at least three years now. I suppose it's as with printers: you get used to a brand.

Thanks again
0
 
LVL 1

Accepted Solution

by:
DarthMod earned 0 total points
ID: 17642324
PAQed with points refunded (500)

DarthMod
Community Support Moderator
0

Featured Post

Free Gift Card with Acronis Backup Purchase!

Backup any data in any location: local and remote systems, physical and virtual servers, private and public clouds, Macs and PCs, tablets and mobile devices, & more! For limited time only, buy any Acronis backup products and get a FREE Amazon/Best Buy gift card worth up to $200!

Join & Write a Comment

Network Interface Card (NIC) bonding, also known as link aggregation, NIC teaming and trunking, is an important concept to understand and implement in any environment where high availability is of concern. Using this feature, a server administrator …
Using 'screen' for session sharing, The Simple Edition Step 1: user starts session with command: screen Step 2: other user (logged in with same user account) connects with command: screen -x Done. Both users are connected to the same CLI sessio…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now