[CentOS] e2fsck with millions of files

Don Krause dkrause at optivus.com
Tue Aug 31 17:44:00 UTC 2010


On Aug 31, 2010, at 7:27 AM, m.roth at 5-cent.us wrote:

> Sean Carolan wrote:
>> I have a large (1.5TB) partition with millions of files on it.  e2fsck has
>> been running nearly 12 hours and is still on "Checking directory
>> structure".
>> Any tips for speeding this along?
> 
> Kill it. And make sure it doesn't try to do it. There's a known bug with
> fsck (at least I think it was with CentOS, not *bleah* FC13). On large
> drives that we're doing online backups, it hits 70% and that's all she
> wrote: it never ends, and I need to kill it.
> 
>          mark


FWIW, after our backup server's 4 TB ext3 filesystem crashed, I found
this gem somewhere on the internet, applied it, and was able to successfully
fsck and repair the file system in less than a day.

This is in the source from e2fsprogs-1.39

e2fsprogs-1.39/lib/ext2fs

*** icount.c	2005-09-06 02:40:14.000000000 -0700
--- icount.c.new	2010-04-28 10:38:39.000000000 -0700
***************
*** 251,256 ****
--- 251,259 ----
  				range = ((float) (ino - lowval)) /
  					(highval - lowval);
  			mid = low + ((int) (range * (high-low)));
+ 			/* Trap mid due to floating point error */
+ 			if (mid > high) mid = high;
+ 			if (mid < low) mid = low;
  		}
  #endif
  		if (ino == icount->list[mid].ino) {


--
Don Krause                                                                   
Head Systems Geek, 
Waver of Deceased Chickens.
Optivus Proton Therapy, Inc.
P.O. Box 608
Loma Linda, California 92354
909.799.8327 Tel
909.799.8366 Fax
dkrause at optivus.com
www.optivus.com
"This message represents the official view of the voices in my head."









More information about the CentOS mailing list