March 20, 201214 yr I recently discovered that my unraid samba shares were read-only. Looking in the syslog it complained about /dev/md1 Reading on the wiki http://lime-technology.com/wiki/index.php?title=Check_Disk_Filesystems, I now ran "reiserfsck --check /dev/md1" This confirmed a corruption: reiserfsck --check started at Mon Mar 19 13:25:24 2012 ########### Replaying journal: Done. Reiserfs journal '/dev/md1' in blocks [18..8211]: 0 transactions replayed Checking internal tree.. \/ 6 (of 7// 25 (of 127|/ 77 (of 121/bad_indirect_item: block 395978064: The item [205 47 0x23350f001 IND (1)] has the bad pointer (131) to the block (65536) / 56 (of 127-/ 94 (of 170|bad_path: The left delimiting key [205 655 0x109446001 IND (1)] of the node (406038857) must be equal to the first element's key [205 66191 0x109446001 IND (1)] within the node. / 57 (of 127// 57 (of 170-bad_path: The left delimiting key [205 655 0x12a20a001 IND (1)] of the node (406173583) must be equal to the first element's key [205 66191 0x12a20a001 IND (1)] within the node. / 73 (of 127|/125 (of 126/bad_path: The left delimiting key [205 657 0x1bbb76001 IND (1)] of the node (407065571) must be equal to the first element's key [205 66193 0x1bbb76001 IND (1)] within the node. /126 (of 126-bad_leaf: block 410039643, items 7 and 8: The wrong order of items: [205 1199 0x1 IND (1)], [205 66193 0x1 IND (1)] finished Comparing bitmaps..vpf-10640: The on-disk and the correct bitmaps differs. Fatal corruptions were found, Semantic pass skipped 4 found corruptions can be fixed only when running with --rebuild-tree ########### reiserfsck finished at Mon Mar 19 13:31:12 2012 ########### So I started reiserfsck --rebuild-tree /dev/md1. After a number of hours it looks as if it fixed something but got aborted: root@Mattis:~# reiserfsck --rebuild-tree /dev/md1 reiserfsck 3.6.21 (2009 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/md1) 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: Done. Reiserfs journal '/dev/md1' in blocks [18..8211]: 0 transactions replayed ########### reiserfsck --rebuild-tree started at Mon Mar 19 13:38:19 2012 ########### Pass 0: ####### Pass 0 ####### Loading on-disk bitmap .. ok, 171108766 blocks marked used init_source_bitmap: Bitmap 2 (of 32768 bits) is wrong - mark all blocks [65536 - 98304] as used Skipping 23115 blocks (super block, journal, bitmaps) 171101216 blocks will be read 0%....20%.pass0: vpf-10420: block 410039643, item 8: Wrong order of items - change the type of the key [205 66193 0x1 IND (1)] to Direct pass0: vpf-10480: block 410039643, item 8: Wrong order of items - change the object_id of the key [205 66193 0x1 DRCT (2)] to 1199 pass0: vpf-10700: block 410039643, item 8: The item with wrong offset or length found [205 1199 0x15001 DRCT (2)], len 3164 - deleted left 0, 19766 /seccsecccc 1346 directory entries were hashed with "r5" hash. "r5" hash is selected Flushing..finished Read blocks (but not data blocks) 171101216 Leaves among those 169021 - corrected leaves 2 pointers in indirect items to wrong area 1 (zeroed) Objectids found 1351 Pass 1 (will try to insert 169021 leaves): ####### Pass 1 ####### Looking for allocable blocks .. finished 0%....20%....40%....60%....80%....100% left 0, 908 /sec Flushing..finished 169021 leaves read 169019 inserted 2 not inserted ####### Pass 2 ####### Pass 2: 0%....20%....40%....60%....80%....100% left 0, 0 /sec Flushing..finished Leaves inserted item by item 2 Pass 3 (semantic): ####### Pass 3 ######### /media/videos/movies/0yrs/FILM1.ISOufile.c 397 are_file_items_correct are_file_items_correct: File [140 289] must be found as we found its StatData. Aborted Looking around on the net I noted somewhere that the flag --scan-whole-partition should be given together with --rebuild-tree, and since it made sense (to me) that if it looked around, the file would show up, I tried again. This run also aborted, after a longer time, with another file root@Mattis:~# reiserfsck --scan-whole-partition --rebuild-tree /dev/md1 reiserfsck 3.6.21 (2009 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/md1) 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: Done. Reiserfs journal '/dev/md1' in blocks [18..8211]: 0 transactions replayed ########### reiserfsck --rebuild-tree started at Mon Mar 19 16:38:36 2012 ########### Pass 0: ####### Pass 0 ####### The whole partition (488378638 blocks) is to be scanned Skipping 23115 blocks (super block, journal, bitmaps) 488355523 blocks will be read 0%.. left 0, 21786 /se1463 directory entries were hashed with "r5" hash. "r5" hash is selected Flushing..finished Read blocks (but not data blocks) 488355523 Leaves among those 176117 Objectids found 1391 Pass 1 (will try to insert 176117 leaves): ####### Pass 1 ####### Looking for allocable blocks .. finished 0%....20%....40%....60%....80%....100% left 0, 867 /sec Flushing..finished 176117 leaves read 175889 inserted - pointers in indirect items pointing to metadata 385 (zeroed) 228 not inserted non-unique pointers in indirect items (zeroed) 194656 ####### Pass 2 ####### Pass 2: 0%....20%....40%..vpf-10260: The file we are inserting the new item (647 653 0x5cfac001 IND (1), len 3708, location 388 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 (205 657 0x20654e001 IND (1), len 2528, location 1568 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 (1381 1384 0x1 IND (1), len 308, location 3788 entry count 0, fsck need 0, format new) into has no StatData, insertion was skipped 60%....80%....100% left 0, 152 /sec Flushing..finished Leaves inserted item by item 228 Pass 3 (semantic): ####### Pass 3 ######### /media/videos/movies/0yrs/Film2.isoufile.c 397 are_file_items_correct are_file_items_correct: File [140 623] must be found as we found its StatData. Aborted I've google around about those "must be found" but can't figure out what they mean or what to try next... Running unraid v4.6 on a Intel Core i3, with reiserfsck 3.6.21
March 21, 201214 yr scan-whole-partition is used typically when you've deleted files, or re-formatted the disk and want to attempt to recover the deleted files. It is not normally needed to fix a file-system.
March 21, 201214 yr Author scan-whole-partition is used typically when you've deleted files, or re-formatted the disk and want to attempt to recover the deleted files. It is not normally needed to fix a file-system. OK, thanks then I don't need to bother about that any more. It seems that the version of reiserfsck and the amount of memory seems to be of most concern for others but I have 4GB memory and believe that this is not an issue in my case. I've tried to run a few more runs with --rebuild-tree, each time looks like a variant of the one before. It does something in Pass 2 (insert or delete) and then aborts on a new file in Pass 3. Is the unraid parity thingy interacting with reiserfsck in a bad way? I think about the note on the wiki: Note: If reiserfsck performs write operations to repair the file system, the array parity will be maintained. Is the parity check/correction enabled when reiserfsck is reading from the disk?
March 26, 201214 yr Author Ok, since it seems impossible to salvage the content of the disk, I reformatted it via the regular web-interface and then rerun reiserfsck --check. All is now fine with that disk, but running reiserfsck --check on my second disk also gave errors. I reformated the second disk as well (which was kind of hard, I needed to run reiserfsck --rebuild-tree which aborted so the disk showed up as unformated and thus allow a formatting) and run a parity check. Since I did a backup of my unraid once I discovered it was mounted read-only, I'm now just going to copy all my files back to the unraid box. After this exercise I learnt that parity isn't everything, I will run the file system check once in a while as well...
April 10, 201214 yr It is good to find this post. I've been having issues with one of my drives having corrupted files. So, I ended up running --rebuild-tree and it is taking forever. It has been 6 hours already, and it is still going. I might just end up reformatting the drive since it doesn't have any files. However, I am having issues with another drive. Drive 5 has 41 movies, that I do want, but for some reason or another it doesn't let me transfer all of them to my Media Share folder. It states that I need permission from my tower/root. So, I am wondering if I reformat drive 3, added back to the array as drive 3 again and run parity, will this fix my read only issues?
Archived
This topic is now archived and is closed to further replies.