I have an Ubuntu 18 server using a software RAID-1 array, and
smartctl is indicating that my
/dev/sda is failing. Both
Reallocated_Sector_Ct are listed as "FAILING_NOW".
However, this has not triggered a RAID failure, as
/proc/mdstat still indicates both drives are fine.
Unfortunately, even though smartctl shows my
/dev/sdb is perfectly fine, the error on
/dev/sda has somehow caused my filesystem to become readonly. Any attempt to write or delete files reports some error like:
rm: cannot remove '<somefile>': Read-only file system
I understand Linux does this when it detects a possible drive failure, in order to prevent writes causing further corruption.
Yet I thought the whole point of RAID-1, and the reason why I used it, was that it avoids a single drive failure from corrupting the filesystem by mirroring all data between two drives? A drive failure should stop the mirroring, but still allow the OS full read/write access to the remaining drive, right?
I'm going to replace the failing drive, but how to I fix the filesystem in the meantime, and prevent a single drive failure from breaking my RAID-1 array?