reiserfs3 rebuild-tree successful but no files
Hello,
a friend of mine shredded his data (70GB) when he tried to undelete an accidentally deleted file. He normally works with windoze. Therefore he didn't know he couldn't undelete a file on a reiserfs partition with ext2 undelete tool %-(
When he called me it was already too late. He had overwritten the superblock :-(
I'm still trying to rescue the data. I can see them in the image using grep
or hexedit. But nothing I tried has been successful. My first steps were unmounting the partition, taking an image and working with a copy of this image using a loop back device.
All files have been retrieved but were removed by reiserfsck --check although the last output says that directories and files have been linked (see below). I tried with many combinations nearly all parameters of reiserfsck:
--fix-fixable --no-journal-available -S ...
I mounted the image after each operation, but all I can see is:
root@marvin:/home/kris 0$ # mount -o ro /dev/loop/0 /mnt/temp1/ root@marvin:/home/kris 0$ # ls -la /mnt/temp1/
total 21
drwxr-xr-x 3 root root 4096 Jan 20 11:36 .
drwxr-xr-x 39 root root 968 Feb 6 14:12 ..
drwx------ 2 root root 16384 Jan 20 11:36 lost+found
root@marvin:/home/kris 0$ # ls -la /mnt/temp1/lost+found/ total 20
drwx------ 2 root root 16384 Jan 20 11:36 . drwxr-xr-x 3 root root 4096 Jan 20 11:36 .. root@marvin:/home/kris 0$ #
Do you have any suggestions how to rescue the data?
Regards
Kris
Here you see a typical output:
root@marvin:/home/kris 0$ # losetup /dev/loop/0 /mnt/temp/data.x.dd root@marvin:/home/kris 0$ # reiserfsck /dev/loop/0 --rebuild-tree reiserfsck 3.6.19 (2003 www.namesys.com)
<snip>
Will rebuild the filesystem (/dev/loop/0) tree
Will put log info to 'stdout'
Do you want to run this program?[N/Yes] (note need to type Yes if you do):Yes
reiserfs_open: the reiserfs superblock cannot be found on /dev/loop/0. Failed to open the filesystem.
If the partition table has not been changed, and the partition is valid and it really contains a reiserfs partition, then the superblock is corrupted and you need to run this utility with --rebuild-sb.
root@marvin:/home/kris 8$ # reiserfsck /dev/loop/0 --rebuild-sb reiserfsck 3.6.19 (2003 www.namesys.com)
<snip>
Will check superblock and rebuild it if needed
Will put log info to 'stdout'
reiserfs_open: the reiserfs superblock cannot be found on /dev/loop/0.
what the version of ReiserFS do you use[1-4]
(1) 3.6.x
(2) >=3.5.9 (introduced in the middle of 1999) (if you use linux 2.2,choose this one)
(3) < 3.5.9 converted to new format (don't choose if unsure)
(4) < 3.5.9 (this is very old format, don't choose if unsure)
(X) exit
1
Enter block size [4096]:
No journal device was specified. (If journal is not available, re-run with --no-journal-available option specified).
Is journal default? (y/n)[y]:
Did you use resizer(y/n)[n]:
rebuild-sb: no uuid found, a new uuid was generated (7e253707-4fef-42aa-9785-b1cd079851af)
rebuild-sb: You either have a corrupted journal or have just changed the start of the partition with some partition table editor. If you are sure that the start of the partition is ok, rebuild the journal header. Do you want to rebuild the journal header? (y/n)[n]: y
Reiserfs super block in block 16 on 0x700 of format 3.6 with standard journal Count of blocks on the device: 17659440
Number of bitmaps: 539
Blocksize: 4096
Free blocks (count of blocks - used [journal, bitmaps, data, reserved] blocks): 0
Root block: 0
Filesystem is NOT clean
Tree height: 0
Hash function used to sort names: not set
Objectid map size 0, 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: 0x1:
some corruptions exist.sb_version: 2
inode generation number: 0
UUID: 7e253707-4fef-42aa-9785-b1cd079851af
LABEL:
Set flags in SB:
Is this ok ? (y/n)[n]: y
The fs may still be unconsistent. Run reiserfsck --check.
root@marvin:/home/kris 1$ # reiserfsck /dev/loop/0 --check reiserfsck 3.6.19 (2003 www.namesys.com)
<snip>
Will read-only check consistency of the filesystem on /dev/loop/0 Will put log info to 'stdout'
###########
reiserfsck --check started at Tue Feb 8 17:17:31 2005
###########
Replaying journal..
Reiserfs journal '/dev/loop/0' in blocks [18..8211]: 0 transactions replayed Zero bit found in on-disk bitmap after the last valid bit. Checking internal tree..
Bad root block 0. (--rebuild-tree did not complete)
Aborted
root@marvin:/home/kris 134$ # reiserfsck /dev/loop/0 -y --rebuild-tree reiserfsck 3.6.19 (2003 www.namesys.com)
<snip>
Will rebuild the filesystem (/dev/loop/0) tree
Will put log info to 'stdout'
Do you want to run this program?[N/Yes] (note need to type Yes if you do):Yes Replaying journal..
Reiserfs journal '/dev/loop/0' in blocks [18..8211]: 0 transactions replayed Zero bit found in on-disk bitmap after the last valid bit. Fixed.
###########
reiserfsck --rebuild-tree started at Tue Feb 8 17:37:56 2005
###########
Pass 0:
####### Pass 0 #######
Loading on-disk bitmap .. ok, 559628 blocks marked usedinit_source_bitmap: Bitmap 0 (of 32768 bits) is wrong - mark all blocks [0 - 32768] as usedinit_source_bitmap: Bitmap 1 (of 32768 bits) is wrong - mark all blocks
[32768 - 65536] as usedinit_source_bitmap: Bitmap 3 (of 32768 bits) is wrong - mark all blocks
[98304 - 131072] as usedinit_source_bitmap: Bitmap 5 (of 32768 bits) is wrong - mark all blocks [163840 - 196608] as usedinit_source_bitmap: Bitmap 7 (of 32768 bits) is wrong - mark all blocks [229376 - 262144] as usedinit_source_bitmap: Bitmap 9 (of 32768 bits) is wrong - mark all blocks [294912 - 327680] as usedinit_source_bitmap: Bitmap 25 (of 32768 bits) is wrong - mark all blocks [819200 - 851968] as usedinit_source_bitmap: Bitmap 27 (of 32768 bits) is wrong - mark all blocks [884736 - 917504] as usedinit_source_bitmap: Bitmap 49 (of 32768 bits) is wrong - mark all blocks [1605632 - 1638400] as usedinit_source_bitmap: Bitmap 81 (of 32768 bits) is wrong - mark all blocks [2654208 - 2686976] as usedinit_source_bitmap: Bitmap 125 (of 32768 bits) is wrong - mark all blocks [4096000 - 4128768] as usedinit_source_bitmap: Bitmap 243 (of 32768 bits) is wrong - mark all blocks [7962624 - 7995392] as usedinit_source_bitmap: Bitmap 343 (of 32768 bits) is wrong - mark all blocks [11239424 - 11272192] as used
Skipping 8749 blocks (super block, journal, bitmaps) 687599 blocks will be read
0%....20%....40%....60%....80%....100% left 0,
9549 /sec
103101 directory entries were hashed with "r5" hash.
Selected hash ("r5") does not match to the hash set in the super block (not set).
"r5" hash is selected
Flushing..finished
Read blocks (but not data blocks) 687599
Leaves among those 20621
Objectids found 114185
Pass 1 (will try to insert 20621 leaves):
####### Pass 1 #######
Looking for allocable blocks .. finished
0%....20%....40%....60%....80%....100% left 0,
1718 /sec
Flushing..finished
20621 leaves read
20524 inserted
- pointers in indirect items pointing to metadata 3(zeroed)
97 not inserted
non-unique pointers in indirect items (zeroed) 1075
####### Pass 2 #######
Pass 2:
0%....20%....40%....60%vpf-10260: The file we are inserting the new item (69291 69327 0x1 DRCT (2), len 216, location 3880 entry count 65535, fsck need 0, format new) into has no StatData, insertion was skipped ....vpf-10260: The file we are inserting the new item (240148 240150 0x1 IND (1), len 1844, location 2252 entry count 0, fsck need 0, format new) into has no StatData, insertion was skipped
vpf-10260: The file we are inserting the new item (241304 319211 0x43001 IND (1), len 492, location 3604 entry count 0, fsck need 0, format new) into has no StatData, insertion was skipped
vpf-10260: The file we are inserting the new item (737518 739813 0xe6001 IND (1), len 688, location 3408 entry count 0, fsck need 0, format new) into has no StatData, insertion was skipped
80%vpf-10260: The file we are inserting the new item (737518 739813 0xe6001 IND (1), len 688, location 3408 entry count 0, fsck need 0, format new) into has no StatData, insertion was skipped
vpf-10260: The file we are inserting the new item (25 93014 0x1e1 DRCT (2), len 1408, location 2688 entry count 65535, fsck need 0, format new) intohas no StatData, insertion was skipped
vpf-10260: The file we are inserting the new item (238343 319306 0x3f4001 IND (1), len 136, location 3960 entry count 0, fsck need 0, format new) into has no StatData, insertion was skipped
vpf-10260: The file we are inserting the new item (94077 119920 0x1 DRCT (2), len 456, location 3640 entry count 65535, fsck need 0, format new) into has no StatData, insertion was skipped
vpf-10260: The file we are inserting the new item (102491 220397 0x179 DRCT (2), len 1264, location 2832 entry count 65535, fsck need 0, format new)into has no StatData, insertion was skipped
.vpf-10260: The file we are inserting the new item (642448 771721 0xcc1 DRCT (2), len 520, location 3576 entry count 65535, fsck need 0, format new)into has no StatData, insertion was skipped
.vpf-10260: The file we are inserting the new item (294390 692752 0x129 DRCT (2), len 296, location 3800 entry count 65535, fsck need 0, format new)into has no StatData, insertion was skipped
vpf-10260: The file we are inserting the new item (294390 692752 0x129 DRCT (2), len 296, location 3800 entry count 65535, fsck need 0, format new) into has no StatData, insertion was skipped
vpf-10260: The file we are inserting the new item (294390 692752 0x129 DRCT (2), len 296, location 3800 entry count 65535, fsck need 0, format new) into has no StatData, insertion was skipped
.vpf-10260: The file we are inserting the new item (294390 692752 0x129 DRCT (2), len 296, location 3800 entry count 65535, fsck need 0, format new)into has no StatData, insertion was skipped
vpf-10260: The file we are inserting the new item (294390 692752 0x129 DRCT (2), len 296, location 3800 entry count 65535, fsck need 0, format new) into has no StatData, insertion was skipped
vpf-10260: The file we are inserting the new item (294390 692752 0x129 DRCT (2), len 296, location 3800 entry count 65535, fsck need 0, format new) into has no StatData, insertion was skipped
vpf-10260: The file we are inserting the new item (294390 692752 0x129 DRCT (2), len 296, location 3800 entry count 65535, fsck need 0, format new) into has no StatData, insertion was skipped
vpf-10260: The file we are inserting the new item (294390 692752 0x129 DRCT (2), len 296, location 3800 entry count 65535, fsck need 0, format new) into has no StatData, insertion was skipped
.vpf-10260: The file we are inserting the new item (294390 692752 0x129 DRCT (2), len 296, location 3800 entry count 65535, fsck need 0, format new)into has no StatData, insertion was skipped
vpf-10260: The file we are inserting the new item (294390 692752 0x129 DRCT (2), len 296, location 3800 entry count 65535, fsck need 0, format new) into has no StatData, insertion was skipped
vpf-10260: The file we are inserting the new item (294390 692752 0x129 DRCT (2), len 296, location 3800 entry count 65535, fsck need 0, format new) into has no StatData, insertion was skipped
vpf-10260: The file we are inserting the new item (294390 692752 0x129 DRCT (2), len 296, location 3800 entry count 65535, fsck need 0, format new) into has no StatData, insertion was skipped
100% left 0, 0 /sec
Flushing..finished
Leaves inserted item by item 97
Pass 3 (semantic):
####### Pass 3 #########
/binrebuild_semantic_pass: The entry [3636 189939] ("ls") in directory [2 3636] points to nowhere - is removed
/javarebuild_semantic_pass: The entry [107571 597512] ("jre") in directory [3636 107571] points to nowhere - is removed
vpf-10650: The directory [3636 107571] has the wrong size in the StatData
(72) - corrected to (48)
vpf-10650: The directory [2 3636] has the wrong size in the StatData (2920) - corrected to (2896)
/devrebuild_semantic_pass: The entry [6 554632] ("lvm") in directory [2 6] points to nowhere - is removedrebuild_semantic_pass: The entry [6 52003] ("lirc") in directory [2 6] points to nowhere - is removedrebuild_semantic_pass: The entry [6 72207] ("scsi") in directory [2 6] points to nowhere - is removedrebuild_semantic_pass: The entry [6 50738] ("xdb5") in directory [2 6] points to nowhere - is removedrebuild_semantic_pass: The entry [6 50739] ("xdb6") in directory [2 6] points to nowhere - is removedrebuild_semantic_pass: The entry [6 50740] ("xdb7") in directory [2 6] points to nowhere - is removedrebuild_semantic_pass: The entry [6 50741] ("xdb8") in directory [2 6] points to nowhere - is removed
...
... (here follow hundreds of directories and thousends of files, too, ... which I removed)
...
The entry [994339 994340] ("Entries") in directory [994335 19] updated to point to [994339 49]
/Entries.Extra.Oldrewrite_file: 1 items of file [994339 994343] moved to [994339 50]
The entry [994339 994343] ("Entries.Extra.Old") in directory [994335 19] updated to point to [994339 50]relocate_dir: Moving [994350 994773 0x0 SD (0)] to [994350 51 0x0 SD (0)]relocate_dir: Moving [994350 994773 0x1 DIR (3)] to [994350 51 0x1 DIR (3)] /994350_51get_next_directory_item: The entry ".." of the directory [994350
51] pointes to [285394 994350], instead of [2 18] - correctedrebuild_semantic_pass: The entry [994773 994783] ("Root") in directory
[994350 51] points to nowhere - is removedrebuild_semantic_pass: The entry [994773 994776] ("Entries.Extra") in directory [994350 51] points to nowhere - is removedrebuild_semantic_pass: The entry [994773 994782] ("Repository") in directory [994350 51] points to nowhere - is removedrebuild_semantic_pass: The entry [994773 994779] ("Entries.Extra.Old.bak") in directory [994350 51] points to nowhere - is removedrebuild_semantic_pass: The entry [994773 994784] ("Root.bak") in directory [994350 51] points to nowhere - is removedrebuild_semantic_pass: The entry [994773 994780] ("Entries.Old") in directory [994350 51] points to nowhere - is removedrebuild_semantic_pass: The entry [994773 994775] ("Entries.bak") in directory [994350 51] points to nowhere - is removedrebuild_semantic_pass: The entry [994773 994781] ("Entries.Old.bak") in directory [994350 51] points to nowhere - is removedrebuild_semantic_pass: The entry [994773 994778] ("Entries.Extra.Old") in directory [994350 51] points to nowhere - is removedrebuild_semantic_pass: The entry [994773 994777] ("Entries.Extra.bak") in directory [994350 51] points to nowhere - is removed
vpf-10650: The directory [994350 51] has the wrong size in the StatData (400)
- corrected to (72)
/994395_994396get_next_directory_item: The entry ".." of the directory
[994395 994396] pointes to [684030 994395], instead of [2 18] - corrected
/994415_994416get_next_directory_item: The entry ".." of the directory
[994415 994416] pointes to [684030 994415], instead of [2 18] - corrected
/994529_994754get_next_directory_item: The entry ".." of the directory
[994529 994754] pointes to [984867 994529], instead of [2 18] - corrected
Looking for lost files:
vpf-10670: The file [25 93091] has the wrong size in the StatData (30352) - corrected to (36864)
vpf-10680: The file [25 93091] has the wrong block count in the StatData (64)
- corrected to (72)
vpf-10680: The file [25 111982] has the wrong block count in the StatData (75408) - corrected to (16872)
vpf-10680: The file [3127 59061] has the wrong block count in the StatData
(8) - corrected to (0)
vpf-10680: The file [3128 72300] has the wrong block count in the StatData
(8) - corrected to (0)
vpf-10680: The file [3620 18950] has the wrong block count in the StatData
(8) - corrected to (0)
...
...
...rewrite_file: 2 items of file [994350 994764] moved to [994350 3108]rewrite_file: 2 items of file [994350 994765] moved to [994350 3109]rewrite_file: 2 items of file [994350 994766] moved to [994350 3110] Flushing..finished
Objects without names 18403
Empty lost dirs removed 384
Dirs linked to /lost+found: 2174
Dirs without stat data found 83
Files linked to /lost+found 16229
Objects having used objectids: 49
files fixed 47
dirs fixed 2
Pass 4 - finished done 1476, 37 /sec
Deleted unreachable items 716
Flushing..finished
Syncing..finished
###########
reiserfsck finished at Tue Feb 8 17:40:05 2005
###########
Hello
Quoted 14 lines · Christian Placzek
Hello,
a friend of mine shredded his data (70GB) when he tried to undelete an accidentally deleted file. He normally works with windoze. Therefore he didn't know he couldn't undelete a file on a reiserfs partition with ext2 undelete tool %-(
When he called me it was already too late. He had overwritten the superblock :-(I'm still trying to rescue the data. I can see them in the image using grep
or hexedit. But nothing I tried has been successful. My first steps were unmounting the partition, taking an image and working with a copy of this image using a loop back device.
Quoted 5 lines
All files have been retrieved but were removed by reiserfsck --check although the last output says that directories and files have been linked (see below). I tried with many combinations nearly all parameters of reiserfsck:
--fix-fixable --no-journal-available -S ...
have you tried
reiserfsck --rebuild-tree -S
?
If not, run it on newly created copy of shredded device.
Did you look at lost+found?
Quoted 369 lines
I mounted the image after each operation, but all I can see is:
root@marvin:/home/kris 0$ # mount -o ro
/dev/loop/0/mnt/temp1/root@marvin:/home/kris 0$ # ls -la/mnt/temp1/
total 21
drwxr-xr-x 3 root root 4096 Jan 20 11:36 .
drwxr-xr-x 39 root root 968 Feb 6 14:12 ..
drwx------ 2 root root 16384 Jan 20 11:36 lost+found
root@marvin:/home/kris 0$ # ls -la/mnt/temp1/lost+found/total 20
drwx------ 2 root root 16384 Jan 20 11:36 . drwxr-xr-x 3 root root 4096 Jan 20 11:36 .. root@marvin:/home/kris 0$ #Do you have any suggestions how to rescue the data?
Regards
KrisHere you see a typical output:
root@marvin:/home/kris 0$ # losetup
/dev/loop/0/mnt/temp/data.x.ddroot@marvin:/home/kris 0$ # reiserfsck/dev/loop/0--rebuild-tree reiserfsck 3.6.19 (2003 www.namesys.com)<snip>
Will rebuild the filesystem (
/dev/loop/0) tree
Will put log info to 'stdout'Do you want to run this program?[N/Yes] (note need to type Yes if you do):Yes
reiserfs_open: the reiserfs superblock cannot be found on/dev/loop/0. Failed to open the filesystem.If the partition table has not been changed, and the partition is valid and it really contains a reiserfs partition, then the superblock is corrupted and you need to run this utility with --rebuild-sb.
root@marvin:/home/kris 8$ # reiserfsck
/dev/loop/0--rebuild-sb reiserfsck 3.6.19 (2003 www.namesys.com)<snip>
Will check superblock and rebuild it if needed
Will put log info to 'stdout'
reiserfs_open: the reiserfs superblock cannot be found on/dev/loop/0.what the version of ReiserFS do you use[1-4]
(1) 3.6.x (2) >=3.5.9 (introduced in the middle of 1999) (if you use linux 2.2,choose this one)
(3) < 3.5.9 converted to new format (don't choose if unsure)
(4) < 3.5.9 (this is very old format, don't choose if unsure)
(X) exit
1Enter block size [4096]:
No journal device was specified. (If journal is not available, re-run with --no-journal-available option specified).
Is journal default? (y/n)[y]:Did you use resizer(y/n)[n]:
rebuild-sb: no uuid found, a new uuid was generated (7e253707-4fef-42aa-9785-b1cd079851af)rebuild-sb: You either have a corrupted journal or have just changed the start of the partition with some partition table editor. If you are sure that the start of the partition is ok, rebuild the journal header. Do you want to rebuild the journal header? (y/n)[n]: y
Reiserfs super block in block 16 on0x700of format 3.6 with standard journal Count of blocks on the device: 17659440
Number of bitmaps: 539
Blocksize: 4096
Free blocks (count of blocks - used [journal, bitmaps, data, reserved] blocks): 0
Root block: 0
Filesystem is NOT clean
Tree height: 0
Hash function used to sort names: not set
Objectid map size 0, 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:0x1:
some corruptions exist.sb_version: 2
inode generation number: 0
UUID: 7e253707-4fef-42aa-9785-b1cd079851af
LABEL:
Set flags in SB:
Is this ok ? (y/n)[n]: y
The fs may still be unconsistent. Run reiserfsck --check.root@marvin:/home/kris 1$ # reiserfsck
/dev/loop/0--check reiserfsck 3.6.19 (2003 www.namesys.com)<snip>
Will read-only check consistency of the filesystem on
/dev/loop/0Will put log info to 'stdout'
###########
reiserfsck --check started at Tue Feb 8 17:17:31 2005
###########
Replaying journal..
Reiserfs journal '/dev/loop/0' in blocks [18..8211]: 0 transactions replayed Zero bit found in on-disk bitmap after the last valid bit. Checking internal tree..Bad root block 0. (--rebuild-tree did not complete)
Aborted
root@marvin:/home/kris 134$ # reiserfsck/dev/loop/0-y --rebuild-tree reiserfsck 3.6.19 (2003 www.namesys.com)<snip>
Will rebuild the filesystem (
/dev/loop/0) tree
Will put log info to 'stdout'Do you want to run this program?[N/Yes] (note need to type Yes if you do):Yes Replaying journal..
Reiserfs journal '/dev/loop/0' in blocks [18..8211]: 0 transactions replayed Zero bit found in on-disk bitmap after the last valid bit. Fixed.
###########
reiserfsck --rebuild-tree started at Tue Feb 8 17:37:56 2005
###########Pass 0:
####### Pass 0 #######
Loading on-disk bitmap .. ok, 559628 blocks marked usedinit_source_bitmap: Bitmap 0 (of 32768 bits) is wrong - mark all blocks [0 - 32768] as usedinit_source_bitmap: Bitmap 1 (of 32768 bits) is wrong - mark all blocks
[32768 - 65536] as usedinit_source_bitmap: Bitmap 3 (of 32768 bits) is wrong - mark all blocks
[98304 - 131072] as usedinit_source_bitmap: Bitmap 5 (of 32768 bits) is wrong - mark all blocks [163840 - 196608] as usedinit_source_bitmap: Bitmap 7 (of 32768 bits) is wrong - mark all blocks [229376 - 262144] as usedinit_source_bitmap: Bitmap 9 (of 32768 bits) is wrong - mark all blocks [294912 - 327680] as usedinit_source_bitmap: Bitmap 25 (of 32768 bits) is wrong - mark all blocks [819200 - 851968] as usedinit_source_bitmap: Bitmap 27 (of 32768 bits) is wrong - mark all blocks [884736 - 917504] as usedinit_source_bitmap: Bitmap 49 (of 32768 bits) is wrong - mark all blocks [1605632 - 1638400] as usedinit_source_bitmap: Bitmap 81 (of 32768 bits) is wrong - mark all blocks [2654208 - 2686976] as usedinit_source_bitmap: Bitmap 125 (of 32768 bits) is wrong - mark all blocks [4096000 - 4128768] as usedinit_source_bitmap: Bitmap 243 (of 32768 bits) is wrong - mark all blocks [7962624 - 7995392] as usedinit_source_bitmap: Bitmap 343 (of 32768 bits) is wrong - mark all blocks [11239424 - 11272192] as used
Skipping 8749 blocks (super block, journal, bitmaps) 687599 blocks will be read
0%....20%....40%....60%....80%....100% left 0,
9549 /sec
103101 directory entries were hashed with "r5" hash.
Selected hash ("r5") does not match to the hash set in the super block (not set).
"r5" hash is selected
Flushing..finished
Read blocks (but not data blocks) 687599
Leaves among those 20621
Objectids found 114185Pass 1 (will try to insert 20621 leaves):
####### Pass 1 #######
Looking for allocable blocks .. finished
0%....20%....40%....60%....80%....100% left 0,
1718 /sec
Flushing..finished20621 leaves read 20524 inserted - pointers in indirect items pointing to metadata 3(zeroed)
97 not inserted
non-unique pointers in indirect items (zeroed) 1075
####### Pass 2 #######Pass 2:
0%....20%....40%....60%vpf-10260: The file we are inserting the new item (69291 693270x1DRCT (2), len 216, location 3880 entry count 65535, fsck need 0, format new) into has no StatData, insertion was skipped ....vpf-10260: The file we are inserting the new item (240148 2401500x1IND (1), len 1844, location 2252 entry count 0, fsck need 0, format new) into has no StatData, insertion was skipped
vpf-10260: The file we are inserting the new item (241304 3192110x43001IND (1), len 492, location 3604 entry count 0, fsck need 0, format new) into has no StatData, insertion was skipped
vpf-10260: The file we are inserting the new item (737518 7398130xe6001IND (1), len 688, location 3408 entry count 0, fsck need 0, format new) into has no StatData, insertion was skipped
80%vpf-10260: The file we are inserting the new item (737518 7398130xe6001IND (1), len 688, location 3408 entry count 0, fsck need 0, format new) into has no StatData, insertion was skipped
vpf-10260: The file we are inserting the new item (25 930140x1e1DRCT (2), len 1408, location 2688 entry count 65535, fsck need 0, format new) intohas no StatData, insertion was skipped
vpf-10260: The file we are inserting the new item (238343 3193060x3f4001IND (1), len 136, location 3960 entry count 0, fsck need 0, format new) into has no StatData, insertion was skipped
vpf-10260: The file we are inserting the new item (94077 1199200x1DRCT (2), len 456, location 3640 entry count 65535, fsck need 0, format new) into has no StatData, insertion was skipped
vpf-10260: The file we are inserting the new item (102491 2203970x179DRCT (2), len 1264, location 2832 entry count 65535, fsck need 0, format new)into has no StatData, insertion was skipped
.vpf-10260: The file we are inserting the new item (642448 7717210xcc1DRCT (2), len 520, location 3576 entry count 65535, fsck need 0, format new)into has no StatData, insertion was skipped
.vpf-10260: The file we are inserting the new item (294390 6927520x129DRCT (2), len 296, location 3800 entry count 65535, fsck need 0, format new)into has no StatData, insertion was skipped
vpf-10260: The file we are inserting the new item (294390 6927520x129DRCT (2), len 296, location 3800 entry count 65535, fsck need 0, format new) into has no StatData, insertion was skipped
vpf-10260: The file we are inserting the new item (294390 6927520x129DRCT (2), len 296, location 3800 entry count 65535, fsck need 0, format new) into has no StatData, insertion was skipped
.vpf-10260: The file we are inserting the new item (294390 6927520x129DRCT (2), len 296, location 3800 entry count 65535, fsck need 0, format new)into has no StatData, insertion was skipped
vpf-10260: The file we are inserting the new item (294390 6927520x129DRCT (2), len 296, location 3800 entry count 65535, fsck need 0, format new) into has no StatData, insertion was skipped
vpf-10260: The file we are inserting the new item (294390 6927520x129DRCT (2), len 296, location 3800 entry count 65535, fsck need 0, format new) into has no StatData, insertion was skipped
vpf-10260: The file we are inserting the new item (294390 6927520x129DRCT (2), len 296, location 3800 entry count 65535, fsck need 0, format new) into has no StatData, insertion was skipped
vpf-10260: The file we are inserting the new item (294390 6927520x129DRCT (2), len 296, location 3800 entry count 65535, fsck need 0, format new) into has no StatData, insertion was skipped
.vpf-10260: The file we are inserting the new item (294390 6927520x129DRCT (2), len 296, location 3800 entry count 65535, fsck need 0, format new)into has no StatData, insertion was skipped
vpf-10260: The file we are inserting the new item (294390 6927520x129DRCT (2), len 296, location 3800 entry count 65535, fsck need 0, format new) into has no StatData, insertion was skipped
vpf-10260: The file we are inserting the new item (294390 6927520x129DRCT (2), len 296, location 3800 entry count 65535, fsck need 0, format new) into has no StatData, insertion was skipped
vpf-10260: The file we are inserting the new item (294390 6927520x129DRCT (2), len 296, location 3800 entry count 65535, fsck need 0, format new) into has no StatData, insertion was skipped
100% left 0, 0 /sec
Flushing..finished
Leaves inserted item by item 97
Pass 3 (semantic):
####### Pass 3 #########
/binrebuild_semantic_pass: The entry [3636 189939] ("ls") in directory [2 3636] points to nowhere - is removed
/javarebuild_semantic_pass: The entry [107571 597512] ("jre") in directory [3636 107571] points to nowhere - is removed
vpf-10650: The directory [3636 107571] has the wrong size in the StatData
(72) - corrected to (48)
vpf-10650: The directory [2 3636] has the wrong size in the StatData (2920) - corrected to (2896)
/devrebuild_semantic_pass: The entry [6 554632] ("lvm") in directory [2 6] points to nowhere - is removedrebuild_semantic_pass: The entry [6 52003] ("lirc") in directory [2 6] points to nowhere - is removedrebuild_semantic_pass: The entry [6 72207] ("scsi") in directory [2 6] points to nowhere - is removedrebuild_semantic_pass: The entry [6 50738] ("xdb5") in directory [2 6] points to nowhere - is removedrebuild_semantic_pass: The entry [6 50739] ("xdb6") in directory [2 6] points to nowhere - is removedrebuild_semantic_pass: The entry [6 50740] ("xdb7") in directory [2 6] points to nowhere - is removedrebuild_semantic_pass: The entry [6 50741] ("xdb8") in directory [2 6] points to nowhere - is removed
...
... (here follow hundreds of directories and thousends of files, too, ... which I removed)
...
The entry [994339 994340] ("Entries") in directory [994335 19] updated to point to [994339 49]
/Entries.Extra.Oldrewrite_file: 1 items of file [994339 994343] moved to [994339 50]
The entry [994339 994343] ("Entries.Extra.Old") in directory [994335 19] updated to point to [994339 50]relocate_dir: Moving [994350 9947730x0SD (0)] to [994350 510x0SD (0)]relocate_dir: Moving [994350 9947730x1DIR (3)] to [994350 510x1DIR (3)] /994350_51get_next_directory_item: The entry ".." of the directory [994350
51] pointes to [285394 994350], instead of [2 18] - correctedrebuild_semantic_pass: The entry [994773 994783] ("Root") in directory
[994350 51] points to nowhere - is removedrebuild_semantic_pass: The entry [994773 994776] ("Entries.Extra") in directory [994350 51] points to nowhere - is removedrebuild_semantic_pass: The entry [994773 994782] ("Repository") in directory [994350 51] points to nowhere - is removedrebuild_semantic_pass: The entry [994773 994779] ("Entries.Extra.Old.bak") in directory [994350 51] points to nowhere - is removedrebuild_semantic_pass: The entry [994773 994784] ("Root.bak") in directory [994350 51] points to nowhere - is removedrebuild_semantic_pass: The entry [994773 994780] ("Entries.Old") in directory [994350 51] points to nowhere - is removedrebuild_semantic_pass: The entry [994773 994775] ("Entries.bak") in directory [994350 51] points to nowhere - is removedrebuild_semantic_pass: The entry [994773 994781] ("Entries.Old.bak") in directory [994350 51] points to nowhere - is removedrebuild_semantic_pass: The entry [994773 994778] ("Entries.Extra.Old") in directory [994350 51] points to nowhere - is removedrebuild_semantic_pass: The entry [994773 994777] ("Entries.Extra.bak") in directory [994350 51] points to nowhere - is removed
vpf-10650: The directory [994350 51] has the wrong size in the StatData (400)
- corrected to (72)
/994395_994396get_next_directory_item: The entry ".." of the directory
[994395 994396] pointes to [684030 994395], instead of [2 18] - corrected
/994415_994416get_next_directory_item: The entry ".." of the directory
[994415 994416] pointes to [684030 994415], instead of [2 18] - corrected
/994529_994754get_next_directory_item: The entry ".." of the directory
[994529 994754] pointes to [984867 994529], instead of [2 18] - corrected
Looking for lost files:
vpf-10670: The file [25 93091] has the wrong size in the StatData (30352) - corrected to (36864)
vpf-10680: The file [25 93091] has the wrong block count in the StatData (64)
- corrected to (72)
vpf-10680: The file [25 111982] has the wrong block count in the StatData (75408) - corrected to (16872)
vpf-10680: The file [3127 59061] has the wrong block count in the StatData
(8) - corrected to (0)
vpf-10680: The file [3128 72300] has the wrong block count in the StatData
(8) - corrected to (0)
vpf-10680: The file [3620 18950] has the wrong block count in the StatData
(8) - corrected to (0)
...
...
...rewrite_file: 2 items of file [994350 994764] moved to [994350 3108]rewrite_file: 2 items of file [994350 994765] moved to [994350 3109]rewrite_file: 2 items of file [994350 994766] moved to [994350 3110] Flushing..finished
Objects without names 18403
Empty lost dirs removed 384
Dirs linked to /lost+found: 2174
Dirs without stat data found 83
Files linked to /lost+found 16229
Objects having used objectids: 49
files fixed 47
dirs fixed 2
Pass 4 - finished done 1476, 37 /sec
Deleted unreachable items 716
Flushing..finished
Syncing..finished
###########
reiserfsck finished at Tue Feb 8 17:40:05 2005
###########
Quoted 22 lines · you
Hello
Quoted 14 lines · Christian Placzek
Hello,
a friend of mine shredded his data (70GB) when he tried to undelete an accidentally deleted file. He normally works with windoze. Therefore he didn't know he couldn't undelete a file on a reiserfs partition with ext2 undelete tool %-(
When he called me it was already too late. He had overwritten the superblock :-(I'm still trying to rescue the data. I can see them in the image using grep or hexedit. But nothing I tried has been successful. My first steps were unmounting the partition, taking an image and working with a copy of this image using a loop back device.
Quoted 4 lines
All files have been retrieved but were removed by reiserfsck --check although the last output says that directories and files have been linked (see below). I tried with many combinations nearly all parameters of
reiserfsck: --fix-fixable --no-journal-available -S ...
Quoted 5 lines
have you tried
reiserfsck --rebuild-tree -S
?
If not, run it on newly created copy of shredded device.
Yes, I did. The output of reiserfsck --rebuild-tree gave other numbers of linked directories/files. But I can't see them.
Quoted 1 line
Did you look at lost+found?
Shure, see below.
Quoted 370 lines
Quoted 370 lines
I mounted the image after each operation, but all I can see is:
root@marvin:/home/kris 0$ # mount -o ro
/dev/loop/0/mnt/temp1/root@marvin:/home/kris 0$ # ls -la/mnt/temp1/
total 21
drwxr-xr-x 3 root root 4096 Jan 20 11:36 .
drwxr-xr-x 39 root root 968 Feb 6 14:12 ..
drwx------ 2 root root 16384 Jan 20 11:36 lost+found
root@marvin:/home/kris 0$ # ls -la/mnt/temp1/lost+found/total 20
drwx------ 2 root root 16384 Jan 20 11:36 . drwxr-xr-x 3 root root 4096 Jan 20 11:36 .. root@marvin:/home/kris 0$ #Do you have any suggestions how to rescue the data?
Regards
KrisHere you see a typical output:
root@marvin:/home/kris 0$ # losetup
/dev/loop/0/mnt/temp/data.x.ddroot@marvin:/home/kris 0$ # reiserfsck/dev/loop/0--rebuild-tree reiserfsck 3.6.19 (2003 www.namesys.com)<snip>
Will rebuild the filesystem (
/dev/loop/0) tree
Will put log info to 'stdout'Do you want to run this program?[N/Yes] (note need to type Yes if you do):Yes
reiserfs_open: the reiserfs superblock cannot be found on/dev/loop/0. Failed to open the filesystem.If the partition table has not been changed, and the partition is valid and it really contains a reiserfs partition, then the superblock is corrupted and you need to run this utility with --rebuild-sb.
root@marvin:/home/kris 8$ # reiserfsck
/dev/loop/0--rebuild-sb reiserfsck 3.6.19 (2003 www.namesys.com)<snip>
Will check superblock and rebuild it if needed
Will put log info to 'stdout'
reiserfs_open: the reiserfs superblock cannot be found on/dev/loop/0.what the version of ReiserFS do you use[1-4]
(1) 3.6.x (2) >=3.5.9 (introduced in the middle of 1999) (if you use linux2.2, choose this one)
(3) < 3.5.9 converted to new format (don't choose if unsure)
(4) < 3.5.9 (this is very old format, don't choose if unsure)
(X) exit
1Enter block size [4096]:
No journal device was specified. (If journal is not available, re-run with --no-journal-available option specified).
Is journal default? (y/n)[y]:Did you use resizer(y/n)[n]:
rebuild-sb: no uuid found, a new uuid was generated (7e253707-4fef-42aa-9785-b1cd079851af)rebuild-sb: You either have a corrupted journal or have just changed the start of the partition with some partition table editor. If you are sure that the start of the partition is ok, rebuild the journal header. Do you want to rebuild the journal header? (y/n)[n]: y Reiserfs super block in block 16 on
0x700of format 3.6 with standard journal Count of blocks on the device: 17659440
Number of bitmaps: 539
Blocksize: 4096
Free blocks (count of blocks - used [journal, bitmaps, data, reserved] blocks): 0
Root block: 0
Filesystem is NOT clean
Tree height: 0
Hash function used to sort names: not set
Objectid map size 0, max 972
Journal parameters:Device [0x0] Magic [0x0] Size 8193 blocks (including 1 for journal header) (first block18) Max transaction length 1024 blocks
Max batch size 900 blocks
Max commit age 30
Blocks reserved by journal: 0
Fs state field:0x1:
some corruptions exist.sb_version: 2
inode generation number: 0
UUID: 7e253707-4fef-42aa-9785-b1cd079851af LABEL:
Set flags in SB:
Is this ok ? (y/n)[n]: y
The fs may still be unconsistent. Run reiserfsck --check.root@marvin:/home/kris 1$ # reiserfsck
/dev/loop/0--check reiserfsck 3.6.19 (2003 www.namesys.com)<snip>
Will read-only check consistency of the filesystem on
/dev/loop/0Will put log info to 'stdout'
###########
reiserfsck --check started at Tue Feb 8 17:17:31 2005
###########
Replaying journal..
Reiserfs journal '/dev/loop/0' in blocks [18..8211]: 0 transactions replayed Zero bit found in on-disk bitmap after the last valid bit. Checking internal tree..Bad root block 0. (--rebuild-tree did not complete)
Aborted
root@marvin:/home/kris 134$ # reiserfsck/dev/loop/0-y --rebuild-tree reiserfsck 3.6.19 (2003 www.namesys.com)<snip>
Will rebuild the filesystem (
/dev/loop/0) tree
Will put log info to 'stdout'Do you want to run this program?[N/Yes] (note need to type Yes if you do):Yes Replaying journal..
Reiserfs journal '/dev/loop/0' in blocks [18..8211]: 0 transactions replayed Zero bit found in on-disk bitmap after the last valid bit. Fixed. ###########
reiserfsck --rebuild-tree started at Tue Feb 8 17:37:56 2005
###########Pass 0:
####### Pass 0 #######
Loading on-disk bitmap .. ok, 559628 blocks marked usedinit_source_bitmap: Bitmap 0 (of 32768 bits) is wrong - mark all blocks [0 - 32768] as usedinit_source_bitmap: Bitmap 1 (of 32768 bits) is wrong - mark all blocks
[32768 - 65536] as usedinit_source_bitmap: Bitmap 3 (of 32768 bits) is wrong - mark all blocks
[98304 - 131072] as usedinit_source_bitmap: Bitmap 5 (of 32768 bits) is wrong - mark all blocks [163840 - 196608] as usedinit_source_bitmap: Bitmap 7 (of 32768 bits) is wrong - mark all blocks [229376 - 262144] as usedinit_source_bitmap: Bitmap 9 (of 32768 bits) is wrong - mark all blocks [294912 - 327680] as usedinit_source_bitmap: Bitmap 25 (of 32768 bits) is wrong - mark all blocks [819200 - 851968] as usedinit_source_bitmap: Bitmap 27 (of 32768 bits) is wrong - mark all blocks [884736 - 917504] as usedinit_source_bitmap: Bitmap 49 (of 32768 bits) is wrong - mark all blocks [1605632 - 1638400] as usedinit_source_bitmap: Bitmap 81 (of 32768 bits) is wrong - mark all blocks [2654208 - 2686976] as usedinit_source_bitmap: Bitmap 125 (of 32768 bits) is wrong - mark all blocks [4096000 - 4128768] as usedinit_source_bitmap: Bitmap 243 (of 32768 bits) is wrong - mark all blocks [7962624 - 7995392] as usedinit_source_bitmap: Bitmap 343 (of 32768 bits) is wrong - mark all blocks [11239424 - 11272192] as used
Skipping 8749 blocks (super block, journal, bitmaps) 687599 blocks will be read
0%....20%....40%....60%....80%....100% left 0,
9549 /sec
103101 directory entries were hashed with "r5" hash.
Selected hash ("r5") does not match to the hash set in the super block (not set).
"r5" hash is selected
Flushing..finished
Read blocks (but not data blocks) 687599
Leaves among those 20621
Objectids found 114185Pass 1 (will try to insert 20621 leaves):
####### Pass 1 #######
Looking for allocable blocks .. finished
0%....20%....40%....60%....80%....100% left 0,
1718 /sec
Flushing..finished20621 leaves read 20524 inserted - pointers in indirect items pointing to metadata3 (zeroed)
97 not inserted
non-unique pointers in indirect items (zeroed) 1075
####### Pass 2 #######Pass 2:
0%....20%....40%....60%vpf-10260: The file we are inserting the new item (69291 693270x1DRCT (2), len 216, location 3880 entry count 65535, fsck need 0, format new) into has no StatData, insertion was skipped ....vpf-10260: The file we are inserting the new item (240148 2401500x1IND (1), len 1844, location 2252 entry count 0, fsck need 0, format new) into has no StatData, insertion was skipped
vpf-10260: The file we are inserting the new item (241304 3192110x43001IND (1), len 492, location 3604 entry count 0, fsck need 0, format new) into has no StatData, insertion was skipped
vpf-10260: The file we are inserting the new item (737518 7398130xe6001IND (1), len 688, location 3408 entry count 0, fsck need 0, format new) into has no StatData, insertion was skipped
80%vpf-10260: The file we are inserting the new item (737518 7398130xe6001IND (1), len 688, location 3408 entry count 0, fsck need 0, format new) into has no StatData, insertion was skipped
vpf-10260: The file we are inserting the new item (25 930140x1e1DRCT (2), len 1408, location 2688 entry count 65535, fsck need 0, format new) intohas no StatData, insertion was skipped
vpf-10260: The file we are inserting the new item (238343 3193060x3f4001IND (1), len 136, location 3960 entry count 0, fsck need 0, format new) into has no StatData, insertion was skipped
vpf-10260: The file we are inserting the new item (94077 1199200x1DRCT (2), len 456, location 3640 entry count 65535, fsck need 0, format new) into has no StatData, insertion was skipped
vpf-10260: The file we are inserting the new item (102491 2203970x179DRCT (2), len 1264, location 2832 entry count 65535, fsck need 0, format new)into has no StatData, insertion was skipped
.vpf-10260: The file we are inserting the new item (642448 7717210xcc1DRCT (2), len 520, location 3576 entry count 65535, fsck need 0, format new)into has no StatData, insertion was skipped
.vpf-10260: The file we are inserting the new item (294390 6927520x129DRCT (2), len 296, location 3800 entry count 65535, fsck need 0, format new)into has no StatData, insertion was skipped
vpf-10260: The file we are inserting the new item (294390 6927520x129DRCT (2), len 296, location 3800 entry count 65535, fsck need 0, format new) into has no StatData, insertion was skipped
vpf-10260: The file we are inserting the new item (294390 6927520x129DRCT (2), len 296, location 3800 entry count 65535, fsck need 0, format new) into has no StatData, insertion was skipped
.vpf-10260: The file we are inserting the new item (294390 6927520x129DRCT (2), len 296, location 3800 entry count 65535, fsck need 0, format new)into has no StatData, insertion was skipped
vpf-10260: The file we are inserting the new item (294390 6927520x129DRCT (2), len 296, location 3800 entry count 65535, fsck need 0, format new) into has no StatData, insertion was skipped
vpf-10260: The file we are inserting the new item (294390 6927520x129DRCT (2), len 296, location 3800 entry count 65535, fsck need 0, format new) into has no StatData, insertion was skipped
vpf-10260: The file we are inserting the new item (294390 6927520x129DRCT (2), len 296, location 3800 entry count 65535, fsck need 0, format new) into has no StatData, insertion was skipped
vpf-10260: The file we are inserting the new item (294390 6927520x129DRCT (2), len 296, location 3800 entry count 65535, fsck need 0, format new) into has no StatData, insertion was skipped
.vpf-10260: The file we are inserting the new item (294390 6927520x129DRCT (2), len 296, location 3800 entry count 65535, fsck need 0, format new)into has no StatData, insertion was skipped
vpf-10260: The file we are inserting the new item (294390 6927520x129DRCT (2), len 296, location 3800 entry count 65535, fsck need 0, format new) into has no StatData, insertion was skipped
vpf-10260: The file we are inserting the new item (294390 6927520x129DRCT (2), len 296, location 3800 entry count 65535, fsck need 0, format new) into has no StatData, insertion was skipped
vpf-10260: The file we are inserting the new item (294390 6927520x129DRCT (2), len 296, location 3800 entry count 65535, fsck need 0, format new) into has no StatData, insertion was skipped
100% left 0, 0 /sec
Flushing..finished
Leaves inserted item by item 97
Pass 3 (semantic):
####### Pass 3 #########
/binrebuild_semantic_pass: The entry [3636 189939] ("ls") in directory [2 3636] points to nowhere - is removed /javarebuild_semantic_pass: The entry [107571 597512] ("jre") in directory [3636 107571] points to nowhere - is removed
vpf-10650: The directory [3636 107571] has the wrong size in the StatData
(72) - corrected to (48)
vpf-10650: The directory [2 3636] has the wrong size in the StatData (2920) - corrected to (2896)
/devrebuild_semantic_pass: The entry [6 554632] ("lvm") in directory [2 6] points to nowhere - is removedrebuild_semantic_pass: The entry [6 52003] ("lirc") in directory [2 6] points to nowhere - is removedrebuild_semantic_pass: The entry [6 72207] ("scsi") in directory [2 6] points to nowhere - is removedrebuild_semantic_pass: The entry [6 50738] ("xdb5") in directory [2 6] points to nowhere - is removedrebuild_semantic_pass: The entry [6 50739] ("xdb6") in directory [2 6] points to nowhere - is removedrebuild_semantic_pass: The entry [6 50740] ("xdb7") in directory [2 6] points to nowhere - is removedrebuild_semantic_pass: The entry [6 50741] ("xdb8") in directory [2 6] points to nowhere - is removed
...
... (here follow hundreds of directories and thousends of files, too, ... which I removed)
...
The entry [994339 994340] ("Entries") in directory [994335 19] updated to point to [994339 49]
/Entries.Extra.Oldrewrite_file: 1 items of file [994339 994343] moved to [994339 50]
The entry [994339 994343] ("Entries.Extra.Old") in directory [994335 19] updated to point to [994339 50]relocate_dir: Moving [994350 9947730x0SD (0)] to [994350 510x0SD (0)]relocate_dir: Moving [994350 9947730x1DIR (3)] to [994350 510x1DIR (3)] /994350_51get_next_directory_item: The entry ".." of the directory [994350 51] pointes to [285394 994350], instead of [2 18] - correctedrebuild_semantic_pass: The entry [994773 994783] ("Root") in directory
[994350 51] points to nowhere - is removedrebuild_semantic_pass: The entry [994773 994776] ("Entries.Extra") in directory [994350 51] points to nowhere - is removedrebuild_semantic_pass: The entry [994773 994782] ("Repository") in directory [994350 51] points to nowhere - is removedrebuild_semantic_pass: The entry [994773 994779] ("Entries.Extra.Old.bak") in directory [994350 51] points to nowhere - is removedrebuild_semantic_pass: The entry [994773 994784] ("Root.bak") in directory [994350 51] points to nowhere - is removedrebuild_semantic_pass: The entry [994773 994780] ("Entries.Old") in directory [994350 51] points to nowhere - is removedrebuild_semantic_pass: The entry [994773 994775] ("Entries.bak") in directory [994350 51] points to nowhere - is removedrebuild_semantic_pass: The entry [994773 994781] ("Entries.Old.bak") in directory [994350 51] points to nowhere - is removedrebuild_semantic_pass: The entry [994773 994778] ("Entries.Extra.Old") in directory [994350 51] points to nowhere - is removedrebuild_semantic_pass: The entry [994773 994777] ("Entries.Extra.bak") in directory [994350 51] points to nowhere - is removed
vpf-10650: The directory [994350 51] has the wrong size in the StatData
(400) - corrected to (72) /994395_994396get_next_directory_item: The entry ".." of the directory [994395 994396] pointes to [684030 994395], instead of [2 18] -
corrected /994415_994416get_next_directory_item: The entry ".." of the directory [994415 994416] pointes to [684030 994415], instead of [2 18] - corrected /994529_994754get_next_directory_item: The entry ".." of the directory [994529 994754] pointes to [984867 994529], instead of [2 18] - corrected Looking for lost files:
vpf-10670: The file [25 93091] has the wrong size in the StatData (30352)
- corrected to (36864)
vpf-10680: The file [25 93091] has the wrong block count in the StatData
(64) - corrected to (72)
vpf-10680: The file [25 111982] has the wrong block count in the StatData (75408) - corrected to (16872)
vpf-10680: The file [3127 59061] has the wrong block count in the StatData (8) - corrected to (0)
vpf-10680: The file [3128 72300] has the wrong block count in the StatData (8) - corrected to (0)
vpf-10680: The file [3620 18950] has the wrong block count in the StatData (8) - corrected to (0)
...
...
...rewrite_file: 2 items of file [994350 994764] moved to [994350 3108]rewrite_file: 2 items of file [994350 994765] moved to [994350 3109]rewrite_file: 2 items of file [994350 994766] moved to [994350 3110] Flushing..finished
Objects without names 18403
Empty lost dirs removed 384
Dirs linked to /lost+found: 2174
Dirs without stat data found 83
Files linked to /lost+found 16229
Objects having used objectids: 49
files fixed 47
dirs fixed 2
Pass 4 - finished done 1476, 37 /sec
Deleted unreachable items 716
Flushing..finished
Syncing..finished
###########
reiserfsck finished at Tue Feb 8 17:40:05 2005
###########
Signature · 16 lines
Mit freundlichen Grüßen C. Placzek ---------------------------------------------- Dipl.-Ing. Christian Placzek Email: [email protected] Anschrift: Von-Görschen-Str. 19 52066 Aachen Tel.: +49 241 9964681 Fax: +49 241 514388 Mobil:+49 179 1083808
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 32 lines · you
Quoted 31 lines · Christian Placzek
Quoted 22 lines · you
Hello
Quoted 14 lines · Christian Placzek
Hello,
a friend of mine shredded his data (70GB) when he tried to undelete an accidentally deleted file. He normally works with windoze. Therefore he didn't know he couldn't undelete a file on a reiserfs partition with ext2 undelete tool %-(
When he called me it was already too late. He had overwritten the superblock :-(I'm still trying to rescue the data. I can see them in the image using grep or hexedit. But nothing I tried has been successful. My first steps were unmounting the partition, taking an image and working with a copy of this image using a loop back device.
Quoted 4 lines
All files have been retrieved but were removed by reiserfsck --check although the last output says that directories and files have been linked (see below). I tried with many combinations nearly all parameters of reiserfsck: --fix-fixable --no-journal-available -S ...
Quoted 4 lines
have you tried
reiserfsck --rebuild-tree -S
?
If not, run it on newly created copy of shredded device.Yes, I did. The output of reiserfsck --rebuild-tree gave other numbers of linked directories/files. But I can't see them.
Quoted 6 lines
Quoted 3 lines
Quoted 1 line
Did you look at lost+found?
Shure, see below.
Sorry, but what does df -T say?
Does it say that reiserfs filesystem is mounted on/mnt/temp1?
No, it replied:
# /dev/loop/0 ext2 69529276 20 65997368 1% /mnt/temp1
If I force mount with -t reiserfs it says:
root@marvin:/home/kris 0$ # mount -o ro -t reiserfs /dev/loop/0 /mnt/temp1/
mount: wrong fs type, bad option, bad superblock on /dev/loop/0,
or too many mounted file systems
Thanks, this is a good hint, but I don't know how to change the identifier of the filesystem. I know that normally mkfs.* does this task, but my friend's overwriting of the superblock probably has changed the identifier of the filesystem. Is it possible to apply mkreiserfs on the image whithout running the risk to lose any data?
Thanks
Kris
Quoted 373 lines
Thanks,
Lena.Quoted 369 lines
Quoted 369 lines
Quoted 369 lines
I mounted the image after each operation, but all I can see is:
root@marvin:/home/kris 0$ # mount -o ro
/dev/loop/0/mnt/temp1/root@marvin:/home/kris 0$ # ls -la/mnt/temp1/
total 21
drwxr-xr-x 3 root root 4096 Jan 20 11:36 .
drwxr-xr-x 39 root root 968 Feb 6 14:12 ..
drwx------ 2 root root 16384 Jan 20 11:36 lost+found
root@marvin:/home/kris 0$ # ls -la/mnt/temp1/lost+found/total 20
drwx------ 2 root root 16384 Jan 20 11:36 . drwxr-xr-x 3 root root 4096 Jan 20 11:36 .. root@marvin:/home/kris 0$ #Do you have any suggestions how to rescue the data?
Regards
KrisHere you see a typical output:
root@marvin:/home/kris 0$ # losetup
/dev/loop/0/mnt/temp/data.x.ddroot@marvin:/home/kris 0$ # reiserfsck/dev/loop/0--rebuild-tree reiserfsck 3.6.19 (2003 www.namesys.com)<snip>
Will rebuild the filesystem (
/dev/loop/0) tree
Will put log info to 'stdout'Do you want to run this program?[N/Yes] (note need to type Yes if you do):Yes
reiserfs_open: the reiserfs superblock cannot be found on/dev/loop/0. Failed to open the filesystem.If the partition table has not been changed, and the partition is valid and it really contains a reiserfs partition, then the superblock is corrupted and you need to run this utility with --rebuild-sb.
root@marvin:/home/kris 8$ # reiserfsck
/dev/loop/0--rebuild-sb reiserfsck 3.6.19 (2003 www.namesys.com)<snip>
Will check superblock and rebuild it if needed
Will put log info to 'stdout'
reiserfs_open: the reiserfs superblock cannot be found on/dev/loop/0.what the version of ReiserFS do you use[1-4]
(1) 3.6.x (2) >=3.5.9 (introduced in the middle of 1999) (if you use linux2.2, choose this one)
(3) < 3.5.9 converted to new format (don't choose if unsure)
(4) < 3.5.9 (this is very old format, don't choose if unsure)
(X) exit
1Enter block size [4096]:
No journal device was specified. (If journal is not available, re-run with --no-journal-available option specified).
Is journal default? (y/n)[y]:Did you use resizer(y/n)[n]:
rebuild-sb: no uuid found, a new uuid was generated (7e253707-4fef-42aa-9785-b1cd079851af)rebuild-sb: You either have a corrupted journal or have just changed the start of the partition with some partition table editor. If you are sure that the start of the partition is ok, rebuild the journal header. Do you want to rebuild the journal header? (y/n)[n]: y Reiserfs super block in block 16 on
0x700of format 3.6 with standard journal Count of blocks on the device: 17659440
Number of bitmaps: 539
Blocksize: 4096
Free blocks (count of blocks - used [journal, bitmaps, data, reserved] blocks): 0
Root block: 0
Filesystem is NOT clean
Tree height: 0
Hash function used to sort names: not set
Objectid map size 0, max 972
Journal parameters:Device [0x0] Magic [0x0] Size 8193 blocks (including 1 for journal header) (first block18) Max transaction length 1024 blocks
Max batch size 900 blocks
Max commit age 30
Blocks reserved by journal: 0
Fs state field:0x1:
some corruptions exist.sb_version: 2
inode generation number: 0
UUID: 7e253707-4fef-42aa-9785-b1cd079851af LABEL:
Set flags in SB:
Is this ok ? (y/n)[n]: y
The fs may still be unconsistent. Run reiserfsck --check.root@marvin:/home/kris 1$ # reiserfsck
/dev/loop/0--check reiserfsck 3.6.19 (2003 www.namesys.com)<snip>
Will read-only check consistency of the filesystem on
/dev/loop/0Will put log info to 'stdout'
###########
reiserfsck --check started at Tue Feb 8 17:17:31 2005
###########
Replaying journal..
Reiserfs journal '/dev/loop/0' in blocks [18..8211]: 0 transactions replayed Zero bit found in on-disk bitmap after the last valid bit. Checking internal tree..Bad root block 0. (--rebuild-tree did not complete)
Aborted
root@marvin:/home/kris 134$ # reiserfsck/dev/loop/0-y --rebuild-tree reiserfsck 3.6.19 (2003 www.namesys.com)<snip>
Will rebuild the filesystem (
/dev/loop/0) tree
Will put log info to 'stdout'Do you want to run this program?[N/Yes] (note need to type Yes if you do):Yes Replaying journal..
Reiserfs journal '/dev/loop/0' in blocks [18..8211]: 0 transactions replayed Zero bit found in on-disk bitmap after the last valid bit. Fixed. ###########
reiserfsck --rebuild-tree started at Tue Feb 8 17:37:56 2005
###########Pass 0:
####### Pass 0 #######
Loading on-disk bitmap .. ok, 559628 blocks marked usedinit_source_bitmap: Bitmap 0 (of 32768 bits) is wrong - mark all blocks [0 - 32768] as usedinit_source_bitmap: Bitmap 1 (of 32768 bits) is wrong - mark all blocks [32768 - 65536] as usedinit_source_bitmap: Bitmap 3 (of 32768 bits) is wrong - mark all blocks [98304 - 131072] as usedinit_source_bitmap: Bitmap 5 (of 32768 bits) is wrong - mark all blocks [163840 - 196608] as usedinit_source_bitmap: Bitmap 7 (of 32768 bits) is wrong - mark all blocks [229376 - 262144] as usedinit_source_bitmap: Bitmap 9 (of 32768 bits) is wrong - mark all blocks [294912 - 327680] as usedinit_source_bitmap: Bitmap 25 (of 32768 bits) is wrong - mark all blocks [819200 - 851968] as usedinit_source_bitmap: Bitmap 27 (of 32768 bits) is wrong - mark all blocks [884736 - 917504] as usedinit_source_bitmap: Bitmap 49 (of 32768 bits) is wrong - mark all blocks [1605632 - 1638400] as usedinit_source_bitmap: Bitmap 81 (of 32768 bits) is wrong - mark all blocks [2654208 - 2686976] as usedinit_source_bitmap: Bitmap 125 (of 32768 bits) is wrong - mark all blocks [4096000 - 4128768] as usedinit_source_bitmap: Bitmap 243 (of 32768 bits) is wrong - mark all blocks [7962624 - 7995392] as usedinit_source_bitmap: Bitmap 343 (of 32768 bits) is wrong - mark all blocks [11239424 - 11272192] as used
Skipping 8749 blocks (super block, journal, bitmaps) 687599 blocks will be read
0%....20%....40%....60%....80%....100% left 0,
9549 /sec
103101 directory entries were hashed with "r5" hash. Selected hash ("r5") does not match to the hash set in the super block (not set).
"r5" hash is selected
Flushing..finished
Read blocks (but not data blocks) 687599
Leaves among those 20621
Objectids found 114185Pass 1 (will try to insert 20621 leaves):
####### Pass 1 #######
Looking for allocable blocks .. finished
0%....20%....40%....60%....80%....100% left 0,
1718 /sec
Flushing..finished20621 leaves read 20524 inserted - pointers in indirect items pointing tometadata 3 (zeroed)
97 not inserted
non-unique pointers in indirect items (zeroed) 1075
####### Pass 2 #######Pass 2:
0%....20%....40%....60%vpf-10260: The file we are inserting the new item (69291 693270x1DRCT (2), len 216, location 3880 entry count 65535, fsck need 0, format new) into has no StatData, insertion was skipped ....vpf-10260: The file we are inserting the new item (240148 2401500x1IND (1), len 1844, location 2252 entry count 0, fsck need 0, format new) into has no StatData, insertion was skipped
vpf-10260: The file we are inserting the new item (241304 3192110x43001IND (1), len 492, location 3604 entry count 0, fsck need 0, format new) into has no StatData, insertion was skipped
vpf-10260: The file we are inserting the new item (737518 7398130xe6001IND (1), len 688, location 3408 entry count 0, fsck need 0, format new) into has no StatData, insertion was skipped
80%vpf-10260: The file we are inserting the new item (737518 7398130xe6001IND (1), len 688, location 3408 entry count 0, fsck need 0, format new) into has no StatData, insertion was skipped
vpf-10260: The file we are inserting the new item (25 930140x1e1DRCT (2), len 1408, location 2688 entry count 65535, fsck need 0, format new) intohas no StatData, insertion was skipped
vpf-10260: The file we are inserting the new item (238343 3193060x3f4001IND (1), len 136, location 3960 entry count 0, fsck need 0, format new) into has no StatData, insertion was skipped
vpf-10260: The file we are inserting the new item (94077 1199200x1DRCT (2), len 456, location 3640 entry count 65535, fsck need 0, format new) into has no StatData, insertion was skipped
vpf-10260: The file we are inserting the new item (102491 2203970x179DRCT (2), len 1264, location 2832 entry count 65535, fsck need 0, format new)into has no StatData, insertion was skipped
.vpf-10260: The file we are inserting the new item (642448 7717210xcc1DRCT (2), len 520, location 3576 entry count 65535, fsck need 0, format new)into has no StatData, insertion was skipped
.vpf-10260: The file we are inserting the new item (294390 6927520x129DRCT (2), len 296, location 3800 entry count 65535, fsck need 0, format new)into has no StatData, insertion was skipped
vpf-10260: The file we are inserting the new item (294390 6927520x129DRCT (2), len 296, location 3800 entry count 65535, fsck need 0, format new) into has no StatData, insertion was skipped
vpf-10260: The file we are inserting the new item (294390 6927520x129DRCT (2), len 296, location 3800 entry count 65535, fsck need 0, format new) into has no StatData, insertion was skipped
.vpf-10260: The file we are inserting the new item (294390 6927520x129DRCT (2), len 296, location 3800 entry count 65535, fsck need 0, format new)into has no StatData, insertion was skipped
vpf-10260: The file we are inserting the new item (294390 6927520x129DRCT (2), len 296, location 3800 entry count 65535, fsck need 0, format new) into has no StatData, insertion was skipped
vpf-10260: The file we are inserting the new item (294390 6927520x129DRCT (2), len 296, location 3800 entry count 65535, fsck need 0, format new) into has no StatData, insertion was skipped
vpf-10260: The file we are inserting the new item (294390 6927520x129DRCT (2), len 296, location 3800 entry count 65535, fsck need 0, format new) into has no StatData, insertion was skipped
vpf-10260: The file we are inserting the new item (294390 6927520x129DRCT (2), len 296, location 3800 entry count 65535, fsck need 0, format new) into has no StatData, insertion was skipped
.vpf-10260: The file we are inserting the new item (294390 6927520x129DRCT (2), len 296, location 3800 entry count 65535, fsck need 0, format new)into has no StatData, insertion was skipped
vpf-10260: The file we are inserting the new item (294390 6927520x129DRCT (2), len 296, location 3800 entry count 65535, fsck need 0, format new) into has no StatData, insertion was skipped
vpf-10260: The file we are inserting the new item (294390 6927520x129DRCT (2), len 296, location 3800 entry count 65535, fsck need 0, format new) into has no StatData, insertion was skipped
vpf-10260: The file we are inserting the new item (294390 6927520x129DRCT (2), len 296, location 3800 entry count 65535, fsck need 0, format new) into has no StatData, insertion was skipped
100% left 0, 0 /sec
Flushing..finished
Leaves inserted item by item 97
Pass 3 (semantic):
####### Pass 3 #########
/binrebuild_semantic_pass: The entry [3636 189939] ("ls") in directory [2 3636] points to nowhere - is removed /javarebuild_semantic_pass: The entry [107571 597512] ("jre") in directory [3636 107571] points to nowhere - is removed
vpf-10650: The directory [3636 107571] has the wrong size in the StatData (72) - corrected to (48)
vpf-10650: The directory [2 3636] has the wrong size in the StatData (2920) - corrected to (2896)
/devrebuild_semantic_pass: The entry [6 554632] ("lvm") in directory [2 6] points to nowhere - is removedrebuild_semantic_pass: The entry [6 52003] ("lirc") in directory [2 6] points to nowhere - is removedrebuild_semantic_pass: The entry [6 72207] ("scsi") in directory [2 6] points to nowhere - is removedrebuild_semantic_pass: The entry [6 50738] ("xdb5") in directory [2 6] points to nowhere - is removedrebuild_semantic_pass: The entry [6 50739] ("xdb6") in directory [2 6] points to nowhere - is removedrebuild_semantic_pass: The entry [6 50740] ("xdb7") in directory [2 6] points to nowhere - is removedrebuild_semantic_pass: The entry [6 50741] ("xdb8") in directory [2 6] points to nowhere - is removed
...
... (here follow hundreds of directories and thousends of files, too, ... which I removed)
...
The entry [994339 994340] ("Entries") in directory [994335 19] updated to point to [994339 49]
/Entries.Extra.Oldrewrite_file: 1 items of file [994339 994343] moved to [994339 50]
The entry [994339 994343] ("Entries.Extra.Old") in directory [994335 19] updated to point to [994339 50]relocate_dir: Moving [994350 9947730x0SD (0)] to [994350 510x0SD (0)]relocate_dir: Moving [994350 9947730x1DIR (3)] to [994350 510x1DIR (3)] /994350_51get_next_directory_item: The entry ".." of the directory [994350 51] pointes to [285394 994350], instead of [2 18] - correctedrebuild_semantic_pass: The entry [994773 994783] ("Root") in directory [994350 51] points to nowhere - is removedrebuild_semantic_pass: The entry [994773 994776] ("Entries.Extra") in directory [994350 51] points to nowhere - is removedrebuild_semantic_pass: The entry [994773 994782] ("Repository") in directory [994350 51] points to nowhere - is removedrebuild_semantic_pass: The entry [994773 994779] ("Entries.Extra.Old.bak") in directory [994350 51] points to nowhere - is removedrebuild_semantic_pass: The entry [994773 994784] ("Root.bak") in directory [994350 51] points to nowhere - is removedrebuild_semantic_pass: The entry [994773 994780] ("Entries.Old") in directory [994350 51] points to nowhere - is removedrebuild_semantic_pass: The entry [994773 994775] ("Entries.bak") in directory [994350 51] points to nowhere - is removedrebuild_semantic_pass: The entry [994773 994781] ("Entries.Old.bak") in directory [994350 51] points to nowhere - is removedrebuild_semantic_pass: The entry [994773 994778] ("Entries.Extra.Old") in directory [994350 51] points to nowhere - is removedrebuild_semantic_pass: The entry [994773 994777] ("Entries.Extra.bak") in directory [994350 51] points to nowhere - is removed
vpf-10650: The directory [994350 51] has the wrong size in the StatData
(400) - corrected to (72) /994395_994396get_next_directory_item: The entry ".." of the directory [994395 994396] pointes to [684030 994395], instead of [2 18] - corrected /994415_994416get_next_directory_item: The entry ".." of the directory [994415 994416] pointes to [684030 994415], instead of [2 18]
- corrected /994529_994754get_next_directory_item: The entry ".." of the directory [994529 994754] pointes to [984867 994529], instead of [2 18] - corrected Looking for lost files:
vpf-10670: The file [25 93091] has the wrong size in the StatData (30352) - corrected to (36864)
vpf-10680: The file [25 93091] has the wrong block count in the StatData
(64) - corrected to (72)
vpf-10680: The file [25 111982] has the wrong block count in the StatData (75408) - corrected to (16872)
vpf-10680: The file [3127 59061] has the wrong block count in the StatData (8) - corrected to (0)
vpf-10680: The file [3128 72300] has the wrong block count in the StatData (8) - corrected to (0)
vpf-10680: The file [3620 18950] has the wrong block count in the StatData (8) - corrected to (0)
...
...
...rewrite_file: 2 items of file [994350 994764] moved to [994350 3108]rewrite_file: 2 items of file [994350 994765] moved to [994350 3109]rewrite_file: 2 items of file [994350 994766] moved to [994350 3110] Flushing..finished
Objects without names 18403
Empty lost dirs removed 384
Dirs linked to /lost+found: 2174
Dirs without stat data found 83
Files linked to /lost+found 16229
Objects having used objectids: 49
files fixed 47
dirs fixed 2
Pass 4 - finished done 1476, 37 /sec
Deleted unreachable items 716
Flushing..finished
Syncing..finished
###########
reiserfsck finished at Tue Feb 8 17:40:05 2005
###########
Signature · 16 lines
Mit freundlichen Grüßen C. Placzek ---------------------------------------------- Dipl.-Ing. Christian Placzek Email: [email protected] Anschrift: Von-Görschen-Str. 19 52066 Aachen Tel.: +49 241 9964681 Fax: +49 241 514388 Mobil:+49 179 1083808
Hello
Quoted 4 lines · Christian Placzek
Quoted 3 lines · you
Sorry, but what does df -T say?
Does it say that reiserfs filesystem is mounted on/mnt/temp1?
Quoted 8 lines
No, it replied:
# /dev/loop/0 ext2 69529276 20 65997368 1% /mnt/temp1If I force mount with -t reiserfs it says:
root@marvin:/home/kris 0$ # mount -o ro -t reiserfs/dev/loop/0/mnt/temp1/
mount: wrong fs type, bad option, bad superblock on/dev/loop/0,
or too many mounted file systems
what does dmesg say after mount attempt?
Quoted 6 lines
Thanks, this is a good hint, but I don't know how to change the identifier of the filesystem. I know that normally mkfs.* does this task, but my friend's overwriting of the superblock probably has changed the identifier of the filesystem. Is it possible to apply mkreiserfs on the image whithout running the risk to lose any data?
Hello
Quoted 28 lines · Christian Placzek
Quoted 22 lines · you
Hello
Quoted 14 lines · Christian Placzek
Hello,
a friend of mine shredded his data (70GB) when he tried to undelete an accidentally deleted file. He normally works with windoze. Therefore he didn't know he couldn't undelete a file on a reiserfs partition with ext2 undelete tool %-(
When he called me it was already too late. He had overwritten the superblock :-(I'm still trying to rescue the data. I can see them in the image using grep or hexedit. But nothing I tried has been successful. My first steps were unmounting the partition, taking an image and working with a copy of this image using a loop back device.
Quoted 4 lines
All files have been retrieved but were removed by reiserfsck --check although the last output says that directories and files have been linked (see below). I tried with many combinations nearly all parameters of
reiserfsck: --fix-fixable --no-journal-available -S ...Quoted 5 lines
have you tried
reiserfsck --rebuild-tree -S
?
If not, run it on newly created copy of shredded device.
Quoted 6 lines
Yes, I did. The output of reiserfsck --rebuild-tree gave other numbers of linked directories/files. But I can't see them.
Quoted 1 line
Did you look at lost+found?
Shure, see below.
can you do
debugreiserfs -p -S /dev/shredded | bzip2 -c > meta.bz2
and let us to download meta.bz2 so that we can take a look why lost+found gets emptied.
Quoted 372 lines
Quoted 372 lines
Quoted 372 lines
I mounted the image after each operation, but all I can see is:
root@marvin:/home/kris 0$ # mount -o ro
/dev/loop/0/mnt/temp1/root@marvin:/home/kris 0$ # ls -la/mnt/temp1/
total 21
drwxr-xr-x 3 root root 4096 Jan 20 11:36 .
drwxr-xr-x 39 root root 968 Feb 6 14:12 ..
drwx------ 2 root root 16384 Jan 20 11:36 lost+found
root@marvin:/home/kris 0$ # ls -la/mnt/temp1/lost+found/total 20
drwx------ 2 root root 16384 Jan 20 11:36 . drwxr-xr-x 3 root root 4096 Jan 20 11:36 .. root@marvin:/home/kris 0$ #Do you have any suggestions how to rescue the data?
Regards
KrisHere you see a typical output:
root@marvin:/home/kris 0$ # losetup
/dev/loop/0/mnt/temp/data.x.ddroot@marvin:/home/kris 0$ # reiserfsck/dev/loop/0--rebuild-tree reiserfsck 3.6.19 (2003 www.namesys.com)<snip>
Will rebuild the filesystem (
/dev/loop/0) tree
Will put log info to 'stdout'Do you want to run this program?[N/Yes] (note need to type Yes if you do):Yes
reiserfs_open: the reiserfs superblock cannot be found on/dev/loop/0. Failed to open the filesystem.If the partition table has not been changed, and the partition is valid and it really contains a reiserfs partition, then the superblock is corrupted and you need to run this utility with --rebuild-sb.
root@marvin:/home/kris 8$ # reiserfsck
/dev/loop/0--rebuild-sb reiserfsck 3.6.19 (2003 www.namesys.com)<snip>
Will check superblock and rebuild it if needed
Will put log info to 'stdout'
reiserfs_open: the reiserfs superblock cannot be found on/dev/loop/0.what the version of ReiserFS do you use[1-4]
(1) 3.6.x (2) >=3.5.9 (introduced in the middle of 1999) (if you use linux2.2, choose this one)
(3) < 3.5.9 converted to new format (don't choose if unsure)
(4) < 3.5.9 (this is very old format, don't choose if unsure)
(X) exit
1Enter block size [4096]:
No journal device was specified. (If journal is not available, re-run with --no-journal-available option specified).
Is journal default? (y/n)[y]:Did you use resizer(y/n)[n]:
rebuild-sb: no uuid found, a new uuid was generated (7e253707-4fef-42aa-9785-b1cd079851af)rebuild-sb: You either have a corrupted journal or have just changed the start of the partition with some partition table editor. If you are sure that the start of the partition is ok, rebuild the journal header. Do you want to rebuild the journal header? (y/n)[n]: y Reiserfs super block in block 16 on
0x700of format 3.6 with standard journal Count of blocks on the device: 17659440
Number of bitmaps: 539
Blocksize: 4096
Free blocks (count of blocks - used [journal, bitmaps, data, reserved] blocks): 0
Root block: 0
Filesystem is NOT clean
Tree height: 0
Hash function used to sort names: not set
Objectid map size 0, max 972
Journal parameters:Device [0x0] Magic [0x0] Size 8193 blocks (including 1 for journal header) (first block18) Max transaction length 1024 blocks
Max batch size 900 blocks
Max commit age 30
Blocks reserved by journal: 0
Fs state field:0x1:
some corruptions exist.sb_version: 2
inode generation number: 0
UUID: 7e253707-4fef-42aa-9785-b1cd079851af LABEL:
Set flags in SB:
Is this ok ? (y/n)[n]: y
The fs may still be unconsistent. Run reiserfsck --check.root@marvin:/home/kris 1$ # reiserfsck
/dev/loop/0--check reiserfsck 3.6.19 (2003 www.namesys.com)<snip>
Will read-only check consistency of the filesystem on
/dev/loop/0Will put log info to 'stdout'
###########
reiserfsck --check started at Tue Feb 8 17:17:31 2005
###########
Replaying journal..
Reiserfs journal '/dev/loop/0' in blocks [18..8211]: 0 transactions replayed Zero bit found in on-disk bitmap after the last valid bit. Checking internal tree..Bad root block 0. (--rebuild-tree did not complete)
Aborted
root@marvin:/home/kris 134$ # reiserfsck/dev/loop/0-y --rebuild-tree reiserfsck 3.6.19 (2003 www.namesys.com)<snip>
Will rebuild the filesystem (
/dev/loop/0) tree
Will put log info to 'stdout'Do you want to run this program?[N/Yes] (note need to type Yes if you do):Yes Replaying journal..
Reiserfs journal '/dev/loop/0' in blocks [18..8211]: 0 transactions replayed Zero bit found in on-disk bitmap after the last valid bit. Fixed. ###########
reiserfsck --rebuild-tree started at Tue Feb 8 17:37:56 2005
###########Pass 0:
####### Pass 0 #######
Loading on-disk bitmap .. ok, 559628 blocks marked usedinit_source_bitmap: Bitmap 0 (of 32768 bits) is wrong - mark all blocks [0 - 32768] as usedinit_source_bitmap: Bitmap 1 (of 32768 bits) is wrong - mark all blocks
[32768 - 65536] as usedinit_source_bitmap: Bitmap 3 (of 32768 bits) is wrong - mark all blocks
[98304 - 131072] as usedinit_source_bitmap: Bitmap 5 (of 32768 bits) is wrong - mark all blocks [163840 - 196608] as usedinit_source_bitmap: Bitmap 7 (of 32768 bits) is wrong - mark all blocks [229376 - 262144] as usedinit_source_bitmap: Bitmap 9 (of 32768 bits) is wrong - mark all blocks [294912 - 327680] as usedinit_source_bitmap: Bitmap 25 (of 32768 bits) is wrong - mark all blocks [819200 - 851968] as usedinit_source_bitmap: Bitmap 27 (of 32768 bits) is wrong - mark all blocks [884736 - 917504] as usedinit_source_bitmap: Bitmap 49 (of 32768 bits) is wrong - mark all blocks [1605632 - 1638400] as usedinit_source_bitmap: Bitmap 81 (of 32768 bits) is wrong - mark all blocks [2654208 - 2686976] as usedinit_source_bitmap: Bitmap 125 (of 32768 bits) is wrong - mark all blocks [4096000 - 4128768] as usedinit_source_bitmap: Bitmap 243 (of 32768 bits) is wrong - mark all blocks [7962624 - 7995392] as usedinit_source_bitmap: Bitmap 343 (of 32768 bits) is wrong - mark all blocks [11239424 - 11272192] as used
Skipping 8749 blocks (super block, journal, bitmaps) 687599 blocks will be read
0%....20%....40%....60%....80%....100% left 0,
9549 /sec
103101 directory entries were hashed with "r5" hash.
Selected hash ("r5") does not match to the hash set in the super block (not set).
"r5" hash is selected
Flushing..finished
Read blocks (but not data blocks) 687599
Leaves among those 20621
Objectids found 114185Pass 1 (will try to insert 20621 leaves):
####### Pass 1 #######
Looking for allocable blocks .. finished
0%....20%....40%....60%....80%....100% left 0,
1718 /sec
Flushing..finished20621 leaves read 20524 inserted - pointers in indirect items pointing to metadata3 (zeroed)
97 not inserted
non-unique pointers in indirect items (zeroed) 1075
####### Pass 2 #######Pass 2:
0%....20%....40%....60%vpf-10260: The file we are inserting the new item (69291 693270x1DRCT (2), len 216, location 3880 entry count 65535, fsck need 0, format new) into has no StatData, insertion was skipped ....vpf-10260: The file we are inserting the new item (240148 2401500x1IND (1), len 1844, location 2252 entry count 0, fsck need 0, format new) into has no StatData, insertion was skipped
vpf-10260: The file we are inserting the new item (241304 3192110x43001IND (1), len 492, location 3604 entry count 0, fsck need 0, format new) into has no StatData, insertion was skipped
vpf-10260: The file we are inserting the new item (737518 7398130xe6001IND (1), len 688, location 3408 entry count 0, fsck need 0, format new) into has no StatData, insertion was skipped
80%vpf-10260: The file we are inserting the new item (737518 7398130xe6001IND (1), len 688, location 3408 entry count 0, fsck need 0, format new) into has no StatData, insertion was skipped
vpf-10260: The file we are inserting the new item (25 930140x1e1DRCT (2), len 1408, location 2688 entry count 65535, fsck need 0, format new) intohas no StatData, insertion was skipped
vpf-10260: The file we are inserting the new item (238343 3193060x3f4001IND (1), len 136, location 3960 entry count 0, fsck need 0, format new) into has no StatData, insertion was skipped
vpf-10260: The file we are inserting the new item (94077 1199200x1DRCT (2), len 456, location 3640 entry count 65535, fsck need 0, format new) into has no StatData, insertion was skipped
vpf-10260: The file we are inserting the new item (102491 2203970x179DRCT (2), len 1264, location 2832 entry count 65535, fsck need 0, format new)into has no StatData, insertion was skipped
.vpf-10260: The file we are inserting the new item (642448 7717210xcc1DRCT (2), len 520, location 3576 entry count 65535, fsck need 0, format new)into has no StatData, insertion was skipped
.vpf-10260: The file we are inserting the new item (294390 6927520x129DRCT (2), len 296, location 3800 entry count 65535, fsck need 0, format new)into has no StatData, insertion was skipped
vpf-10260: The file we are inserting the new item (294390 6927520x129DRCT (2), len 296, location 3800 entry count 65535, fsck need 0, format new) into has no StatData, insertion was skipped
vpf-10260: The file we are inserting the new item (294390 6927520x129DRCT (2), len 296, location 3800 entry count 65535, fsck need 0, format new) into has no StatData, insertion was skipped
.vpf-10260: The file we are inserting the new item (294390 6927520x129DRCT (2), len 296, location 3800 entry count 65535, fsck need 0, format new)into has no StatData, insertion was skipped
vpf-10260: The file we are inserting the new item (294390 6927520x129DRCT (2), len 296, location 3800 entry count 65535, fsck need 0, format new) into has no StatData, insertion was skipped
vpf-10260: The file we are inserting the new item (294390 6927520x129DRCT (2), len 296, location 3800 entry count 65535, fsck need 0, format new) into has no StatData, insertion was skipped
vpf-10260: The file we are inserting the new item (294390 6927520x129DRCT (2), len 296, location 3800 entry count 65535, fsck need 0, format new) into has no StatData, insertion was skipped
vpf-10260: The file we are inserting the new item (294390 6927520x129DRCT (2), len 296, location 3800 entry count 65535, fsck need 0, format new) into has no StatData, insertion was skipped
.vpf-10260: The file we are inserting the new item (294390 6927520x129DRCT (2), len 296, location 3800 entry count 65535, fsck need 0, format new)into has no StatData, insertion was skipped
vpf-10260: The file we are inserting the new item (294390 6927520x129DRCT (2), len 296, location 3800 entry count 65535, fsck need 0, format new) into has no StatData, insertion was skipped
vpf-10260: The file we are inserting the new item (294390 6927520x129DRCT (2), len 296, location 3800 entry count 65535, fsck need 0, format new) into has no StatData, insertion was skipped
vpf-10260: The file we are inserting the new item (294390 6927520x129DRCT (2), len 296, location 3800 entry count 65535, fsck need 0, format new) into has no StatData, insertion was skipped
100% left 0, 0 /sec
Flushing..finished
Leaves inserted item by item 97
Pass 3 (semantic):
####### Pass 3 #########
/binrebuild_semantic_pass: The entry [3636 189939] ("ls") in directory [2 3636] points to nowhere - is removed /javarebuild_semantic_pass: The entry [107571 597512] ("jre") in directory [3636 107571] points to nowhere - is removed
vpf-10650: The directory [3636 107571] has the wrong size in the StatData
(72) - corrected to (48)
vpf-10650: The directory [2 3636] has the wrong size in the StatData (2920) - corrected to (2896)
/devrebuild_semantic_pass: The entry [6 554632] ("lvm") in directory [2 6] points to nowhere - is removedrebuild_semantic_pass: The entry [6 52003] ("lirc") in directory [2 6] points to nowhere - is removedrebuild_semantic_pass: The entry [6 72207] ("scsi") in directory [2 6] points to nowhere - is removedrebuild_semantic_pass: The entry [6 50738] ("xdb5") in directory [2 6] points to nowhere - is removedrebuild_semantic_pass: The entry [6 50739] ("xdb6") in directory [2 6] points to nowhere - is removedrebuild_semantic_pass: The entry [6 50740] ("xdb7") in directory [2 6] points to nowhere - is removedrebuild_semantic_pass: The entry [6 50741] ("xdb8") in directory [2 6] points to nowhere - is removed
...
... (here follow hundreds of directories and thousends of files, too, ... which I removed)
...
The entry [994339 994340] ("Entries") in directory [994335 19] updated to point to [994339 49]
/Entries.Extra.Oldrewrite_file: 1 items of file [994339 994343] moved to [994339 50]
The entry [994339 994343] ("Entries.Extra.Old") in directory [994335 19] updated to point to [994339 50]relocate_dir: Moving [994350 9947730x0SD (0)] to [994350 510x0SD (0)]relocate_dir: Moving [994350 9947730x1DIR (3)] to [994350 510x1DIR (3)] /994350_51get_next_directory_item: The entry ".." of the directory [994350 51] pointes to [285394 994350], instead of [2 18] - correctedrebuild_semantic_pass: The entry [994773 994783] ("Root") in directory
[994350 51] points to nowhere - is removedrebuild_semantic_pass: The entry [994773 994776] ("Entries.Extra") in directory [994350 51] points to nowhere - is removedrebuild_semantic_pass: The entry [994773 994782] ("Repository") in directory [994350 51] points to nowhere - is removedrebuild_semantic_pass: The entry [994773 994779] ("Entries.Extra.Old.bak") in directory [994350 51] points to nowhere - is removedrebuild_semantic_pass: The entry [994773 994784] ("Root.bak") in directory [994350 51] points to nowhere - is removedrebuild_semantic_pass: The entry [994773 994780] ("Entries.Old") in directory [994350 51] points to nowhere - is removedrebuild_semantic_pass: The entry [994773 994775] ("Entries.bak") in directory [994350 51] points to nowhere - is removedrebuild_semantic_pass: The entry [994773 994781] ("Entries.Old.bak") in directory [994350 51] points to nowhere - is removedrebuild_semantic_pass: The entry [994773 994778] ("Entries.Extra.Old") in directory [994350 51] points to nowhere - is removedrebuild_semantic_pass: The entry [994773 994777] ("Entries.Extra.bak") in directory [994350 51] points to nowhere - is removed
vpf-10650: The directory [994350 51] has the wrong size in the StatData
(400) - corrected to (72) /994395_994396get_next_directory_item: The entry ".." of the directory [994395 994396] pointes to [684030 994395], instead of [2 18] -
corrected /994415_994416get_next_directory_item: The entry ".." of the directory [994415 994416] pointes to [684030 994415], instead of [2 18] - corrected /994529_994754get_next_directory_item: The entry ".." of the directory [994529 994754] pointes to [984867 994529], instead of [2 18] - corrected Looking for lost files:
vpf-10670: The file [25 93091] has the wrong size in the StatData (30352)
- corrected to (36864)
vpf-10680: The file [25 93091] has the wrong block count in the StatData
(64) - corrected to (72)
vpf-10680: The file [25 111982] has the wrong block count in the StatData (75408) - corrected to (16872)
vpf-10680: The file [3127 59061] has the wrong block count in the StatData (8) - corrected to (0)
vpf-10680: The file [3128 72300] has the wrong block count in the StatData (8) - corrected to (0)
vpf-10680: The file [3620 18950] has the wrong block count in the StatData (8) - corrected to (0)
...
...
...rewrite_file: 2 items of file [994350 994764] moved to [994350 3108]rewrite_file: 2 items of file [994350 994765] moved to [994350 3109]rewrite_file: 2 items of file [994350 994766] moved to [994350 3110] Flushing..finished
Objects without names 18403
Empty lost dirs removed 384
Dirs linked to /lost+found: 2174
Dirs without stat data found 83
Files linked to /lost+found 16229
Objects having used objectids: 49
files fixed 47
dirs fixed 2
Pass 4 - finished done 1476, 37 /sec
Deleted unreachable items 716
Flushing..finished
Syncing..finished
###########
reiserfsck finished at Tue Feb 8 17:40:05 2005
###########
Quoted 34 lines · Vladimir Saveliev
Hello
Quoted 31 lines · Christian Placzek
Quoted 22 lines · you
Hello
Quoted 14 lines · Christian Placzek
Hello,
a friend of mine shredded his data (70GB) when he tried to undelete an accidentally deleted file. He normally works with windoze. Therefore he didn't know he couldn't undelete a file on a reiserfs partition with ext2 undelete tool %-(
When he called me it was already too late. He had overwritten the superblock :-(I'm still trying to rescue the data. I can see them in the image using grep or hexedit. But nothing I tried has been successful. My first steps were unmounting the partition, taking an image and working with a copy of this image using a loop back device.
Quoted 4 lines
All files have been retrieved but were removed by reiserfsck --check although the last output says that directories and files have been linked (see below). I tried with many combinations nearly all parameters of reiserfsck: --fix-fixable --no-journal-available -S ...
Quoted 4 lines
have you tried
reiserfsck --rebuild-tree -S
?
If not, run it on newly created copy of shredded device.Yes, I did. The output of reiserfsck --rebuild-tree gave other numbers of linked directories/files. But I can't see them.
Quoted 6 lines
Quoted 3 lines
Quoted 1 line
Did you look at lost+found?
Shure, see below.
can you do
debugreiserfs -p -S/dev/shredded| bzip2 -c > meta.bz2
Okay, I've done two versions, one with and one without '-S'. I applied the following commands to the image copy (the image itself is untouched, I always worked with fresh copies):
# reiserfsck -y /dev/loop/0 --rebuild-sb # reiserfsck -y /dev/loop/0 --check # reiserfsck -y /dev/loop/0 --rebuild-tree # debugreiserfs -p /dev/loop/0 | bzip2 -c > meta.bz2 # reiserfsck -y /dev/loop/0 --rebuild-tree -S # debugreiserfs -p /dev/loop/0 | bzip2 -c > meta-S.bz2
Use ftp://80.133.138.104:12121 user: marc pw: tukli
Lena gave me another hint:
Quoted 6 lines
Quoted 5 lines
Sorry, but what does df -T say?
Does it say that reiserfs filesystem is mounted on/mnt/temp1?Thanks,
Lena.No, it replied:
Quoted 8 lines
# /dev/loop/0 ext2 69529276 20 65997368 1% /mnt/temp1If I force mount with -t reiserfs it says:
root@marvin:/home/kris 0$ # mount -o ro -t reiserfs/dev/loop/0/mnt/temp1/
mount: wrong fs type, bad option, bad superblock on/dev/loop/0,
or too many mounted file systemsThanks, this is a good hint, but I don't know how to change the identifier
of
Quoted 4 lines
the filesystem. I know that normally mkfs.* does this task, but my friend's overwriting of the superblock probably has changed the identifier of the filesystem. Is it possible to apply mkreiserfs on the image whithout running the risk to lose any data?
Thanks
Kris
Quoted 378 lines
and let us to download meta.bz2 so that we can take a look why lost+found gets emptied.
Quoted 372 lines
Quoted 372 lines
Quoted 372 lines
I mounted the image after each operation, but all I can see is:
root@marvin:/home/kris 0$ # mount -o ro
/dev/loop/0/mnt/temp1/root@marvin:/home/kris 0$ # ls -la/mnt/temp1/
total 21
drwxr-xr-x 3 root root 4096 Jan 20 11:36 .
drwxr-xr-x 39 root root 968 Feb 6 14:12 ..
drwx------ 2 root root 16384 Jan 20 11:36 lost+found
root@marvin:/home/kris 0$ # ls -la/mnt/temp1/lost+found/total 20
drwx------ 2 root root 16384 Jan 20 11:36 . drwxr-xr-x 3 root root 4096 Jan 20 11:36 .. root@marvin:/home/kris 0$ #Do you have any suggestions how to rescue the data?
Regards
KrisHere you see a typical output:
root@marvin:/home/kris 0$ # losetup
/dev/loop/0/mnt/temp/data.x.ddroot@marvin:/home/kris 0$ # reiserfsck/dev/loop/0--rebuild-tree reiserfsck 3.6.19 (2003 www.namesys.com)<snip>
Will rebuild the filesystem (
/dev/loop/0) tree
Will put log info to 'stdout'Do you want to run this program?[N/Yes] (note need to type Yes if you do):Yes
reiserfs_open: the reiserfs superblock cannot be found on/dev/loop/0. Failed to open the filesystem.If the partition table has not been changed, and the partition is valid and it really contains a reiserfs partition, then the superblock is corrupted and you need to run this utility with --rebuild-sb.
root@marvin:/home/kris 8$ # reiserfsck
/dev/loop/0--rebuild-sb reiserfsck 3.6.19 (2003 www.namesys.com)<snip>
Will check superblock and rebuild it if needed
Will put log info to 'stdout'
reiserfs_open: the reiserfs superblock cannot be found on/dev/loop/0.what the version of ReiserFS do you use[1-4]
(1) 3.6.x (2) >=3.5.9 (introduced in the middle of 1999) (if you uselinux 2.2, choose this one)
(3) < 3.5.9 converted to new format (don't choose if unsure)
(4) < 3.5.9 (this is very old format, don't choose if unsure)
(X) exit
1Enter block size [4096]:
No journal device was specified. (If journal is not available, re-run with --no-journal-available option specified).
Is journal default? (y/n)[y]:Did you use resizer(y/n)[n]:
rebuild-sb: no uuid found, a new uuid was generated (7e253707-4fef-42aa-9785-b1cd079851af)rebuild-sb: You either have a corrupted journal or have just changed the start of the partition with some partition table editor. If you are sure that the start of the partition is ok, rebuild the journal header. Do you want to rebuild the journal header? (y/n)[n]: y Reiserfs super block in block 16 on
0x700of format 3.6 with standard journal Count of blocks on the device: 17659440
Number of bitmaps: 539
Blocksize: 4096
Free blocks (count of blocks - used [journal, bitmaps, data, reserved] blocks): 0
Root block: 0
Filesystem is NOT clean
Tree height: 0
Hash function used to sort names: not set
Objectid map size 0, max 972
Journal parameters:Device [0x0] Magic [0x0] Size 8193 blocks (including 1 for journal header) (firstblock 18) Max transaction length 1024 blocks
Max batch size 900 blocks
Max commit age 30
Blocks reserved by journal: 0
Fs state field:0x1:
some corruptions exist.sb_version: 2
inode generation number: 0
UUID: 7e253707-4fef-42aa-9785-b1cd079851af LABEL:
Set flags in SB:
Is this ok ? (y/n)[n]: y
The fs may still be unconsistent. Run reiserfsck --check.root@marvin:/home/kris 1$ # reiserfsck
/dev/loop/0--check reiserfsck 3.6.19 (2003 www.namesys.com)<snip>
Will read-only check consistency of the filesystem on
/dev/loop/0Will put log info to 'stdout'
###########
reiserfsck --check started at Tue Feb 8 17:17:31 2005
###########
Replaying journal..
Reiserfs journal '/dev/loop/0' in blocks [18..8211]: 0 transactions replayed Zero bit found in on-disk bitmap after the last valid bit. Checking internal tree..Bad root block 0. (--rebuild-tree did not complete)
Aborted
root@marvin:/home/kris 134$ # reiserfsck/dev/loop/0-y --rebuild-tree reiserfsck 3.6.19 (2003 www.namesys.com)<snip>
Will rebuild the filesystem (
/dev/loop/0) tree
Will put log info to 'stdout'Do you want to run this program?[N/Yes] (note need to type Yes if you do):Yes Replaying journal..
Reiserfs journal '/dev/loop/0' in blocks [18..8211]: 0 transactions replayed Zero bit found in on-disk bitmap after the last valid bit. Fixed. ###########
reiserfsck --rebuild-tree started at Tue Feb 8 17:37:56 2005
###########Pass 0:
####### Pass 0 #######
Loading on-disk bitmap .. ok, 559628 blocks marked usedinit_source_bitmap: Bitmap 0 (of 32768 bits) is wrong - mark all blocks [0 - 32768] as usedinit_source_bitmap: Bitmap 1 (of 32768 bits) is wrong - mark all blocks [32768 - 65536] as usedinit_source_bitmap: Bitmap 3 (of 32768 bits) is wrong - mark all blocks [98304 - 131072] as usedinit_source_bitmap: Bitmap 5 (of 32768 bits) is wrong - mark all blocks [163840 - 196608] as usedinit_source_bitmap: Bitmap 7 (of 32768 bits) is wrong - mark all blocks [229376 - 262144] as usedinit_source_bitmap: Bitmap 9 (of 32768 bits) is wrong - mark all blocks [294912 - 327680] as usedinit_source_bitmap: Bitmap 25 (of 32768 bits) is wrong - mark all blocks [819200 - 851968] as usedinit_source_bitmap: Bitmap 27 (of 32768 bits) is wrong - mark all blocks [884736 - 917504] as usedinit_source_bitmap: Bitmap 49 (of 32768 bits) is wrong - mark all blocks [1605632 - 1638400] as usedinit_source_bitmap: Bitmap 81 (of 32768 bits) is wrong - mark all blocks [2654208 - 2686976] as usedinit_source_bitmap: Bitmap 125 (of 32768 bits) is wrong - mark all blocks [4096000 - 4128768] as usedinit_source_bitmap: Bitmap 243 (of 32768 bits) is wrong - mark all blocks [7962624 - 7995392] as usedinit_source_bitmap: Bitmap 343 (of 32768 bits) is wrong - mark all blocks [11239424 - 11272192] as used
Skipping 8749 blocks (super block, journal, bitmaps) 687599 blocks will be read
0%....20%....40%....60%....80%....100% left 0,
9549 /sec
103101 directory entries were hashed with "r5" hash. Selected hash ("r5") does not match to the hash set in the super block (not set).
"r5" hash is selected
Flushing..finished
Read blocks (but not data blocks) 687599
Leaves among those 20621
Objectids found 114185Pass 1 (will try to insert 20621 leaves):
####### Pass 1 #######
Looking for allocable blocks .. finished
0%....20%....40%....60%....80%....100% left 0,
1718 /sec
Flushing..finished20621 leaves read 20524 inserted - pointers in indirect items pointing tometadata 3 (zeroed)
97 not inserted
non-unique pointers in indirect items (zeroed) 1075
####### Pass 2 #######Pass 2:
0%....20%....40%....60%vpf-10260: The file we are inserting the new item (69291 693270x1DRCT (2), len 216, location 3880 entry count 65535, fsck need 0, format new) into has no StatData, insertion was skipped ....vpf-10260: The file we are inserting the new item (240148 2401500x1IND (1), len 1844, location 2252 entry count 0, fsck need 0, format new) into has no StatData, insertion was skipped
vpf-10260: The file we are inserting the new item (241304 3192110x43001IND (1), len 492, location 3604 entry count 0, fsck need 0, format new) into has no StatData, insertion was skipped
vpf-10260: The file we are inserting the new item (737518 7398130xe6001IND (1), len 688, location 3408 entry count 0, fsck need 0, format new) into has no StatData, insertion was skipped 80%vpf-10260: The file we are inserting the new item (737518 7398130xe6001IND (1), len 688, location 3408 entry count 0, fsck need 0, format new) into has no StatData, insertion was skipped
vpf-10260: The file we are inserting the new item (25 930140x1e1DRCT (2), len 1408, location 2688 entry count 65535, fsck need 0, format new) intohas no StatData, insertion was skipped
vpf-10260: The file we are inserting the new item (238343 3193060x3f4001IND (1), len 136, location 3960 entry count 0, fsck need 0, format new) into has no StatData, insertion was skipped
vpf-10260: The file we are inserting the new item (94077 1199200x1DRCT (2), len 456, location 3640 entry count 65535, fsck need 0, format new) into has no StatData, insertion was skipped
vpf-10260: The file we are inserting the new item (102491 2203970x179DRCT (2), len 1264, location 2832 entry count 65535, fsck need 0, format new)into has no StatData, insertion was skipped .vpf-10260: The file we are inserting the new item (642448 7717210xcc1DRCT (2), len 520, location 3576 entry count 65535, fsck need 0, format new)into has no StatData, insertion was skipped .vpf-10260: The file we are inserting the new item (294390 6927520x129DRCT (2), len 296, location 3800 entry count 65535, fsck need 0, format new)into has no StatData, insertion was skipped
vpf-10260: The file we are inserting the new item (294390 6927520x129DRCT (2), len 296, location 3800 entry count 65535, fsck need 0, format new) into has no StatData, insertion was skipped
vpf-10260: The file we are inserting the new item (294390 6927520x129DRCT (2), len 296, location 3800 entry count 65535, fsck need 0, format new) into has no StatData, insertion was skipped .vpf-10260: The file we are inserting the new item (294390 6927520x129DRCT (2), len 296, location 3800 entry count 65535, fsck need 0, format new)into has no StatData, insertion was skipped
vpf-10260: The file we are inserting the new item (294390 6927520x129DRCT (2), len 296, location 3800 entry count 65535, fsck need 0, format new) into has no StatData, insertion was skipped
vpf-10260: The file we are inserting the new item (294390 6927520x129DRCT (2), len 296, location 3800 entry count 65535, fsck need 0, format new) into has no StatData, insertion was skipped
vpf-10260: The file we are inserting the new item (294390 6927520x129DRCT (2), len 296, location 3800 entry count 65535, fsck need 0, format new) into has no StatData, insertion was skipped
vpf-10260: The file we are inserting the new item (294390 6927520x129DRCT (2), len 296, location 3800 entry count 65535, fsck need 0, format new) into has no StatData, insertion was skipped .vpf-10260: The file we are inserting the new item (294390 6927520x129DRCT (2), len 296, location 3800 entry count 65535, fsck need 0, format new)into has no StatData, insertion was skipped
vpf-10260: The file we are inserting the new item (294390 6927520x129DRCT (2), len 296, location 3800 entry count 65535, fsck need 0, format new) into has no StatData, insertion was skipped
vpf-10260: The file we are inserting the new item (294390 6927520x129DRCT (2), len 296, location 3800 entry count 65535, fsck need 0, format new) into has no StatData, insertion was skipped
vpf-10260: The file we are inserting the new item (294390 6927520x129DRCT (2), len 296, location 3800 entry count 65535, fsck need 0, format new) into has no StatData, insertion was skipped
100% left 0, 0 /sec
Flushing..finished
Leaves inserted item by item 97
Pass 3 (semantic):
####### Pass 3 #########
/binrebuild_semantic_pass: The entry [3636 189939] ("ls") in directory [2 3636] points to nowhere - is removed /javarebuild_semantic_pass: The entry [107571 597512] ("jre") in directory [3636 107571] points to nowhere - is removed
vpf-10650: The directory [3636 107571] has the wrong size in the StatData (72) - corrected to (48)
vpf-10650: The directory [2 3636] has the wrong size in the StatData (2920) - corrected to (2896)
/devrebuild_semantic_pass: The entry [6 554632] ("lvm") in directory [2 6] points to nowhere - is removedrebuild_semantic_pass: The entry [6 52003] ("lirc") in directory [2 6] points to nowhere - is removedrebuild_semantic_pass: The entry [6 72207] ("scsi") in directory [2 6] points to nowhere - is removedrebuild_semantic_pass: The entry [6 50738] ("xdb5") in directory [2 6] points to nowhere - is removedrebuild_semantic_pass: The entry [6 50739] ("xdb6") in directory [2 6] points to nowhere - is removedrebuild_semantic_pass: The entry [6 50740] ("xdb7") in directory [2 6] points to nowhere - is removedrebuild_semantic_pass: The entry [6 50741] ("xdb8") in directory [2 6] points to nowhere - is removed
...
... (here follow hundreds of directories and thousends of files, too, ... which I removed)
...
The entry [994339 994340] ("Entries") in directory [994335 19] updated to point to [994339 49] /Entries.Extra.Oldrewrite_file: 1 items of file [994339 994343] moved to [994339 50]
The entry [994339 994343] ("Entries.Extra.Old") in directory [994335 19] updated to point to [994339 50]relocate_dir: Moving [994350 9947730x0SD (0)] to [994350 510x0SD (0)]relocate_dir: Moving [994350 9947730x1DIR (3)] to [994350 510x1DIR (3)] /994350_51get_next_directory_item: The entry ".." of the directory [994350 51] pointes to [285394 994350], instead of [2 18] - correctedrebuild_semantic_pass: The entry [994773 994783] ("Root") in directory [994350 51] points to nowhere - is removedrebuild_semantic_pass: The entry [994773 994776] ("Entries.Extra") in directory [994350 51] points to nowhere - is removedrebuild_semantic_pass: The entry [994773 994782] ("Repository") in directory [994350 51] points to nowhere - is removedrebuild_semantic_pass: The entry [994773 994779] ("Entries.Extra.Old.bak") in directory [994350 51] points to nowhere
- is removedrebuild_semantic_pass: The entry [994773 994784] ("Root.bak") in directory [994350 51] points to nowhere - is removedrebuild_semantic_pass: The entry [994773 994780] ("Entries.Old") in directory [994350 51] points to nowhere - is removedrebuild_semantic_pass: The entry [994773 994775] ("Entries.bak") in directory [994350 51] points to nowhere - is removedrebuild_semantic_pass: The entry [994773 994781] ("Entries.Old.bak") in directory [994350 51] points to nowhere - is removedrebuild_semantic_pass: The entry [994773 994778] ("Entries.Extra.Old") in directory [994350 51] points to nowhere - is removedrebuild_semantic_pass: The entry [994773 994777] ("Entries.Extra.bak") in directory [994350 51] points to nowhere - is removed
vpf-10650: The directory [994350 51] has the wrong size in the StatData (400) - corrected to (72) /994395_994396get_next_directory_item: The entry ".." of the directory [994395 994396] pointes to [684030 994395], instead of [2 18] - corrected /994415_994416get_next_directory_item: The entry ".." of the directory [994415 994416] pointes to [684030 994415], instead of [2 18] - corrected /994529_994754get_next_directory_item: The entry ".." of the directory [994529 994754] pointes to [984867 994529], instead of [2 18] - corrected Looking for lost files:
vpf-10670: The file [25 93091] has the wrong size in the StatData (30352) - corrected to (36864)
vpf-10680: The file [25 93091] has the wrong block count in the StatData (64) - corrected to (72)
vpf-10680: The file [25 111982] has the wrong block count in the StatData (75408) - corrected to (16872)
vpf-10680: The file [3127 59061] has the wrong block count in the StatData (8) - corrected to (0)
vpf-10680: The file [3128 72300] has the wrong block count in the StatData (8) - corrected to (0)
vpf-10680: The file [3620 18950] has the wrong block count in the StatData (8) - corrected to (0)
...
...
...rewrite_file: 2 items of file [994350 994764] moved to [994350 3108]rewrite_file: 2 items of file [994350 994765] moved to [994350 3109]rewrite_file: 2 items of file [994350 994766] moved to [994350 3110] Flushing..finished
Objects without names 18403
Empty lost dirs removed 384
Dirs linked to /lost+found: 2174
Dirs without stat data found 83
Files linked to /lost+found 16229
Objects having used objectids: 49
files fixed 47
dirs fixed 2
Pass 4 - finished done 1476, 37 /sec
Deleted unreachable items 716
Flushing..finished
Syncing..finished
###########
reiserfsck finished at Tue Feb 8 17:40:05 2005
###########
Signature · 16 lines
Mit freundlichen Grüßen C. Placzek ---------------------------------------------- Dipl.-Ing. Christian Placzek Email: [email protected] Anschrift: Von-Görschen-Str. 19 52066 Aachen Tel.: +49 241 9964681 Fax: +49 241 514388 Mobil:+49 179 1083808
Hello
Quoted 45 lines · Christian Placzek
Quoted 34 lines · Vladimir Saveliev
Hello
Quoted 31 lines · Christian Placzek
Quoted 22 lines · you
Hello
Quoted 14 lines · Christian Placzek
Hello,
a friend of mine shredded his data (70GB) when he tried to undelete an accidentally deleted file. He normally works with windoze. Therefore he didn't know he couldn't undelete a file on a reiserfs partition with ext2 undelete tool %-(
When he called me it was already too late. He had overwritten the superblock :-(I'm still trying to rescue the data. I can see them in the image using grep or hexedit. But nothing I tried has been successful. My first steps were unmounting the partition, taking an image and working with a copy of this image using a loop back device.
Quoted 4 lines
All files have been retrieved but were removed by reiserfsck --check although the last output says that directories and files have been linked (see below). I tried with many combinations nearly all parameters of reiserfsck: --fix-fixable --no-journal-available -S ...
Quoted 4 lines
have you tried
reiserfsck --rebuild-tree -S
?
If not, run it on newly created copy of shredded device.Yes, I did. The output of reiserfsck --rebuild-tree gave other numbers of linked directories/files. But I can't see them.
Quoted 6 lines
Quoted 3 lines
Quoted 1 line
Did you look at lost+found?
Shure, see below.
can you do
debugreiserfs -p -S/dev/shredded| bzip2 -c > meta.bz2Okay, I've done two versions, one with and one without '-S'. I applied the following commands to the image copy (the image itself is untouched, I always worked with fresh copies):
Quoted 9 lines
# reiserfsck -y /dev/loop/0 --rebuild-sb # reiserfsck -y /dev/loop/0 --check # reiserfsck -y /dev/loop/0 --rebuild-tree # debugreiserfs -p /dev/loop/0 | bzip2 -c > meta.bz2 # reiserfsck -y /dev/loop/0 --rebuild-tree -S # debugreiserfs -p /dev/loop/0 | bzip2 -c > meta-S.bz2Use ftp://80.133.138.104:12121 user: marc pw: tukli
ok.
Quoted 14 lines
Lena gave me another hint:
Quoted 13 lines
Quoted 5 lines
Sorry, but what does df -T say?
Does it say that reiserfs filesystem is mounted on/mnt/temp1?Thanks,
Lena.No, it replied:
# /dev/loop/0 ext2 69529276 20 65997368 1% /mnt/temp1If I force mount with -t reiserfs it says:
root@marvin:/home/kris 0$ # mount -o ro -t reiserfs/dev/loop/0/mnt/temp1/
mount: wrong fs type, bad option, bad superblock on/dev/loop/0,
or too many mounted file systems
Yes, so, were you able to mount the filesystem eventually?
Quoted 71 lines · you
Hello
Quoted 47 lines · Christian Placzek
Quoted 35 lines · Vladimir Saveliev
Hello
Quoted 32 lines · Christian Placzek
Quoted 23 lines · you
Hello
Quoted 14 lines · Christian Placzek
Hello,
a friend of mine shredded his data (70GB) when he tried to undelete an accidentally deleted file. He normally works with windoze. Therefore he didn't know he couldn't undelete a file on a reiserfs partition with ext2 undelete tool %-(
When he called me it was already too late. He had overwritten the superblock :-(I'm still trying to rescue the data. I can see them in the image using grep or hexedit. But nothing I tried has been successful. My first steps were unmounting the partition, taking an image and working with a copy of this image using a loop back device.
Quoted 5 lines
All files have been retrieved but were removed by reiserfsck --check although the last output says that directories and files have been linked (see below). I tried with many combinations nearly all parameters of reiserfsck: --fix-fixable --no-journal-available -S ...
Quoted 4 lines
have you tried
reiserfsck --rebuild-tree -S
?
If not, run it on newly created copy of shredded device.Yes, I did. The output of reiserfsck --rebuild-tree gave other numbers of linked directories/files. But I can't see them.
Quoted 6 lines
Quoted 3 lines
Quoted 1 line
Did you look at lost+found?
Shure, see below.
can you do
debugreiserfs -p -S/dev/shredded| bzip2 -c > meta.bz2Okay, I've done two versions, one with and one without '-S'. I applied the following commands to the image copy (the image itself is untouched, I always worked with fresh copies):
Quoted 8 lines
# reiserfsck -y /dev/loop/0 --rebuild-sb # reiserfsck -y /dev/loop/0 --check # reiserfsck -y /dev/loop/0 --rebuild-tree # debugreiserfs -p /dev/loop/0 | bzip2 -c > meta.bz2 # reiserfsck -y /dev/loop/0 --rebuild-tree -S # debugreiserfs -p /dev/loop/0 | bzip2 -c > meta-S.bz2Use ftp://80.133.138.104:12121 user: marc pw: tukli
ok.
Quoted 10 lines
Lena gave me another hint:
Quoted 9 lines
Quoted 5 lines
Sorry, but what does df -T say?
Does it say that reiserfs filesystem is mounted on/mnt/temp1?Thanks,
Lena.No, it replied:
# /dev/loop/0 ext2 69529276 20 65997368 1% /mnt/temp1
Quoted 6 lines
Quoted 4 lines
Quoted 4 lines
If I force mount with -t reiserfs it says:
root@marvin:/home/kris 0$ # mount -o ro -t reiserfs/dev/loop/0/mnt/temp1/mount: wrong fs type, bad option, bad superblock on/dev/loop/0, or too many mounted file systemsYes, so, were you able to mount the filesystem eventually?
No, I wasn't. It seems mount doesn't recognize the true file system, although the magic exists.
<snip>
00010000 30 76 0D 01 00 00 00 00 00 00 00 00 12 00 00 00 0v..............
00 00 00 00 00 20 00 00 00 04 00 00 00 00 00 00 ..... ..........
00010020 84 03 00 00 1E 00 00 00 00 00 00 00 00 10 CC 03 ................
00 00 02 00 52 65 49 73 45 72 32 46 73 00 01 00 ....ReIsEr2Fs...
00010040 00 00 00 00 00 00 1B 02 02 00 00 00 00 00 00 00 ................
00 00 00 00 CF DC 6B 1C 3E 77 48 3C A7 4E 6E 84 ......k.>wH<.Nn.
00010060 6E 8E E3 EE 00 00 00 00 00 00 00 00 00 00 00 00 n...............
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................<snip>
Maybe the following output is the key. I did this with a fresh copy. Note the number before the '$' sign in the command prompt. It's the error status of the previous command.
root@marvin:/home/kris 0$ # reiserfsck -y /dev/loop/0 --rebuild-sb reiserfsck 3.6.19 (2003 www.namesys.com)
*************************************************************
** If you are using the latest reiserfsprogs and it fails ** ** please email bug reports to [email protected], ** ** providing as much information as possible -- your ** ** hardware, kernel, patches, settings, all reiserfsck ** ** messages (including version), the reiserfsck logfile, ** ** check the syslog file for any related information. ** ** If you would like advice on using this program, support ** ** is available for $25 at www.namesys.com/support.html. **
*************************************************************
Will check superblock and rebuild it if needed
Will put log info to 'stdout'
reiserfs_open: the reiserfs superblock cannot be found on /dev/loop/0.
what the version of ReiserFS do you use[1-4]
(1) 3.6.x
(2) >=3.5.9 (introduced in the middle of 1999) (if you use linux 2.2, choose this one)
(3) < 3.5.9 converted to new format (don't choose if unsure)
(4) < 3.5.9 (this is very old format, don't choose if unsure)
(X) exit
1
Enter block size [4096]:
No journal device was specified. (If journal is not available, re-run with --no-journal-available option specified).
Is journal default? (y/n)[y]:
Did you use resizer(y/n)[n]:
rebuild-sb: no uuid found, a new uuid was generated (cfdc6b1c-3e77-483c-a74e-6e846e8ee3ee)
rebuild-sb: You either have a corrupted journal or have just changed the start of the partition with some partition table editor. If you are sure that the start of the partition is ok, rebuild the journal header. Do you want to rebuild the journal header? (y/n)[n]: y
Reiserfs super block in block 16 on 0x700 of format 3.6 with standard journal Count of blocks on the device: 17659440
Number of bitmaps: 539
Blocksize: 4096
Free blocks (count of blocks - used [journal, bitmaps, data, reserved] blocks): 0
Root block: 0
Filesystem is NOT clean
Tree height: 0
Hash function used to sort names: not set
Objectid map size 0, 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: 0x1:
some corruptions exist.sb_version: 2
inode generation number: 0
UUID: cfdc6b1c-3e77-483c-a74e-6e846e8ee3ee
LABEL:
Set flags in SB:
Is this ok ? (y/n)[n]: y
The fs may still be unconsistent. Run reiserfsck --check.
root@marvin:/home/kris 1$ # reiserfsck -y /dev/loop/0 --check reiserfsck 3.6.19 (2003 www.namesys.com)
*************************************************************
** If you are using the latest reiserfsprogs and it fails ** ** please email bug reports to [email protected], ** ** providing as much information as possible -- your ** ** hardware, kernel, patches, settings, all reiserfsck ** ** messages (including version), the reiserfsck logfile, ** ** check the syslog file for any related information. ** ** If you would like advice on using this program, support ** ** is available for $25 at www.namesys.com/support.html. **
*************************************************************
Will read-only check consistency of the filesystem on /dev/loop/0 Will put log info to 'stdout'
###########
reiserfsck --check started at Thu Feb 10 13:16:29 2005
###########
Replaying journal..
Reiserfs journal '/dev/loop/0' in blocks [18..8211]: 0 transactions replayed Zero bit found in on-disk bitmap after the last valid bit. Checking internal tree..
Bad root block 0. (--rebuild-tree did not complete)
Aborted
root@marvin:/home/kris 134$ #
Hello
Quoted 12 lines · Christian Placzek
No, I wasn't. It seems mount doesn't recognize the true file system, although the magic exists.
<snip>
00010000 30 76 0D 01 00 00 00 00 00 00 00 00 12 00 00 00 0v.............. 00 00 00 00 00 20 00 00 00 04 00 00 00 00 00 00 ..... .......... 00010020 84 03 00 00 1E 00 00 00 00 00 00 00 00 10 CC 03 ................ 00 00 02 00 52 65 49 73 45 72 32 46 73 00 01 00 ....ReIsEr2Fs... 00010040 00 00 00 00 00 00 1B 02 02 00 00 00 00 00 00 00 ................ 00 00 00 00 CF DC 6B 1C 3E 77 48 3C A7 4E 6E 84 ......k.>wH<.Nn. 00010060 6E 8E E3 EE 00 00 00 00 00 00 00 00 00 00 00 00 n............... 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
Quoted 8 lines
<snip>
Maybe the following output is the key. I did this with a fresh copy. Note the number before the '$' sign in the command prompt. It's the error status of the previous command.
Sorry, I am confused.
You had to do:
dd if=/dev/shreded of=/dev/spare
reiserfsck --rebuild-sb /dev/spare
reiserfsck --rebuild-tree -S /dev/spare
mount /dev/spare /mnt
Would you try that and let us know the result?
Quoted 102 lines
root@marvin:/home/kris 0$ # reiserfsck -y
/dev/loop/0--rebuild-sb reiserfsck 3.6.19 (2003 www.namesys.com)*************************************************************
** If you are using the latest reiserfsprogs and it fails ** ** please email bug reports to [email protected], ** ** providing as much information as possible -- your ** ** hardware, kernel, patches, settings, all reiserfsck ** ** messages (including version), the reiserfsck logfile, ** ** check the syslog file for any related information. ** ** If you would like advice on using this program, support ** ** is available for $25 at www.namesys.com/support.html. **
*************************************************************Will check superblock and rebuild it if needed
Will put log info to 'stdout'
reiserfs_open: the reiserfs superblock cannot be found on/dev/loop/0.what the version of ReiserFS do you use[1-4]
(1) 3.6.x (2) >=3.5.9 (introduced in the middle of 1999) (if you use linux 2.2,choose this one)
(3) < 3.5.9 converted to new format (don't choose if unsure)
(4) < 3.5.9 (this is very old format, don't choose if unsure)
(X) exit
1Enter block size [4096]:
No journal device was specified. (If journal is not available, re-run with --no-journal-available option specified).
Is journal default? (y/n)[y]:Did you use resizer(y/n)[n]:
rebuild-sb: no uuid found, a new uuid was generated (cfdc6b1c-3e77-483c-a74e-6e846e8ee3ee)rebuild-sb: You either have a corrupted journal or have just changed the start of the partition with some partition table editor. If you are sure that the start of the partition is ok, rebuild the journal header. Do you want to rebuild the journal header? (y/n)[n]: y
Reiserfs super block in block 16 on0x700of format 3.6 with standard journal Count of blocks on the device: 17659440
Number of bitmaps: 539
Blocksize: 4096
Free blocks (count of blocks - used [journal, bitmaps, data, reserved] blocks): 0
Root block: 0
Filesystem is NOT clean
Tree height: 0
Hash function used to sort names: not set
Objectid map size 0, 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:0x1:
some corruptions exist.sb_version: 2
inode generation number: 0
UUID: cfdc6b1c-3e77-483c-a74e-6e846e8ee3ee
LABEL:
Set flags in SB:
Is this ok ? (y/n)[n]: y
The fs may still be unconsistent. Run reiserfsck --check.root@marvin:/home/kris 1$ # reiserfsck -y
/dev/loop/0--check reiserfsck 3.6.19 (2003 www.namesys.com)*************************************************************
** If you are using the latest reiserfsprogs and it fails ** ** please email bug reports to [email protected], ** ** providing as much information as possible -- your ** ** hardware, kernel, patches, settings, all reiserfsck ** ** messages (including version), the reiserfsck logfile, ** ** check the syslog file for any related information. ** ** If you would like advice on using this program, support ** ** is available for $25 at www.namesys.com/support.html. **
*************************************************************Will read-only check consistency of the filesystem on
/dev/loop/0Will put log info to 'stdout'
###########
reiserfsck --check started at Thu Feb 10 13:16:29 2005
###########
Replaying journal..
Reiserfs journal '/dev/loop/0' in blocks [18..8211]: 0 transactions replayed Zero bit found in on-disk bitmap after the last valid bit. Checking internal tree..Bad root block 0. (--rebuild-tree did not complete)
Aborted
root@marvin:/home/kris 134$ #
Quoted 22 lines · you
Hello
Quoted 15 lines · Christian Placzek
No, I wasn't. It seems mount doesn't recognize the true file system, although the magic exists.
<snip>
00010000 30 76 0D 01 00 00 00 00 00 00 00 00 12 00 00 00 0v.............. 00 00 00 00 00 20 00 00 00 04 00 00 00 00 00 00 ..... .......... 00010020 84 03 00 00 1E 00 00 00 00 00 00 00 00 10 CC 03 ................ 00 00 02 00 52 65 49 73 45 72 32 46 73 00 01 00 ....ReIsEr2Fs... 00010040 00 00 00 00 00 00 1B 02 02 00 00 00 00 00 00 00 ................ 00 00 00 00 CF DC 6B 1C 3E 77 48 3C A7 4E 6E 84 ......k.>wH<.Nn. 00010060 6E 8E E3 EE 00 00 00 00 00 00 00 00 00 00 00 00 n............... 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ <snip>Quoted 3 lines
Maybe the following output is the key. I did this with a fresh copy. Note the number before the '$' sign in the command prompt. It's the error status of the previous command.
Quoted 6 lines
Sorry, I am confused.
You had to do:
dd if=/dev/shreded of=/dev/spare
reiserfsck --rebuild-sb/dev/spare
reiserfsck --rebuild-tree -S/dev/spare
mount/dev/spare/mnt
Okay, done. No output of 'mount' in 'dmesg'.
Quoted 2 lines
Would you try that and let us know the result?
Here it is, but not in full length (28000 lines):
root@marvin:/home/kris 0$ # reiserfsck --rebuild-sb /dev/sdc5 reiserfsck 3.6.19 (2003 www.namesys.com)
*************************************************************
** If you are using the latest reiserfsprogs and it fails ** ** please email bug reports to [email protected], ** ** providing as much information as possible -- your ** ** hardware, kernel, patches, settings, all reiserfsck ** ** messages (including version), the reiserfsck logfile, ** ** check the syslog file for any related information. ** ** If you would like advice on using this program, support ** ** is available for $25 at www.namesys.com/support.html. **
*************************************************************
Will check superblock and rebuild it if needed
Will put log info to 'stdout'
Do you want to run this program?[N/Yes] (note need to type Yes if you do):Yes
reiserfs_open: the reiserfs superblock cannot be found on /dev/sdc5.
what the version of ReiserFS do you use[1-4]
(1) 3.6.x
(2) >=3.5.9 (introduced in the middle of 1999) (if you use linux 2.2, choose this one)
(3) < 3.5.9 converted to new format (don't choose if unsure)
(4) < 3.5.9 (this is very old format, don't choose if unsure)
(X) exit
1
Enter block size [4096]:
No journal device was specified. (If journal is not available, re-run with --no-journal-available option specified).
Is journal default? (y/n)[y]:
Did you use resizer(y/n)[n]:
rebuild-sb: no uuid found, a new uuid was generated (bff1c11a-ba70-4f9e-851d-a81d10b388b9)
rebuild-sb: You either have a corrupted journal or have just changed the start of the partition with some partition table editor. If you are sure that the start of the partition is ok, rebuild the journal header. Do you want to rebuild the journal header? (y/n)[n]: y
Reiserfs super block in block 16 on 0x825 of format 3.6 with standard journal Count of blocks on the device: 27453056
Number of bitmaps: 838
Blocksize: 4096
Free blocks (count of blocks - used [journal, bitmaps, data, reserved] blocks): 0
Root block: 0
Filesystem is NOT clean
Tree height: 0
Hash function used to sort names: not set
Objectid map size 0, 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: 0x1:
some corruptions exist.sb_version: 2
inode generation number: 0
UUID: bff1c11a-ba70-4f9e-851d-a81d10b388b9
LABEL:
Set flags in SB:
Is this ok ? (y/n)[n]: y
The fs may still be unconsistent. Run reiserfsck --check.
root@marvin:/home/kris 1$ # reiserfsck --rebuild-tree -S /dev/sdc5 reiserfsck 3.6.19 (2003 www.namesys.com)
*************************************************************
** Do not run the program with --rebuild-tree unless ** ** something is broken and MAKE A BACKUP before using it. ** ** If you have bad sectors on a drive it is usually a bad ** ** idea to continue using it. Then you probably should get ** ** a working hard drive, copy the file system from the bad ** ** drive to the good one -- dd_rescue is a good tool for **
** that -- and only then run this program. **
** If you are using the latest reiserfsprogs and it fails ** ** please email bug reports to [email protected], ** ** providing as much information as possible -- your ** ** hardware, kernel, patches, settings, all reiserfsck ** ** messages (including version), the reiserfsck logfile, ** ** check the syslog file for any related information. ** ** If you would like advice on using this program, support ** ** is available for $25 at www.namesys.com/support.html. **
*************************************************************
Will rebuild the filesystem (/dev/sdc5) tree
Will put log info to 'stdout'
Do you want to run this program?[N/Yes] (note need to type Yes if you do):Yes Replaying journal..
Reiserfs journal '/dev/sdc5' in blocks [18..8211]: 0 transactions replayed Zero bit found in on-disk bitmap after the last valid bit. Fixed.
###########
reiserfsck --rebuild-tree started at Thu Feb 10 22:19:12 2005
###########
Pass 0:
####### Pass 0 #######
The whole partition (27453056 blocks) is to be scanned
Skipping 9048 blocks (super block, journal, bitmaps) 27444008 blocks will be read
0%block 945510: The number of items (12) is incorrect, should be (1) - corrected
block 945510: The free space (1) is incorrect, should be (976) - corrected
pass0: vpf-10110: block 945510, item (0): Unknown item type found [436207872 50333952 0x1000172d2000000 ??? (13)] - deleted
...block 3519623: The number of items (64768) is incorrect, should be (1) - corrected
block 3519623: The free space (2560) is incorrect, should be (208) - corrected
pass0: vpf-10110: block 3519623, item (0): Unknown item type found [16781056 255904190 0xc7fb8100 ??? (15)] - deleted
block 3904473: The number of items (64768) is incorrect, should be (1) - corrected
block 3904473: The free space (2560) is incorrect, should be (208) - corrected
pass0: vpf-10110: block 3904473, item (0): Unknown item type found [16781056 255901224 0xbd590100 ??? (15)] - deleted
block 3908406: The number of items (64768) is incorrect, should be (1) - corrected
block 3908406: The free space (2560) is incorrect, should be (208) - corrected
pass0: vpf-10110: block 3908406, item (0): Unknown item type found [16781056 255901416 0xbe770100 ??? (15)] - deleted
.20%block 5654267: The number of items (6144) is incorrect, should be (1) - corrected
block 5654267: The free space (65280) is incorrect, should be (208) - corrected
pass0: vpf-10110: block 5654267, item (0): Unknown item type found [65280 0 0x1000902040dd401 ??? (14)] - deleted
.block 7061833: The number of items (8) is incorrect, should be (1) - corrected
block 7061833: The free space (519) is incorrect, should be (1744) - corrected
pass0: vpf-10110: block 7061833, item (0): Unknown item type found [179306496 4294903918 0x50008 ??? (15)] - deleted
.block 8763031: The free space (1) is incorrect, should be (3792) - corrected
pass0: vpf-10110: block 8763031, item (0): Unknown item type found [65537 65541 0x1000385 ??? (15)] - deleted
..block 10833304: The number of items (6144) is incorrect, should be (1) - corrected
block 10833304: The free space (65280) is incorrect, should be (208) - corrected
pass0: vpf-10110: block 10833304, item (0): Unknown item type found [65280 0 0x1000902040dd401 ??? (14)] - deleted
40%block 11827048: The number of items (64768) is incorrect, should be (1) - corrected
block 11827048: The free space (2560) is incorrect, should be (208) - corrected
pass0: vpf-10110: block 11827048, item (0): Unknown item type found [2533363456 2675698929 0x3000e02033feaad ??? (4)] - deleted
block 11827165: The number of items (64768) is incorrect, should be (1) - corrected
block 11827165: The free space (2560) is incorrect, should be (208) - corrected
pass0: vpf-10110: block 11827165, item (0): Unknown item type found [2248150784 3026506910 0x7000e02033fed78 ??? (12)] - deleted ..block 14201002: The number of items (21) is incorrect, should be (1) - corrected
block 14201002: The free space (3) is incorrect, should be (208) - corrected
pass0: vpf-10110: block 14201002, item (0): Unknown item type found [587661575 118031107 0x7270001 ??? (15)] - deleted
..60%block 17556778: The number of items (52686) is incorrect, should be (1) - corrected
block 17556778: The free space (1) is incorrect, should be (4048) - corrected
pass0: vpf-10110: block 17556778, item (0): Unknown item type found [655372 3452371000 0xcdcf0001 ??? (15)] - deleted
....80%....100% left 0, 6293 /sec
656016 directory entries were hashed with "r5" hash.
Selected hash ("r5") does not match to the hash set in the super block (not set).
"r5" hash is selected
Flushing..finished
Read blocks (but not data blocks) 27444008
Leaves among those 131577
- leaves all contents of which could not be saved and
deleted 22
Objectids found 572033
Pass 1 (will try to insert 131555 leaves):
####### Pass 1 #######
Looking for allocable blocks .. finished
0%....20%....40%....60%....80%....100% left 0,
265 /sec
Flushing..finished
131555 leaves read
127311 inserted
- pointers in indirect items pointing to metadata 2064 (zeroed)
4244 not inserted
non-unique pointers in indirect items (zeroed) 436534
####### Pass 2 #######
Pass 2:
0%rewrite_file: 2 items of file [564389 598696] moved to [564389 3086], 40 /sec
...rewrite_file: 2 items of file [996458 996461] moved to [996458 3089]7 /secrewrite_file: 2 items of file [996482 996485] moved to [996482 3092] .rewrite_file: 2 items of file [998913 998916] moved to [998913 3101] /sec 20%....40%..vpf-10260: The file we are inserting the new item (93570 691287 0x1 DRCT (2), len 208, location 3888 entry count 65535, fsck need 0, format new) into has no StatData, insertion was skipped
vpf-10260: The file we are inserting the new item (94064 269765 0x1 DRCT (2), len 408, location 3688 entry count 65535, fsck need 0, format new) into has no StatData, insertion was skipped
vpf-10260: The file we are inserting the new item (105546 881824 0xb4001 IND (1), len 680, location 3416 entry count 0, fsck need 0, format new) into has no StatData, insertion was skipped
vpf-10260: The file we are inserting the new item (93946 740012 0x11 DRCT (2), len 768, location 3328 entry count 65535, fsck need 0, format new) into has no StatData, insertion was skipped
.vpf-10260: The file we are inserting the new item (95418 950003 0x1 DRCT (2), len 272, location 3824 entry count 65535, fsck need 0, format new) into has no StatData, insertion was skipped
vpf-10260: The file we are inserting the new item (94104 656463 0xa1 DRCT (2), len 520, location 3576 entry count 65535, fsck need 0, format new) into has no StatData, insertion was skipped
vpf-10260: The file we are inserting the new item (95302 609146 0x1 DRCT (2), len 744, location 3352 entry count 65535, fsck need 0, format new) into has no StatData, insertion was skipped
vpf-10260: The file we are inserting the new item (94104 709993 0x1e9 DRCT (2), len 296, location 3800 entry count 65535, fsck need 0, format new) into has no StatData, insertion was skipped
vpf-10260: The file we are inserting the new item (93912 919878 0x131 DRCT (2), len 176, location 3920 entry count 65535, fsck need 0, format new) into has no StatData, insertion was skipped
vpf-10260: The file we are inserting the new item (94163 662251 0x211 DRCT (2), len 104, location 3992 entry count 65535, fsck need 0, format new) into has no StatData, insertion was skipped
.vpf-10260: The file we are inserting the new item (282820 112803 0x27f001 IND (1), len 4048, location 48 entry count 0, fsck need 0, format new) into has no StatData, insertion was skipped
...
...
... (here follow thousends of lines, which I removed)
...
...rewrite_file: 2 items of file [1022678 1042260] moved to [1022678 241698]rewrite_file: 2 items of file [1022712 1026510] moved to [1022712 241699]rewrite_file: 2 items of file [1026066 1042203] moved to [1026066 241700]rewrite_file: 2 items of file [1031541 999149] moved to [1031541 241709]rewrite_file: 2 items of file [1031544 1031454] moved to [1031544 241713]rewrite_file: 2 items of file [1033597 711929] moved to [1033597 241714]
vpf-10680: The file [1039539 1039546] has the wrong block count in the StatData (10576) - corrected to (9272)rewrite_file: 2 items of file [1040370 1027097] moved to [1040370 241716]rewrite_file: 2 items of file [1040371 1027102] moved to [1040371 241719]rewrite_file: 2 items of file [1041147 1022968] moved to [1041147 241720]rewrite_file: 2 items of file [1041147 1022969] moved to [1041147 241721] Flushing..finished99, 80 /sec
Objects without names 13893
Empty lost dirs removed 96
Dirs linked to /lost+found: 1410
Dirs without stat data found 51
Files linked to /lost+found 12483
Objects having used objectids: 2327
files fixed 2248
dirs fixed 79
Pass 4 - finished done 129646, 61 /sec
Deleted unreachable items 1587
Flushing..finished
Syncing..finished
###########
reiserfsck finished at Fri Feb 11 00:15:28 2005
###########
root@marvin:/home/kris 1$ # mount /dev/sdc5 /mnt/temp1 root@marvin:/home/kris 0$ # ls -la /mnt/temp1
total 21
drwxr-xr-x 3 root root 4096 Jan 20 11:36 .
drwxr-xr-x 39 root root 968 Feb 6 14:12 ..
drwx------ 2 root root 16384 Jan 20 11:36 lost+found
root@marvin:/home/kris 0$ # ls -la /mnt/temp1/lost+found/
total 20
drwx------ 2 root root 16384 Jan 20 11:36 .
drwxr-xr-x 3 root root 4096 Jan 20 11:36 .. root@marvin:/home/kris 0$ #
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 49 lines · you
Hello.
Quoted 46 lines · Christian Placzek
Quoted 34 lines · Vladimir Saveliev
Hello
Quoted 31 lines · Christian Placzek
Quoted 22 lines · you
Hello
Quoted 14 lines · Christian Placzek
Hello,
a friend of mine shredded his data (70GB) when he tried to undelete an accidentally deleted file. He normally works with windoze. Therefore he didn't know he couldn't undelete a file on a reiserfs partition with ext2 undelete tool %-(
When he called me it was already too late. He had overwritten the superblock :-(I'm still trying to rescue the data. I can see them in the image using grep or hexedit. But nothing I tried has been successful. My first steps were unmounting the partition, taking an image and working with a copy of this image using a loop back device.
Quoted 4 lines
All files have been retrieved but were removed by reiserfsck --check although the last output says that directories and files have been linked (see below). I tried with many combinations nearly all parameters of reiserfsck: --fix-fixable --no-journal-available -S ...
Quoted 4 lines
have you tried
reiserfsck --rebuild-tree -S
?
If not, run it on newly created copy of shredded device.Yes, I did. The output of reiserfsck --rebuild-tree gave other numbers of linked directories/files. But I can't see them.
Quoted 6 lines
Quoted 3 lines
Quoted 1 line
Did you look at lost+found?
Shure, see below.
can you do
debugreiserfs -p -S/dev/shredded| bzip2 -c > meta.bz2Okay, I've done two versions, one with and one without '-S'. I applied the following commands to the image copy (the image itself is untouched, I always worked with fresh copies):
Quoted 8 lines
Quoted 3 lines
# reiserfsck -y /dev/loop/0 --rebuild-sb # reiserfsck -y /dev/loop/0 --check # reiserfsck -y /dev/loop/0 --rebuild-tree^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Sorry, do I understand correctly that you tried to mount/dev/loop/0with -t reiserfs option after__this__reiserfsck --rebuild-tree? Not after the following ones?
Let me explain my mode of operation: I make a copy of the original image taken of the harddrive. Then I use 'losetup' or 'mount -o loop' in order to mount the image as device. Next I perform different operations using 'reiserfsck'. Above you see _one_ possiblity. Then I mount the image as filesystem using 'mount -o ro /dev/loop/0 /mnt/temp1/', and, as I described below, I get no directories or files. Mounting with '-t reiserfs' always result in following output:
mount: wrong fs type, bad option, bad superblock on /dev/loop/0,
or too many mounted file systems
Quoted 1 line
What kernel do you use?
2.6.10-gentoo-r6
Quoted 415 lines
Thanks,
Lena.Quoted 411 lines
# debugreiserfs -p /dev/loop/0 | bzip2 -c > meta.bz2 # reiserfsck -y /dev/loop/0 --rebuild-tree -S # debugreiserfs -p /dev/loop/0 | bzip2 -c > meta-S.bz2Use ftp://80.133.138.104:12121 user: marc pw: tukli
Lena gave me another hint:
Quoted 16 lines
Quoted 5 lines
Sorry, but what does df -T say?
Does it say that reiserfs filesystem is mounted on/mnt/temp1?Thanks,
Lena.No, it replied:
# /dev/loop/0 ext2 69529276 20 65997368 1% /mnt/temp1If I force mount with -t reiserfs it says:
root@marvin:/home/kris 0$ # mount -o ro -t reiserfs/dev/loop/0/mnt/temp1/mount: wrong fs type, bad option, bad superblock on/dev/loop/0, or too many mounted file systemsQuoted 2 lines
Thanks, this is a good hint, but I don't know how to change the identifier
of
Quoted 4 lines
the filesystem. I know that normally mkfs.* does this task, but my friend's overwriting of the superblock probably has changed the identifier of the filesystem. Is it possible to apply mkreiserfs on the image whithout running the risk to lose any data?
Thanks
KrisQuoted 375 lines
and let us to download meta.bz2 so that we can take a look why lost+found gets emptied.
Quoted 372 lines
Quoted 372 lines
Quoted 372 lines
I mounted the image after each operation, but all I can see is:
root@marvin:/home/kris 0$ # mount -o ro
/dev/loop/0/mnt/temp1/root@marvin:/home/kris 0$ # ls -la/mnt/temp1/
total 21
drwxr-xr-x 3 root root 4096 Jan 20 11:36 .
drwxr-xr-x 39 root root 968 Feb 6 14:12 ..
drwx------ 2 root root 16384 Jan 20 11:36 lost+found
root@marvin:/home/kris 0$ # ls -la/mnt/temp1/lost+found/total 20
drwx------ 2 root root 16384 Jan 20 11:36 . drwxr-xr-x 3 root root 4096 Jan 20 11:36 .. root@marvin:/home/kris 0$ #Do you have any suggestions how to rescue the data?
Regards
KrisHere you see a typical output:
root@marvin:/home/kris 0$ # losetup
/dev/loop/0/mnt/temp/data.x.ddroot@marvin:/home/kris 0$ # reiserfsck/dev/loop/0--rebuild-tree reiserfsck 3.6.19 (2003 www.namesys.com)<snip>
Will rebuild the filesystem (
/dev/loop/0) tree
Will put log info to 'stdout'Do you want to run this program?[N/Yes] (note need to type Yes if you do):Yes
reiserfs_open: the reiserfs superblock cannot be found on/dev/loop/0. Failed to open the filesystem.If the partition table has not been changed, and the partition is valid and it really contains a reiserfs partition, then the superblock is corrupted and you need to run this utility with --rebuild-sb.
root@marvin:/home/kris 8$ # reiserfsck
/dev/loop/0--rebuild-sb reiserfsck 3.6.19 (2003 www.namesys.com)<snip>
Will check superblock and rebuild it if needed
Will put log info to 'stdout'
reiserfs_open: the reiserfs superblock cannot be found on/dev/loop/0.what the version of ReiserFS do you use[1-4]
(1) 3.6.x (2) >=3.5.9 (introduced in the middle of 1999) (if you uselinux 2.2, choose this one)
(3) < 3.5.9 converted to new format (don't choose if unsure)
(4) < 3.5.9 (this is very old format, don't choose if unsure)
(X) exit
1Enter block size [4096]:
No journal device was specified. (If journal is not available, re-run with --no-journal-available option specified).
Is journal default? (y/n)[y]:Did you use resizer(y/n)[n]:
rebuild-sb: no uuid found, a new uuid was generated (7e253707-4fef-42aa-9785-b1cd079851af)rebuild-sb: You either have a corrupted journal or have just changed the start of the partition with some partition table editor. If you are sure that the start of the partition is ok, rebuild the journal header. Do you want to rebuild the journal header? (y/n)[n]: y Reiserfs super block in block 16 on
0x700of format 3.6 with standard journal Count of blocks on the device: 17659440
Number of bitmaps: 539
Blocksize: 4096
Free blocks (count of blocks - used [journal, bitmaps, data, reserved] blocks): 0
Root block: 0
Filesystem is NOT clean
Tree height: 0
Hash function used to sort names: not set
Objectid map size 0, max 972
Journal parameters:Device [0x0] Magic [0x0] Size 8193 blocks (including 1 for journal header) (firstblock 18) Max transaction length 1024 blocks
Max batch size 900 blocks
Max commit age 30
Blocks reserved by journal: 0
Fs state field:0x1:
some corruptions exist.sb_version: 2
inode generation number: 0
UUID: 7e253707-4fef-42aa-9785-b1cd079851af LABEL:
Set flags in SB:
Is this ok ? (y/n)[n]: y
The fs may still be unconsistent. Run reiserfsck --check.root@marvin:/home/kris 1$ # reiserfsck
/dev/loop/0--check reiserfsck 3.6.19 (2003 www.namesys.com)<snip>
Will read-only check consistency of the filesystem on
/dev/loop/0Will put log info to 'stdout'
###########
reiserfsck --check started at Tue Feb 8 17:17:31 2005
###########
Replaying journal..
Reiserfs journal '/dev/loop/0' in blocks [18..8211]: 0 transactions replayed Zero bit found in on-disk bitmap after the last valid bit. Checking internal tree..Bad root block 0. (--rebuild-tree did not complete)
Aborted
root@marvin:/home/kris 134$ # reiserfsck/dev/loop/0-y --rebuild-tree reiserfsck 3.6.19 (2003 www.namesys.com)<snip>
Will rebuild the filesystem (
/dev/loop/0) tree
Will put log info to 'stdout'Do you want to run this program?[N/Yes] (note need to type Yes if you do):Yes Replaying journal..
Reiserfs journal '/dev/loop/0' in blocks [18..8211]: 0 transactions replayed Zero bit found in on-disk bitmap after the last valid bit. Fixed. ###########
reiserfsck --rebuild-tree started at Tue Feb 8 17:37:56 2005
###########Pass 0:
####### Pass 0 #######
Loading on-disk bitmap .. ok, 559628 blocks marked usedinit_source_bitmap: Bitmap 0 (of 32768 bits) is wrong - mark all blocks [0 - 32768] as usedinit_source_bitmap: Bitmap 1 (of 32768 bits) is wrong - mark all blocks [32768 - 65536] as usedinit_source_bitmap: Bitmap 3 (of 32768 bits) is wrong - mark all blocks [98304 - 131072] as usedinit_source_bitmap: Bitmap 5 (of 32768 bits) is wrong - mark all blocks [163840 - 196608] as usedinit_source_bitmap: Bitmap 7 (of 32768 bits) is wrong - mark all blocks [229376 - 262144] as usedinit_source_bitmap: Bitmap 9 (of 32768 bits) is wrong - mark all blocks [294912 - 327680] as usedinit_source_bitmap: Bitmap 25 (of 32768 bits) is wrong - mark all blocks [819200 - 851968] as usedinit_source_bitmap: Bitmap 27 (of 32768 bits) is wrong - mark all blocks [884736 - 917504] as usedinit_source_bitmap: Bitmap 49 (of 32768 bits) is wrong - mark all blocks [1605632 - 1638400] as usedinit_source_bitmap: Bitmap 81 (of 32768 bits) is wrong - mark all blocks [2654208 - 2686976] as usedinit_source_bitmap: Bitmap 125 (of 32768 bits) is wrong - mark all blocks [4096000 - 4128768] as usedinit_source_bitmap: Bitmap 243 (of 32768 bits) is wrong - mark all blocks [7962624 - 7995392] as usedinit_source_bitmap: Bitmap 343 (of 32768 bits) is wrong - mark all blocks [11239424 - 11272192] as used
Skipping 8749 blocks (super block, journal, bitmaps) 687599 blocks will be read
0%....20%....40%....60%....80%....100% left 0,
9549 /sec
103101 directory entries were hashed with "r5" hash. Selected hash ("r5") does not match to the hash set in the super block (not set).
"r5" hash is selected
Flushing..finished
Read blocks (but not data blocks) 687599
Leaves among those 20621
Objectids found 114185Pass 1 (will try to insert 20621 leaves):
####### Pass 1 #######
Looking for allocable blocks .. finished
0%....20%....40%....60%....80%....100% left 0,
1718 /sec
Flushing..finished20621 leaves read 20524 inserted - pointers in indirect items pointing tometadata 3 (zeroed)
97 not inserted
non-unique pointers in indirect items (zeroed) 1075
####### Pass 2 #######Pass 2:
0%....20%....40%....60%vpf-10260: The file we are inserting the new item (69291 693270x1DRCT (2), len 216, location 3880 entry count 65535, fsck need 0, format new) into has no StatData, insertion was skipped ....vpf-10260: The file we are inserting the new item (240148 2401500x1IND (1), len 1844, location 2252 entry count 0, fsck need 0, format new) into has no StatData, insertion was skipped
vpf-10260: The file we are inserting the new item (241304 3192110x43001IND (1), len 492, location 3604 entry count 0, fsck need 0, format new) into has no StatData, insertion was skipped
vpf-10260: The file we are inserting the new item (737518 7398130xe6001IND (1), len 688, location 3408 entry count 0, fsck need 0, format new) into has no StatData, insertion was skipped 80%vpf-10260: The file we are inserting the new item (737518 7398130xe6001IND (1), len 688, location 3408 entry count 0, fsck need 0, format new) into has no StatData, insertion was skipped
vpf-10260: The file we are inserting the new item (25 930140x1e1DRCT (2), len 1408, location 2688 entry count 65535, fsck need 0, format new) intohas no StatData, insertion was skipped
vpf-10260: The file we are inserting the new item (238343 3193060x3f4001IND (1), len 136, location 3960 entry count 0, fsck need 0, format new) into has no StatData, insertion was skipped
vpf-10260: The file we are inserting the new item (94077 1199200x1DRCT (2), len 456, location 3640 entry count 65535, fsck need 0, format new) into has no StatData, insertion was skipped
vpf-10260: The file we are inserting the new item (102491 2203970x179DRCT (2), len 1264, location 2832 entry count 65535, fsck need 0, format new)into has no StatData, insertion was skipped .vpf-10260: The file we are inserting the new item (642448 7717210xcc1DRCT (2), len 520, location 3576 entry count 65535, fsck need 0, format new)into has no StatData, insertion was skipped .vpf-10260: The file we are inserting the new item (294390 6927520x129DRCT (2), len 296, location 3800 entry count 65535, fsck need 0, format new)into has no StatData, insertion was skipped
vpf-10260: The file we are inserting the new item (294390 6927520x129DRCT (2), len 296, location 3800 entry count 65535, fsck need 0, format new) into has no StatData, insertion was skipped
vpf-10260: The file we are inserting the new item (294390 6927520x129DRCT (2), len 296, location 3800 entry count 65535, fsck need 0, format new) into has no StatData, insertion was skipped .vpf-10260: The file we are inserting the new item (294390 6927520x129DRCT (2), len 296, location 3800 entry count 65535, fsck need 0, format new)into has no StatData, insertion was skipped
vpf-10260: The file we are inserting the new item (294390 6927520x129DRCT (2), len 296, location 3800 entry count 65535, fsck need 0, format new) into has no StatData, insertion was skipped
vpf-10260: The file we are inserting the new item (294390 6927520x129DRCT (2), len 296, location 3800 entry count 65535, fsck need 0, format new) into has no StatData, insertion was skipped
vpf-10260: The file we are inserting the new item (294390 6927520x129DRCT (2), len 296, location 3800 entry count 65535, fsck need 0, format new) into has no StatData, insertion was skipped
vpf-10260: The file we are inserting the new item (294390 6927520x129DRCT (2), len 296, location 3800 entry count 65535, fsck need 0, format new) into has no StatData, insertion was skipped .vpf-10260: The file we are inserting the new item (294390 6927520x129DRCT (2), len 296, location 3800 entry count 65535, fsck need 0, format new)into has no StatData, insertion was skipped
vpf-10260: The file we are inserting the new item (294390 6927520x129DRCT (2), len 296, location 3800 entry count 65535, fsck need 0, format new) into has no StatData, insertion was skipped
vpf-10260: The file we are inserting the new item (294390 6927520x129DRCT (2), len 296, location 3800 entry count 65535, fsck need 0, format new) into has no StatData, insertion was skipped
vpf-10260: The file we are inserting the new item (294390 6927520x129DRCT (2), len 296, location 3800 entry count 65535, fsck need 0, format new) into has no StatData, insertion was skipped
100% left 0, 0 /sec
Flushing..finished
Leaves inserted item by item 97
Pass 3 (semantic):
####### Pass 3 #########
/binrebuild_semantic_pass: The entry [3636 189939] ("ls") in directory [2 3636] points to nowhere - is removed /javarebuild_semantic_pass: The entry [107571 597512] ("jre") in directory [3636 107571] points to nowhere - is removed
vpf-10650: The directory [3636 107571] has the wrong size in the StatData (72) - corrected to (48)
vpf-10650: The directory [2 3636] has the wrong size in the StatData (2920) - corrected to (2896)
/devrebuild_semantic_pass: The entry [6 554632] ("lvm") in directory [2 6] points to nowhere - is removedrebuild_semantic_pass: The entry [6 52003] ("lirc") in directory [2 6] points to nowhere - is removedrebuild_semantic_pass: The entry [6 72207] ("scsi") in directory [2 6] points to nowhere - is removedrebuild_semantic_pass: The entry [6 50738] ("xdb5") in directory [2 6] points to nowhere - is removedrebuild_semantic_pass: The entry [6 50739] ("xdb6") in directory [2 6] points to nowhere - is removedrebuild_semantic_pass: The entry [6 50740] ("xdb7") in directory [2 6] points to nowhere - is removedrebuild_semantic_pass: The entry [6 50741] ("xdb8") in directory [2 6] points to nowhere - is removed
...
... (here follow hundreds of directories and thousends of files, too, ... which I removed)
...
The entry [994339 994340] ("Entries") in directory [994335 19] updated to point to [994339 49] /Entries.Extra.Oldrewrite_file: 1 items of file [994339 994343] moved to [994339 50]
The entry [994339 994343] ("Entries.Extra.Old") in directory [994335 19] updated to point to [994339 50]relocate_dir: Moving [994350 9947730x0SD (0)] to [994350 510x0SD (0)]relocate_dir: Moving [994350 9947730x1DIR (3)] to [994350 510x1DIR (3)] /994350_51get_next_directory_item: The entry ".." of the directory [994350 51] pointes to [285394 994350], instead of [2 18] - correctedrebuild_semantic_pass: The entry [994773 994783] ("Root") in directory [994350 51] points to nowhere - is removedrebuild_semantic_pass: The entry [994773 994776] ("Entries.Extra") in directory [994350 51] points to nowhere - is removedrebuild_semantic_pass: The entry [994773 994782] ("Repository") in directory [994350 51] points to nowhere - is removedrebuild_semantic_pass: The entry [994773 994779] ("Entries.Extra.Old.bak") in directory [994350 51] points to nowhere
- is removedrebuild_semantic_pass: The entry [994773 994784] ("Root.bak") in directory [994350 51] points to nowhere - is removedrebuild_semantic_pass: The entry [994773 994780] ("Entries.Old") in directory [994350 51] points to nowhere - is removedrebuild_semantic_pass: The entry [994773 994775] ("Entries.bak") in directory [994350 51] points to nowhere - is removedrebuild_semantic_pass: The entry [994773 994781] ("Entries.Old.bak") in directory [994350 51] points to nowhere - is removedrebuild_semantic_pass: The entry [994773 994778] ("Entries.Extra.Old") in directory [994350 51] points to nowhere - is removedrebuild_semantic_pass: The entry [994773 994777] ("Entries.Extra.bak") in directory [994350 51] points to nowhere - is removed
vpf-10650: The directory [994350 51] has the wrong size in the StatData (400) - corrected to (72) /994395_994396get_next_directory_item: The entry ".." of the directory [994395 994396] pointes to [684030 994395], instead of [2 18] - corrected /994415_994416get_next_directory_item: The entry ".." of the directory [994415 994416] pointes to [684030 994415], instead of [2 18] - corrected /994529_994754get_next_directory_item: The entry ".." of the directory [994529 994754] pointes to [984867 994529], instead of [2 18] - corrected Looking for lost files:
vpf-10670: The file [25 93091] has the wrong size in the StatData (30352) - corrected to (36864)
vpf-10680: The file [25 93091] has the wrong block count in the StatData (64) - corrected to (72)
vpf-10680: The file [25 111982] has the wrong block count in the StatData (75408) - corrected to (16872)
vpf-10680: The file [3127 59061] has the wrong block count in the StatData (8) - corrected to (0)
vpf-10680: The file [3128 72300] has the wrong block count in the StatData (8) - corrected to (0)
vpf-10680: The file [3620 18950] has the wrong block count in the StatData (8) - corrected to (0)
...
...
...rewrite_file: 2 items of file [994350 994764] moved to [994350 3108]rewrite_file: 2 items of file [994350 994765] moved to [994350 3109]rewrite_file: 2 items of file [994350 994766] moved to [994350 3110] Flushing..finished
Objects without names 18403
Empty lost dirs removed 384
Dirs linked to /lost+found: 2174
Dirs without stat data found 83
Files linked to /lost+found 16229
Objects having used objectids: 49
files fixed 47
dirs fixed 2
Pass 4 - finished done 1476, 37 /sec
Deleted unreachable items 716
Flushing..finished
Syncing..finished
###########
reiserfsck finished at Tue Feb 8 17:40:05 2005
###########
Quoted 68 lines · Christian Placzek
Quoted 50 lines · you
Hello.
Quoted 47 lines · Christian Placzek
Quoted 35 lines · Vladimir Saveliev
Hello
Quoted 32 lines · Christian Placzek
Quoted 23 lines · you
Hello
Quoted 14 lines · Christian Placzek
Hello,
a friend of mine shredded his data (70GB) when he tried to undelete an accidentally deleted file. He normally works with windoze. Therefore he didn't know he couldn't undelete a file on a reiserfs partition with ext2 undelete tool %-(
When he called me it was already too late. He had overwritten the superblock :-(I'm still trying to rescue the data. I can see them in the image using grep or hexedit. But nothing I tried has been successful. My first steps were unmounting the partition, taking an image and working with a copy of this image using a loop back device.
Quoted 5 lines
All files have been retrieved but were removed by reiserfsck --check although the last output says that directories and files have been linked (see below). I tried with many combinations nearly all parameters of reiserfsck: --fix-fixable --no-journal-available -S
...Quoted 4 lines
have you tried
reiserfsck --rebuild-tree -S
?
If not, run it on newly created copy of shredded device.Yes, I did. The output of reiserfsck --rebuild-tree gave other numbers of linked directories/files. But I can't see them.
Quoted 6 lines
Quoted 3 lines
Quoted 1 line
Did you look at lost+found?
Shure, see below.
can you do
debugreiserfs -p -S/dev/shredded| bzip2 -c > meta.bz2Okay, I've done two versions, one with and one without '-S'. I applied the following commands to the image copy (the image itself is untouched, I always worked with fresh copies):
Quoted 8 lines
Quoted 3 lines
# reiserfsck -y /dev/loop/0 --rebuild-sb # reiserfsck -y /dev/loop/0 --check # reiserfsck -y /dev/loop/0 --rebuild-tree^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Sorry, do I understand correctly that you tried to mount/dev/loop/0with -t reiserfs option after__this__reiserfsck --rebuild-tree? Not after the following ones?Let me explain my mode of operation: I make a copy of the original image taken of the harddrive. Then I use 'losetup' or 'mount -o loop' in order to mount the image as device. Next I perform different operations using 'reiserfsck'. Above you see _one_ possiblity. Then I mount the image as filesystem using 'mount -o ro
/dev/loop/0/mnt/temp1/', and, as I described below, I get no directories or files. Mounting with '-t reiserfs' always result in following output:
Quoted 2 lines
mount: wrong fs type, bad option, bad superblock on
/dev/loop/0,
or too many mounted file systems
after rebuilding the tree, does 'reiserfsck --check <device>' see these files? do you have a reiserfs support in the kernel?
what if you zero the first 64K with
dd conv=notrunc if=/dev/zero of=<device> bs=4096 count=16
can you mount it now? (rebuild-tree should already complete by the mount time).
do you have anything related in the syslog about the mount time?
Signature · 2 lines
Thanks, Vitaly Fertman
Quoted 69 lines · you
Quoted 68 lines · Christian Placzek
Quoted 50 lines · you
Hello.
Quoted 47 lines · Christian Placzek
Quoted 35 lines · Vladimir Saveliev
Hello
Quoted 32 lines · Christian Placzek
Quoted 23 lines · you
Hello
Quoted 14 lines · Christian Placzek
Hello,
a friend of mine shredded his data (70GB) when he tried to undelete an accidentally deleted file. He normally works with windoze. Therefore he didn't know he couldn't undelete a file on a reiserfs partition with ext2 undelete tool %-(
When he called me it was already too late. He had overwritten the superblock :-(I'm still trying to rescue the data. I can see them in the image using grep or hexedit. But nothing I tried has been successful. My first steps were unmounting the partition, taking an image and working with a copy of this image using a loop back device.
Quoted 5 lines
All files have been retrieved but were removed by reiserfsck --check although the last output says that directories and files have been linked (see below). I tried with many combinations nearly all parameters of reiserfsck: --fix-fixable --no-journal-available -S ...
Quoted 4 lines
have you tried
reiserfsck --rebuild-tree -S
?
If not, run it on newly created copy of shredded device.Yes, I did. The output of reiserfsck --rebuild-tree gave other numbers of linked directories/files. But I can't see them.
Quoted 6 lines
Quoted 3 lines
Quoted 1 line
Did you look at lost+found?
Shure, see below.
can you do
debugreiserfs -p -S/dev/shredded| bzip2 -c > meta.bz2Okay, I've done two versions, one with and one without '-S'. I applied the following commands to the image copy (the image itself is untouched, I always worked with fresh copies):
Quoted 8 lines
Quoted 3 lines
# reiserfsck -y /dev/loop/0 --rebuild-sb # reiserfsck -y /dev/loop/0 --check # reiserfsck -y /dev/loop/0 --rebuild-tree^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Sorry, do I understand correctly that you tried to mount/dev/loop/0with -t reiserfs option after__this__reiserfsck --rebuild-tree? Not after the following ones?Let me explain my mode of operation: I make a copy of the original image taken of the harddrive. Then I use 'losetup' or 'mount -o loop' in order to mount the image as device. Next I perform different operations using 'reiserfsck'. Above you see _one_ possiblity. Then I mount the image as filesystem using 'mount -o ro
/dev/loop/0/mnt/temp1/', and, as I described below, I get no directories or files. Mounting with '-t reiserfs' always result in following output:
Quoted 5 lines
Quoted 2 lines
mount: wrong fs type, bad option, bad superblock on
/dev/loop/0,
or too many mounted file systemsafter rebuilding the tree, does 'reiserfsck --check <device>' see these files?
Yes, see my original email from 08.02.2005 23:21. The original output has a length of about 13000 lines. A extract looks like this:
...rebuild_semantic_pass: The entry [741258 1025777] ("www.firstname.de.ico") in directory [296134 741258] points to nowhere - is removedrewrite_file: 2 items of file [741258 1041142] moved to [741258 93475] The entry [741258 1041142] ("deltab.de.ico") in directory [296134 741258] updated to point to [741258 93475]rewrite_file: 2 items of file [741258 1041137] moved to [741258 93569] The entry [741258 1041137] ("www.bild.t-online.de.ico") in directory [296134 741258] updated to point to [741258 93569]
...
The last lines:
...
Flushing..finished
Objects without names 18403
Empty lost dirs removed 384
Dirs linked to /lost+found: 2174
Dirs without stat data found 83
Files linked to /lost+found 16229
Objects having used objectids: 49
files fixed 47
dirs fixed 2
Pass 4 - finished done 1476, 37 /sec
Deleted unreachable items 716
Flushing..finished
Syncing..finished
###########
reiserfsck finished at Tue Feb 8 17:40:05 2005
...
Most of the files were removed by 'reiserfsck --check <device>'.
Quoted 1 line
do you have a reiserfs support in the kernel?
Sure, one of my data partition is reiserfs:
...
root@marvin:~ 0$ # debugreiserfs -J /dev/hda7
debugreiserfs 3.6.19 (2003 www.namesys.com)
Filesystem state: consistency is not checked after last mounting
Reiserfs super block in block 16 on 0x307 of format 3.6 with standard journal Count of blocks on the device: 4393769
...
Quoted 5 lines
what if you zero the first 64K with
dd conv=notrunc if=/dev/zero of=<device> bs=4096 count=16
can you mount it now? (rebuild-tree should already complete by the mount time).
Hurray, this is the trick! I don't understand why, but I can see hundreds of directories and thousends of files. Thanks a lot!!!
Quoted 2 lines
do you have anything related in the syslog about the mount time?
This is the first time 'dmesg' gives an output:
ReiserFS: sdc5: found reiserfs format "3.6" with standard journal
ReiserFS: sdc5: using ordered data mode
ReiserFS: sdc5: journal params: device sdc5, size 8192, journal first block 18, max trans len 1024, max batch 900, max commit age 30, max trans age 30
ReiserFS: sdc5: checking transaction log (sdc5)
ReiserFS: sdc5: Using r5 hash to sort names
Could you give me a technical describtion why this worked?
Again, thank you very much!
Kris
Quoted 37 lines
Quoted 2 lines
after rebuilding the tree, does 'reiserfsck --check <device>' see these files?
Yes, see my original email from 08.02.2005 23:21. The original output has a length of about 13000 lines. A extract looks like this:
...
rebuild_semantic_pass: The entry [741258 1025777] ("www.firstname.de.ico") in directory [296134 741258] points to nowhere - is removedrewrite_file: 2 items of file [741258 1041142] moved to [741258 93475] The entry [741258 1041142] ("deltab.de.ico") in directory [296134 741258] updated to point to [741258 93475]rewrite_file: 2 items of file [741258 1041137] moved to [741258 93569] The entry [741258 1041137] ("www.bild.t-online.de.ico") in directory [296134 741258] updated to point to [741258 93569]
...The last lines:
...
Flushing..finished
Objects without names 18403
Empty lost dirs removed 384
Dirs linked to /lost+found: 2174
Dirs without stat data found 83
Files linked to /lost+found 16229
Objects having used objectids: 49
files fixed 47
dirs fixed 2
Pass 4 - finished done 1476, 37 /sec
Deleted unreachable items 716
Flushing..finished
Syncing..finished
###########
reiserfsck finished at Tue Feb 8 17:40:05 2005
...
Quoted 1 line
Most of the files were removed by 'reiserfsck --check <device>'.
besides the journal replay reiserfsck --check does not change anything on the partition, RO checks only.
Quoted 27 lines
Quoted 1 line
do you have a reiserfs support in the kernel?
Sure, one of my data partition is reiserfs:
...
root@marvin:~ 0$ # debugreiserfs -J/dev/hda7
debugreiserfs 3.6.19 (2003 www.namesys.com)Filesystem state: consistency is not checked after last mounting
Reiserfs super block in block 16 on
0x307of format 3.6 with standard journal Count of blocks on the device: 4393769
...Quoted 4 lines
what if you zero the first 64K with
dd conv=notrunc if=/dev/zero of=<device> bs=4096 count=16
can you mount it now? (rebuild-tree should already complete by the mount time).Hurray, this is the trick! I don't understand why, but I can see hundreds of directories and thousends of files. Thanks a lot!!!
Quoted 1 line
do you have anything related in the syslog about the mount time?
This is the first time 'dmesg' gives an output:
Quoted 8 lines
ReiserFS: sdc5: found reiserfs format "3.6" with standard journal
ReiserFS: sdc5: using ordered data mode
ReiserFS: sdc5: journal params: device sdc5, size 8192, journal first block 18, max trans len 1024, max batch 900, max commit age 30, max trans age 30
ReiserFS: sdc5: checking transaction log (sdc5)
ReiserFS: sdc5: Using r5 hash to sort namesCould you give me a technical describtion why this worked?
the kernel found an ext2 magic somewhere in the first 64K, reiserfs keeps the super block on 64K offset, so ext2 one was not overwritten by rebuild-sb. this is why it was mounted as ext2.
but why the kernel refused to mount as reiserfs when was explicitely specified -- this is a bug.
Signature · 2 lines
Thanks, Vitaly Fertman
Quoted 4 lines
Okay, I've done two versions, one with and one without '-S'. I applied the following commands to the image copy (the image itself is untouched, I always worked with fresh copies):
Quoted 8 lines
# reiserfsck -y /dev/loop/0 --rebuild-sb # reiserfsck -y /dev/loop/0 --check # reiserfsck -y /dev/loop/0 --rebuild-tree # debugreiserfs -p /dev/loop/0 | bzip2 -c > meta.bz2 # reiserfsck -y /dev/loop/0 --rebuild-tree -S # debugreiserfs -p /dev/loop/0 | bzip2 -c > meta-S.bz2Use ftp://80.133.138.104:12121
sorry, but I get 'no route to host' every time.
Signature · 2 lines
Thanks, Vitaly Fertman
Quoted 3 lines
Quoted 1 line
Use ftp://80.133.138.104:12121
sorry, but I get 'no route to host' every time.
80.133.138.104 is owned by the 'Deutsche Telekom AG' (An ISP in Germany).
Looks like a dynamic IP, currently not in use -> No route
-- Adrian