Thursday, December 19, 2013

Linux file system sometimes reverts to read-only

Sometimes my VM's disks get corrupted and switch to read-only.  This is most likely because they do not always get safely shutdown i.e. power outages.

One way that I have resolved this

1. Force fsck:  shutdown -rF now
To remount the read-only filesystem, use:  mount -o remount,rw /dev/xvdb1
touch /forcefsck
reboot
In case I don't know what the filesystem name is, just use "mount" or "ls /etc/mtab"