2

I have been tearing my hair out trying to figure out why my EC2 instances (made from my own custom AMIs) were taking many tries to come up properly. They would fail with the following error:

fsck.ext3: No such file or directory while trying to open /dev/sdf

For both of the EBS volumes I was attaching during startup.

Finally, I figured out the problem. I had put this in /etc/fstab:

/dev/sdf /export ext3 defaults 1 2 
/dev/sdi /export2 ext3 defaults 1 2 

The 2 tells the system to fsck the drives on the way up. Changing this to

/dev/sdf /export ext3 defaults 1 0 
/dev/sdi /export2 ext3 defaults 1 0 

Avoids the problem completely, but now the volumes are never going to be fsck'd. How much does this matter? Once the instance goes into production it's going to be running pretty much 24/7, so not many fscks would be happening anyway, but still... this just feels like a bad idea.

I have not been able to find anyone else even reporting this problem (there are people with the same error message, but different causes). It seems unbelievable that I could be the only person to ever make this mistake, but perhaps I'm just talented that way. :) If there is another solution to the problem I would love to hear it; I have not been able to find one.

Janine Ohmer
  • 257
  • 1
  • 4
  • 8
  • By the way, I should have mentioned, for completeness' sake, that it didn't fail to come up every time - sometimes it would come up on the first try, other times after 3, 4, 5 tries... totally unpredictable as far as I could see. So really it *should* be able to get through the fsck just fine, since it eventually does, but there seems to be some kind of timing error preventing it and this is the only way I have found to work around it. – Janine Ohmer Mar 18 '10 at 18:44

1 Answers1

1

It's not needed to do fsck every time you bring up an instance, that's for sure.

I think you can ask the question on when to fsck to 10 admins and get 15 answers.

My take is that you should only do it if you're seeing filesystem errors in the logs or if the filesystem was taken down hard.

If you want to research more, I'd search around for general fsck advice. fsck is for the filesystem itself. The data store behind it should be irrelevant.

Jim
  • 398
  • 2
  • 9