VMware Cloud Community
GWeatherby
Contributor
Contributor

Linux disk read only

Due to failure of a datastore, our Ubuntu/debian based system's root disk went into read-only  -- we have the mount options in /etc/fstab set to errors=mount-ro. I was unable to get

mount -o remount,rw /

to work and eventually rebooted the virtual machine. Has anyone been able to remount a disk that went read-only?

0 Kudos
3 Replies
sk84
Expert
Expert

I think this is basically the wrong forum for this question, because it is a pure Linux problem and not VMware related.

And it depends a bit on the Linux distribution how to remount a read-only root partition writable again.

Have you tried the following command:

sudo mount -o remount,rw /dev/sdaX /

Where /dev/sdaX must be replaced by your partition identifier. Otherwise you can also try

sudo mountall

But as already mentioned this is distribution specific and the question is better answered in a Linux forum.

But apart from that, rebooting the VM should always fix this problem if your fstab file is configured correctly and there is no other problem.

--- Regards, Sebastian VCP6.5-DCV // VCP7-CMA // vSAN 2017 Specialist Please mark this answer as 'helpful' or 'correct' if you think your question has been answered correctly.
0 Kudos
GWeatherby
Contributor
Contributor

The linux on hardware forums don't address VMware specific failure modes. The most applicable thing I found was vmware - Linux VM's disk went read-only = no choice but reboot? - Unix & Linux Stack Exchange , indicating the only viable option is to reboot.

0 Kudos
sk84
Expert
Expert

I don't see it as VMware specific failure mode. You could also simply remove a hot-plugable hard disk from a running physical server with the same result. Or if the hard disk controller of a running Linux system fails.

So the question I would ask in the Linux community would be "How do I mount a root partition rw again after it has been mounted read only due to an error?"

What kind of error it is, is irrelevant. Since it can also occur with physical servers.

But probably rebooting is the easier and cleaner way to fix this problem, because applications might also have problems with the ro mode.

--- Regards, Sebastian VCP6.5-DCV // VCP7-CMA // vSAN 2017 Specialist Please mark this answer as 'helpful' or 'correct' if you think your question has been answered correctly.
0 Kudos