JP Vossen via plug on 7 Nov 2022 19:07:05 -0800


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] Box won't boot after RAID drive swap


On 11/7/22 18:09, Keith via plug wrote:
1) Has anyone every run a degraded RAID 1 (i.e. only one disk online) that was created with mdadm?  Was that a boot set or data set?

I've done kinda this at least 4-5 times, but I don't recall if the "bad" drive ever 100% failed on my, of it I replaced them when the SMART errors got too high, but before total disk death.


2) Has anyone ever replaced a failed RAID 1 disk with mdadm without first removing the bad disk while the system was up? What where your steps and is this (or your process) documented somewhere?

This is my process, but I DO remove the failed drive as part of it.

(Coped in from "Re: [PLUG] RAID1 impending failure questions" 2022-10-28)
----
https://github.com/vossenjp/utils/blob/main/replace_mirrored_disk

All the usual disclaimers!!!  And other disclaimer: I wrote this in 2010 so there may be better ways to do things now that I'm not doing.

That said, variations on that script have...wait for it..."Worked For Me" for at least 4 machines for about a decade, where the drives *are* the boot and OS drive.  I have `mdadm` RAID-1 in all cases when the physical form factor supports 2 drives, and I've encountered this "one drive went bad" a bunch of times.  I've even done this with my (non IT) cousin as remote warm hands on Mom's server in NJ.

I love that once you replace the hardware and reboot, the mirror rebuild happens live as the system is running.  The only downtime is basically the reboot to replace the hardware.

Huh, yeah, SVN first commit:
```
r1680 | root | 2010-04-14 23:59:53 -0400 (Wed, 14 Apr 2010) | 3 lines

# replace_mirrored_disk--Replace a failed disk in a Linux software mirror
* Tweaked slightly since tested!
```

And it hasn't had a substantive change since around 2013.
----

Later,
JP
--  -------------------------------------------------------------------
JP Vossen, CISSP | http://www.jpsdomain.org/ | http://bashcookbook.com/

___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug