Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am trying to fix a 9 TB filesystem with e2fsck, however the scan always fails after about 10% or so with the following error:

Error storing directory block information: ... Memory allocation failed
e2fsck: aborted

The machine runs Ubuntu 10 (64 bit) and has 4 GB of memory. I have noticed that during checks the ram is getting nearly exhausted even though top only reports only 22% usage by the application and the memory can be reclaimed by a drop_caches. The swap space isn't touched.

In any case, I have approached this by giving e2fsck a scratch_files location which it fills with about 500M by the time it fails. Additionally, I have also set swapon -a, which also seem to prolong e2fsck's crashes.

How can I tune e2fsck so it doesn't crash? Is there any better way to repair my fs?

share|improve this question
    
hmm... I have not tried from a boot cd yet... i'll have to give this a go today... i was hoping to not have to take the machine out of production since the drive i'm trying to e2fsck isn't critical for the servers use. But at this point i can't keep eating up all available memory each time I try to run e2fsck so whats the difference? lol. I'll report back any findings. –  Jason Jul 11 '11 at 16:51
    
Maybe a duplicate of serverfault.com/questions/9218/… ? –  Giovanni Toraldo Nov 12 '11 at 15:57
add comment

1 Answer

Sounds like you're running e2fsck from the local OS?

I don't know if it would make a difference or not, but what happens if you try from a LiveCD? Some have a lomem boot option, have you looked into that?

For lack of a better idea as of yet, is that an option?

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.