#!/bin/bash

#set raid type
if [ $# -eq 2 ]; then
	str=$2
	dev=${str:0:8}
	num=${str:8}
#	echo "dev: ${dev}"
	parted $dev set $num raid on
#remove ssd	
	mdadm /dev/md5 --remove $1
#replace ssd
	mdadm --manage /dev/md5 --add $2
else
	echo "Usage:saturn-raid5-replace.sh /dev/sdx1(remove) /dev/sdx1(replace)"
fi






 
