Stack Setup

Hot Swapping (with Raid)

Preparation

Before removing drive, remove from raid arrays:

mdadm -f /dev/mdX /dev/sdXX
mdadm -r /dev/mdX /dev/sdXX

Setup New Drive

Copy partitions from spare working to new drive:

sfdisk -d /dev/sdOLD | sfdisk /dev/sdNEW

Re-add drives to arrays:

mdadm -a /dev/mdX /dev/sdXX