Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
linux:reiserfs [2009/05/25 00:35] 127.0.0.1 external edit |
linux:reiserfs [2016/03/16 22:57] (current) 82.50.77.129 [REISERFS error (device dm-6): vs-7000 search_by_entry_key: search_by_key returned item position == 0] |
||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== ReiserFS & Linux ====== | ====== ReiserFS & Linux ====== | ||
| + | |||
| + | |||
| + | ===== Troubleshooting ===== | ||
| + | |||
| + | ==== Basic rules of fixing b0rken ReiserFS partion ==== | ||
| + | //The most important things I've learned while drinking with Hans Reiser and things that always saved my data on reiserfs.// | ||
| + | |||
| + | * make sure you have " | ||
| + | * **make sure you have working (not br0ken) RAM** | ||
| + | * before running any --rebuild-sb or --rebuild-tree make sure you have backup! | ||
| + | * have the latest reiserfsprogs tools | ||
| + | * have a decent stable linux kernel and reiserfs support in it | ||
| + | |||
| + | |||
| + | ==== REISERFS error (device dm-6): vs-7000 search_by_entry_key: | ||
| + | |||
| + | < | ||
| + | ReiserFS: hdx1: found reiserfs format " | ||
| + | ReiserFS: hdx1: using ordered data mode | ||
| + | ReiserFS: hdx1: 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: hdx1: checking transaction log (hda1) | ||
| + | ReiserFS: hdx1: warning: vs-7000: search_by_entry_key: | ||
| + | ReiserFS: hdx1: found reiserfs format " | ||
| + | ReiserFS: hdx1: using ordered data mode | ||
| + | ReiserFS: hdx1: 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: hdx1: checking transaction log (hda1) | ||
| + | ReiserFS: hdx1: warning: vs-7000: search_by_entry_key: | ||
| + | </ | ||
| + | |||
| + | | ||
| + | |||
| + | < | ||
| + | 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**, but here comes the trick .. | ||
| + | |||
| + | < | ||
| + | mount -t reiserfs /dev/hda1 / | ||
| + | mount: wrong fs type, bad option, bad superblock on /dev/hda1, | ||
| + | | ||
| + | In some cases useful info is found in syslog - try | ||
| + | dmesg | tail or so | ||
| + | </ | ||
| + | |||
| + | Ok .. here is a workaround to make the partition mountable again it is enough to change | ||
| + | one byte in the super block from 0 (hash is not set) to 3 (r5 hash). | ||
| + | It can be done by a hex editor. | ||
| + | |||
| + | < | ||
| + | hexdump -C of block #16 (reiserfs uses 4k-size blocks, numbers start with 0): | ||
| + | |||
| + | ... | ||
| + | 00000030 | ||
| + | 00000040 | ||
| + | ^^ | ||
| + | this byte. | ||
| + | ... | ||
| + | </ | ||
| + | |||
| + | Which can be done like .. | ||
| + | |||
| + | I used dd to copy first 512Kb from disk, then modify them and copy back to disk: | ||
| + | |||
| + | $ dd if=/ | ||
| + | |||
| + | then use your favourite Hexeditor to fix problem | ||
| + | |||
| + | (position 0001:0040 in this file) --> write \" | ||
| + | |||
| + | and copy it back to disk | ||
| + | |||
| + | $ dd of=/ | ||
| + | |||

