5

Every so often at boot time the disk checker runs. It completes ~70% very rapidly, and then takes about an hour to complete the remaining 30%. I know I can cancel it, but presumably it runs for a reason so I'd rather let it complete.

Is it normal to take so long? Is there anything I can do to speed it up?

Specs: 250GB HD, 1GB RAM, 1.8GHz single-core Athlon

Thanks

3
  • Are you using ext3, ext4 or something else? FWIW fsck on ext4 is almost an order of magnitude faster than on ext3.
    – janneb
    Sep 6, 2010 at 15:10
  • @janneb: df -T yields /dev/sda1 ext4. Interestingly I note that my disk usage is 30%. Also - the disk is encrypted, if that makes a difference
    – Richard
    Sep 6, 2010 at 17:29
  • Is the whole disk LVM encrypted, or is there a more elaborate setup?
    – nedm
    Sep 6, 2010 at 20:15

3 Answers 3

2

As with most programs that show a progress percentage, this percentage is only a rough approximation. In the specific case of e2fsck (it's the same program for ext2, ext3 and ext4), the completion percentage is computed per pass and arbitrarily expressed in a range:

  1. sequential scan of the inode table: 0–70%
  2. check directory structure: 70–90%
  3. check for directory connectivity: 90–92%
  4. check reference counts: 92–95%
  5. check block and inode bitmaps against on-disk bitmaps: 95–100%

So in your case the scan of the inode table is very fast, and the check of the directory structure takes a long time. I don't think this is cause for worry.

0

The reason you get a disk check can be several different things:

  1. ext2/ext3/ext4 filesystems have an optional setting to be checked after a specified time or number of boots has passed; see the -c and -i options of tune2fs to change this behaviour. See the manpage for more info.

  2. Something happened which made the OS think a check is needed, e.g. the system suffered from a power loss.

In case #1, you can disable those periodic checks (or make them less common), which also makes them take less time. Also fsck for ext4 is faster than for ext3, which in turn is faster than ext2, and the differences are often quite big (depending on the size of the disk).

In case #2, it's best to let the fsck complete its work, however long it takes.

2
  • Seems like it's not the disk check itself, but the amount of time it takes to complete when it does run that's troubling the OP.
    – nedm
    Sep 6, 2010 at 20:13
  • I added some clarification why I gave that answer, and made it more useful. :)
    – JanC
    Sep 7, 2010 at 15:41
-1

This particular pattern would hint at a problem with the HDD in question. The reasons why it doesn't throw up any errors are most likely that a) there isn't any data on that part of the disk where the trouble is and b) the problem isn't so bad that the sector checks fail completely.

If I were you, I would go and buy myself a new HDD, transfer the data across and then just ditch the old one. 250GB HDD's are so cheap nowadays it's not even worth trying to figure out what exactly the problem is. And if it goes bang, you will be very sorry if you don't have any backups.

1
  • 2
    -1 It's way too early to assume hardware issues without investigating things first...
    – JanC
    Sep 6, 2010 at 17:09

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .