I help manage an Ubuntu 14.04 virtual server (I think it's VMWare) that has never had problems but today the root filesystem is read-only for some reason. It's a production webserver that is now down because of that.

I don't control the VMWare backend. A colleague mentioned last week to be careful not to break any servers because the main backup server needed to be rebuilt. I think he has an alternative but I don't know the status of it. I am in a different time zone and would have to wait many hours to check to confirm that there is a good backup.

Given these circumstances, I'm not sure if I should try to remount the root filesystem or not until I can talk to the backend people. There's pressure to get the websites back up, but I don't want to break anything in the process, especially if I don't know if there is a good backup.

My question is, is there any danger in attempting to remount the filesystem as read/write?

  • An attempting to remount in r/w mode is not dangerous. If root filesystem is no need to be writable thus write mode is a dangerous. – Yurij Goncharuk Apr 9 '18 at 9:23
  • 3
    You ought to check why the filesystem was mounted read-only. There may be a corrupted partition. – Kusalananda Apr 9 '18 at 9:51
  • Specifically, this would be the expected behaviour in response to errors if the mount option errors=remount-ro applies. IIRC this is the default for Ubuntu. As well as being a mount option, "The default is set in the filesystem superblock, and can be changed using tune2fs". – sourcejedi Apr 9 '18 at 11:53

Yes, it is potentially dangerous.

If the filesystem was remounted read-only, that is most likely because the kernel found some inconsistencies; when that happens, it will mount the system read only to avoid corruption and data loss.

There are various ways to fix this, but if you have console access, then by far the easiest way to do so is to just reboot the machine. If the disk is not a complete writeoff, then at boot time the system will run an fsck which will fix any issues and allow you to continue using the system.

However, please consider the following:

  • If fsck reports more than a handful of issues, then most likely your disk is dead or dying. If you don't know whether you have proper backups, just switch the system off at that point -- otherwise you will most likely lose all data.
  • If fsck fixes the issue, but a while later the problem reoccurs, then your disk is dead or dying. See above.
  • Some issues can't be fixed automatically and will cause the system to go into maintenance mode. You may need to enter the root password (depending on the distribution), and will then need to manually run fsck, and will have to make decisions as to the questions being asked. This is why I said console access is necessary ;-)

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.