Linux Drive Mounted as Read-Only

For if your Linux box has some drives that normally automatically mount fine, but suddenly one or more are in read-only mode.

This can happen because a common setting in fstab is “errors=remount-ro” which means that if there are any errors while mounting, remount it in read-only mode. Which is to help prevent data-loss.

To (try to) fix this, first, unmount the drive. Either with umount or by commenting out the appropriate line in fstab and rebooting, which I had to do because although I unmounted the drive, it claimed to still be in use.

Find your disk:

$ lsblk

Run some checks on the drive:

$ sudo fsck -f /dev/sdb1

and (if you have a lot of time)

$ sudo badblocks -nsv -b 4096 -c 65536 /dev/sdb

See this and this for more about the badblocks command above.

Hopefully those run smoothly.

Remount the drive, possibly by uncommenting the appropriate line in fstab and rebooting again.

Confirm the drive is mounted and writable.

Leave a Reply

Your email address will not be published. Required fields are marked *