9

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?

7
  • 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, 2012 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, 2012 at 3:49
  • Actually, when I tried remounting rw, it failed complaining that mtab was on a read-only filesystem. Dec 5, 2012 at 3:51
  • 1
    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, 2012 at 3:54
  • 5
    Other than disk failure, it might actually be disk failure :P Dec 5, 2012 at 9:07

1 Answer 1

5

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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