reiserfsck --rebuild-tree Aborted
Hello.
I have a big trouble.
Yesterday diskspace on a server of my company the place was terminated. After reboot and reiserfsck --fix-fixable has corrected not all mistakes. After that the server has worked a little more (I have removed some files for clearing a place) and I have noticed, that it is impossible to get access to some files and even to remove. After reloading with LiveCD and attempts --rebuild-tree it has turned out log:
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
# reiserfsck --rebuild-tree /dev/sda2 reiserfsck 3.6.17 (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/sda2) tree
Will put log info to 'rebuild.log'
Do you want to run this program?[N/Yes] (note need to type Yes if you do):Yes Replaying journal..
Reiserfs journal '/dev/sda2' in blocks [18..8211]: 0 transactions replayed
###########
reiserfsck --rebuild-tree started at Wed Sep 29 20:47:21 2004
###########
Pass 0:
Loading on-disk bitmap .. ok, 2199141 blocks marked used
Skipping 8287 blocks (super block, journal, bitmaps) 2190854 blocks will be read
0%....20%....40%....60%....80%....100% left 0, 5477 /sec
"r5" hash is selected
Flushing..finished
Read blocks (but not data blocks) 2190854
Leaves among those 846943
Objectids found 475091
Pass 1 (will try to insert 846943 leaves):
Looking for allocable blocks .. finished
0%....20%....40%....60%....80%....100% left 0, 2785 /sec
Flushing..finished
846943 leaves read
33146 inserted
813797 not insertedPass 2:
0%....20%....40%.. left 818621, 4280 /sec
Not enough allocable blocks, checking bitmap...there are 0 allocable blocks, btw
out of disk space
Aborted
# debugreiserfs -J /dev/sda2 debugreiserfs 3.6.17 (2003 www.namesys.com)
Filesystem state: consistency is not checked after last mounting
Reiserfs super block in block 16 on 0x802 of format 3.6 with standard journal Count of blocks on the device: 2502304
Number of bitmaps: 77
Blocksize: 4096
Free blocks (count of blocks - used [journal, bitmaps, data, reserved] blocks): 2502304 Root block: 0
Filesystem marked as cleanly umounted
Tree height: 65535
Hash function used to sort names: "r5"
Objectid map size 972, max 972
Journal parameters:
Device [0x0]
Magic [0x440b59d2]
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: 0xfa02:
FATAL corruptions exist.sb_version: 2
inode generation number: 11945888
UUID: 9f650000-0000-0000-0000-000000000000
LABEL: /
Set flags in SB:
Journal header (block #8210 of /dev/sda2):
j_last_flush_trans_id 2908803
j_first_unflushed_offset 6526
j_mount_id 14
Device [0x0]
Magic [0x440b59d2]
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
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
I have undertaken some attempts and received the same result. On a hard disk of badblocks is not present (I has checked up the utility dd and dd_rescue - on other partition the image of a disk was copied). Here has laid out result of work "debugreiserfs -p /dev/sda2 > sda2.1.dump; bzip2 -9 sda2.1.dump":
http://public.nnov.net/tmp/ibm2/sda2.1.dump.bz2
Kernel is 2.4.25-gentoo-r2 on Hard drive
and 2.4.26-gentoo-r6 on LiveCD
on Hard drive
# reiserfsck -V reiserfsck 3.6.17 (2003 www.namesys.com)
on LiveCD
# reiserfsck -V reiserfsck 3.6.17 (2003 www.namesys.com)
/dev/sda - is SCSI hardware Raid5 massive
Can you help me rebuild partition ? :(
If it is required it is possible to remove (for clearing a diskspace):/var/lib/oops/ - here there is a file in 512Mb
and directories:
/bin
/lib
/sbin
/opt
/usr, excluding "/usr/local" !
Signature · 7 lines
Molchanov Alexander TransTeleCom-NN company Network Operation Center: [email protected] phone.: +7 8312 728827 (1424) +7 8312 482733 (1424) [email protected] PGP Fingerprint = 50C7 8479 59E4 8228 F27C 5E8C EDF5 FECC 6CA2 B1E2
Hello
fsck expert will replay a bit later today.
Quoted 9 lines · On Thu, 30 Sep 2004 09:24:42 +0400 Molchanov Alexander…
Hello.
I have a big trouble.
...[skiped]...Pass 2:
0%....20%....40%.. left 818621, 4280 /sec
Not enough allocable blocks, checking bitmap...there are 0 allocable blocks, btw
Quoted 5 lines
out of disk space
Aborted...[skiped]...
Excuse me for troubling. I nevertheless have found on a disk badblocks/badsectors (right at the end of an partition - 3 blocks on 1024).
Sorry!
# badblocks -v -o sda2.badb.out /dev/sda2 Checking blocks 0 to 10009251 Checking for bad blocks (read-only test): done Pass completed, 3 bad blocks found.
# cat sda2.badb.out 10009248 10009249 10009250
Signature · 7 lines
Molchanov Alexander TransTeleCom-NN company Network Operation Center: [email protected] phone.: +7 8312 728827 (1424) +7 8312 482733 (1424) [email protected] PGP Fingerprint = 50C7 8479 59E4 8228 F27C 5E8C EDF5 FECC 6CA2 B1E2
Quoted 25 lines · On Thu, 30 Sep 2004 11:52:19 +0400 Molchanov Alexander…
Quoted 9 lines
Hello.
I have a big trouble.
...[skiped]...Pass 2:
0%....20%....40%.. left 818621, 4280 /sec
Not enough allocable blocks, checking bitmap...there are 0 allocable blocks, btwQuoted 5 lines
out of disk space
Aborted...[skiped]...
Excuse me for troubling. I nevertheless have found on a disk badblocks/badsectors (right at the end of an partition - 3 blocks on 1024).
Sorry!
# badblocks -v -o sda2.badb.out /dev/sda2 Checking blocks 0 to 10009251 Checking for bad blocks (read-only test): done Pass completed, 3 bad blocks found.
Quoted 4 lines
# cat sda2.badb.out 10009248 10009249 10009250
# reiserfsck --badblocks sda2.badb.out --yes --logfile rebuild.log --rebuild-tree /dev/sda2 reiserfsck 3.6.17 (2003 www.namesys.com) ...
Will rebuild the filesystem (/dev/sda2) tree
Bad block list will contain only blocks specified in 'sda2.badb.out' file Will put log info to 'rebuild.log'
Do you want to run this program?[N/Yes] (note need to type Yes if you do):Yescreate_badblock_bitmap: block number (10009247) points out of fs size (2502304).create_badblock_bitmap: block number (10009248) points out of fs size (2502304).create_badblock_bitmap: block number (10009249) points out of fs size (2502304).create_badblock_bitmap: block number (10009250) points out of fs size (2502304).create_badblock_bitmap: block number (10009251) points out of fs size (2502304). Replaying journal..
Reiserfs journal '/dev/sda2' in blocks [18..8211]: 0 transactions replayed
###########
reiserfsck --rebuild-tree started at Thu Sep 30 12:14:54 2004
###########
Pass 0:
Loading on-disk bitmap .. ok, 2199141 blocks marked used
Skipping 8287 blocks (super block, journal, bitmaps) 2190854 blocks will be read
0%....20%....40%....60%....80%....100% left 0, 5765 /sec
"r5" hash is selected
Flushing..finished
Read blocks (but not data blocks) 2190854
Leaves among those 846944
Objectids found 475091
Pass 1 (will try to insert 846944 leaves):
Looking for allocable blocks .. finished
0%....20%....40%....60%....80%....100% left 0, 2740 /sec
Flushing..finished
846944 leaves read
34298 inserted
812646 not insertedPass 2:
0%....20%....40%..Not enough allocable blocks, checking bitmap...there are 0 allocable blocks, btw
out of disk space
Aborted
Signature · 7 lines
Molchanov Alexander TransTeleCom-NN company Network Operation Center: [email protected] phone.: +7 8312 728827 (1424) +7 8312 482733 (1424) [email protected] PGP Fingerprint = 50C7 8479 59E4 8228 F27C 5E8C EDF5 FECC 6CA2 B1E2
Quoted 43 lines · Molchanov Alexander
On Thu, 30 Sep 2004 11:52:19 +0400
Quoted 27 lines · Molchanov Alexander
Quoted 10 lines
Hello.
I have a big trouble.
...[skiped]...Pass 2:
0%....20%....40%.. left 818621,
4280 /sec Not enough allocable blocks, checking bitmap...there are 0 allocable blocks, btwQuoted 5 lines
out of disk space
Aborted...[skiped]...
Excuse me for troubling. I nevertheless have found on a disk badblocks/badsectors (right at the end of an partition - 3 blocks on 1024).
Sorry!
# badblocks -v -o sda2.badb.out /dev/sda2 Checking blocks 0 to 10009251 Checking for bad blocks (read-only test): done Pass completed, 3 bad blocks found.Quoted 4 lines
# cat sda2.badb.out 10009248 10009249 10009250# reiserfsck --badblocks sda2.badb.out --yes --logfile rebuild.log --rebuild-tree /dev/sda2 reiserfsck 3.6.17 (2003 www.namesys.com) ...Will rebuild the filesystem (
/dev/sda2) tree
Bad block list will contain only blocks specified in 'sda2.badb.out' file Will put log info to 'rebuild.log'
Quoted 11 lines
Do you want to run this program?[N/Yes] (note need to type Yes if you do):Yes
create_badblock_bitmap: block number (10009247) points out of fs size (2502304).create_badblock_bitmap: block number (10009248) points out of fs size (2502304).create_badblock_bitmap: block number (10009249) points out of fs size (2502304).create_badblock_bitmap: block number (10009250) points out of fs size (2502304).create_badblock_bitmap: block number (10009251) points out of fs size (2502304). Replaying journal.. Reiserfs journal '/dev/sda2' in blocks [18..8211]: 0 transactions replayed
###########
reiserfsck --rebuild-tree started at Thu Sep 30 12:14:54 2004
###########
bad blocks should be of the same size as the fs blocksize. as the current reiserfs is of 4k blocksize, 1k blocks are wrong, all these 3 blocks lie in the 4k block #2502312.
and again the 4k block #2502312 lie beyond end of the device that keeps only #2502311 4k blocks.
Signature · 2 lines
Thanks, Vitaly Fertman
Quoted 29 lines · Molchanov Alexander
On Thu, 30 Sep 2004 09:24:42 +0400
Quoted 10 lines · Molchanov Alexander
Hello.
I have a big trouble.
...[skiped]...Pass 2:
0%....20%....40%.. left 818621,
4280 /sec Not enough allocable blocks, checking bitmap...there are 0 allocable blocks, btwQuoted 5 lines
out of disk space
Aborted...[skiped]...
Excuse me for troubling. I nevertheless have found on a disk badblocks/badsectors (right at the end of an partition - 3 blocks on 1024).
Sorry!
# badblocks -v -o sda2.badb.out /dev/sda2 Checking blocks 0 to 10009251 Checking for bad blocks (read-only test): done Pass completed, 3 bad blocks found.
Quoted 4 lines
# cat sda2.badb.out 10009248 10009249 10009250
they are not bad blocks. this is the kernel remembers that the fs was 4k block size and does not allow the access to the last 3 sectors as they do not make up a 4k block.
Signature · 2 lines
Thanks, Vitaly Fertman
Quoted 1 line · Molchanov Alexander
Hello.
Hello,
Quoted 14 lines
I have a big trouble.
Yesterday diskspace on a server of my company the place was terminated. After reboot and reiserfsck --fix-fixable has corrected not all mistakes. After that the server has worked a little more (I have removed some files for clearing a place) and I have noticed, that it is impossible to get access to some files and even to remove. After reloading with LiveCD and attempts --rebuild-tree it has turned out log:
(quoted diff) +0
-0@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@# reiserfsck --rebuild-tree /dev/sda2 reiserfsck 3.6.17 (2003 www.namesys.com)
[skipped]
Quoted 7 lines
Pass 1 (will try to insert 846943 leaves):
Looking for allocable blocks .. finished
0%....20%....40%....60%....80%....100% left 0, 2785
/sec Flushing..finished846943 leaves read 33146 inserted 813797 not inserted
are you sure that you have not copied a reiserfs to a file on this reiserfs and not left it there in not encrypted/compressed form? or probably you unpacked reiserfs metadata (debugreiserfs -u, or the program unpack in older version) to a file again w/out encryption/compression?
the problem that reiserfs does not allow to distinguish the host fs metadata from the metadata that are kept in a file on this fs. and at least xor encryption is needed for such a file.
Quoted 18 lines
Pass 2:
0%....20%....40%.. left 818621, 4280
/sec Not enough allocable blocks, checking bitmap...there are 0 allocable blocks, btw(quoted diff) +0
-0@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@I have undertaken some attempts and received the same result. On a hard disk of badblocks is not present (I has checked up the utility dd and
dd_rescue- on other partition the image of a disk was copied). Here has laid out result of work "debugreiserfs -p/dev/sda2> sda2.1.dump; bzip2 -9 sda2.1.dump": http://public.nnov.net/tmp/ibm2/sda2.1.dump.bz2Kernel is 2.4.25-gentoo-r2 on Hard drive
and 2.4.26-gentoo-r6 on LiveCD
/dev/sda- is SCSI hardware Raid5 massive
Quoted 9 lines
Can you help me rebuild partition ? :(
If it is required it is possible to remove (for clearing a diskspace):/var/lib/oops/- here there is a file in 512Mb
and directories:
/bin
/lib
/sbin
/opt
/usr, excluding "/usr/local" !
usually this problem is solved in one of the following ways:
if you do not need the next partition then you can
- zero it first with
dd if=/dev/zero of=/dev/sda3
- repartition sda with fdisk,
- then run
reiserfsck --rebuild-sb /dev/sda2
to enlarge the fs on the enlarged partition and
- finally re-run tree rebuilding.
Another way is to copy the problem partition to another larger one and repeat the reiserfsck steps above. Or probably to a file on another partition, enlarge the file and reiserfsck the file (--rebuild-sb, and then --rebuild-tree). this is more relable way as the original partition is not changed and you can easily repeat an attempt on a larger partition.
I am looking on your metadata now to figure out what partition size is enough and what was a reason of this problem.
Signature · 2 lines
Thanks, Vitaly Fertman