First and foremost: Do you have backup? If not, you might consider getting a big external drive and backing up the array first. Why? Along with the possibly of making "FAT finger mistakes", working with a RAID array has it's hazards.
_________________________________________________________________________
The following GUI process would apply "if" you have the physical room and an extra port connection, for adding a new drive before removing the drive with issues.
- First, physically install the new drive.
- Under Storage, Disks. Find the new drive and wipe it.
- Go to Storage, Multiple Device.
- Highlight your md? array, and click the Recover icon.
- Add the new drive as a spare.
- Then you can physically remove the disk with issues, noting the following:
**Note: it's necessary to know what the device name is for the drive you want to remove. Every reboot can affect drive device names so the name /dev/sd?, must be rechecked after every reboot . This can be done under Storage, Multiple Device and cross verified by Storage, Disks.
If you want to do this on the command line, following is a short summary of command line actions:
mdadm --add /dev/md? /dev/sd? # add the new drive a spare
mdadm --fail /dev/md? /dev/sd? # mark the drive with issues as failed
mdadm --remove /dev/mdX /dev/sd? # remove failed drive
A more complete explanation for the command line process can be found -> here.