[PLUG] Restart mdadm?
Bill Barry
wabarry at gmail.com
Sun Nov 27 21:49:25 UTC 2022
On Sun, Nov 27, 2022 at 2:30 PM John Jason Jordan <johnxj at gmx.com> wrote:
> It's happened again. One of my RAID0 arrays just stopped working. The
> mount command shows it as mounted, but neither the command line nor any
> GUI file managers can see any files, and if I try to open a file that I
> know is there I get "Error reading file: Input / output error."
> Attempts to umount it fail because mount thinks it is busy, and "mount
> -a" executes without error, but does nothing.
>
> From previous experience the solution is to reboot, which restarts the
> array and all is well again. I've never lost any data, and if I did I
> have a full mirror on a Synology, but it's a major PITA to have to
> reboot.
>
> I've searched documentation on mdadm and I can't figure out if there is
> a way to just restart the array. Suggestions?
>
I can see what the problem is. MDADM monitors your disks. If a certain
number of them fail, the whole array is considered to have failed. When
your external enclosure gets disconnected or turned off then mdadm thinks
too many drives have failed and it fails the whole array. I think to fix
it you have to force it to reassemble. I can't test this so I may be
wrong.
mdadm --assemble --force /dev/md0
substitute your raid device for /dev/md0.
Bill
More information about the PLUG
mailing list