Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a RAID 5 array using mdadm and ext4 as its filesystem. We got a strong power surge and one of the drive faulted, while another one got a bit flakky, aka "click of death".

I replaced the disks one by one, first changing the broken one, letting resync, and then the buggy one with a clean disk and another resync. I now have a full RAID 5 (3 drives + 1 parity drive) running fine.

My issue is that during those resyncs, some sectors were probably failed on the buggy drive and I now have some faulty inodes. Here is an exemple of what I get in the /var/log/messages (gentoo):

Aug 16 14:16:13 shiva kernel: EXT4-fs error (device md127): ext4_lookup: deleted inode referenced: 270795020

Most of the files works juste fine, there are only about ~12 such inodes failed like that and the files it correspond to seems to be mostly very small ones next to each other (the array is ~4TB large).

My issue now is that I want to cleanup my disk but I'm not sure how, the bootup tells me to run a fsck but I don't know what it does exactly and plenty of things I read on the web scare me a little :)

Considering that:

  1. the hardware issue is 100% resolved
  2. most of the filesystem works just fine, only a dozen inodes are screwed
  3. I want to "fix" the filesystem to get it back to normal
  4. I'm okay with losing the few failed files (although I would like to know which one it is if possible)
  5. again, the system boot/mount fine, almost every file works fine, the one that fails are always the few same

Should I be running fsck on the drive to do that ? Will I risk losing everything ?

I know the best way would be to backup and then redo, but I can't afford 3TB of backups right now after already just buying 2 new drives ... I'm trying to clean up the mess.

share|improve this question
up vote 2 down vote accepted

Yes, running fsck will do exactly what you want. Of course, anything can happen, including a meteorite landing on your computer and destroying all your disks; but if anything running fsck is safer than continuing to operate with a filesystems with errors.

I recommend booting from a rescue CD (or USB pen drive) and running fsck from there. If you're feeling uneasy, you can start by running fsck -n, which will not write to the filesystem, only tell you what errors it's found.

share|improve this answer
Thanks, that worked – azera Aug 16 '10 at 17:33

Your Answer


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.