cen writes:
# copy partition map from good disk to new disk
sfdisk -d /dev/sde | sfdisk /dev/sdd
This only works if the new disk is identical to the old one, geometry-wise.
Otherwise you can simply create partitions of the same size using parted, on
the new drive.
# install bootloader on new disk
grub2-install /dev/sdd1
This should be /dev/sdd.
Also, presumably the failed disk gets removed (and the new disk gets
installed) after shutting down the system. After the install the system gets
booted (with the raid degraded) before attempting to partition the new disk
and reinstall grub.
If your hardware has hot-swappable drives and you're trying to hot-swap them
there's an additional step. Somewhere. About ten years ago I went through
this, and I had to echo something to tell the kernel to deactivate a
physical drive before removing in, and reenabling it after the new drive
gets attached. It's possible that this is no longer needed, and the kernel
will figure out directly from the hardware.
Som Googling around suggests that these days it's controller dependent. Some
controllers have a meeting of the minds with the kernel, and hot-swapping a
drive will Just Work™. In other case you have to poke the kernel, in a few
places.