Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I've lately been having an issue with my root filesystem becoming readonly. It happens some amount of time after boot. I don't know exactly when it happens, as I don't usually notice it until something such as suspending the computer or printing fails. It seems to be fairly random. Since most of my system is on that partition, I can't re-mount it without rebooting.

After this happens, the system runs a fsck. Sometimes it prompts to fix problems; other times it apparently finds none.

  • To troubleshoot, I've searched through the logs but found nothing relevant. This might be due in part to not knowing when the actual errors took place.

  • The filesystem is apparently good to begin with, as when fsck runs its fixes it doesn't report any errors.

  • I've scanned the disk with SpinRite. A while ago, SpinRite found and recovered from some bad sectors on the hard drive. I ran a level 4 scan (a thorough scan) after this probem appeared, but SpinRite found nothing.

  • The SMART data reports that the disk is OK with 63 bad sectors. The number of bad sectors hasn't changed recently.

I realize that the disk isn't in the best of conditions, and I have complete backups in case of catastrophic failure. Yet the lack of errors in the logs, combined with SpinRite's test results and the unchanged SMART data makes me think that this problem has some cause other than disk failure.

Other than disk failure, what could cause my symptoms?

share|improve this question
    
In my experience, SMART may report disk status as PASSED long after there are regular read failures resulting in system reboots. Try manually scheduling a "long test" using smartctl from smartmontools package, let it finish (may take a few hours) and see what SMART will tell you then. –  Sergey Dec 5 '12 at 3:45
    
Also, this won't fix your problem (and might even be dangerous provided the filesystem was mounted read-only for a reason), but you can remount an already-mounted filesystem without unmounting it first or rebooting, using something like mount -o remount,rw / –  Sergey Dec 5 '12 at 3:49
    
Actually, when I tried remounting rw, it failed complaining that mtab was on a read-only filesystem. –  Scott Severance Dec 5 '12 at 3:51
    
man mount: -n, --no-mtab Mount without writing in /etc/mtab. This is necessary for example when /etc is on a read-only filesystem. Although I still wouldn't recommend this –  Sergey Dec 5 '12 at 3:54
    
Other than disk failure, it might actually be disk failure :P –  Gerhard Burger Dec 5 '12 at 9:07
add comment

2 Answers

In my experience if he system automatically decides to remount a medium read-only that either means that

  • the medium is broken
  • or the file-system on the medium is broken.

In the latter case a fsck run could help. But if a bad block has broken the file system chances are high that it won't be long before another bad block appears - possibly breaking something more vital.

share|improve this answer
add comment

If you're using a journaling filesystem it's possible a bad block or other hiccup was encountered during the writing of the journal. That would force the filesystem to go read-only.

share|improve this answer
    
Thanks for the answer. Could you elaborate? –  Scott Severance Mar 23 at 20:52
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.