Assume you have a RAID5 with 3 hard drives and you just want to add one more and change the raid level to RAID6. This will not give you any additional storage space, but one more disc for redundancy. The new hard drive has been recognized by the system as "/dev/sde"

1. Create a RAID partition
dd if=/dev/zero of=/dev/sde bs=512 count=1
cat << EOF | fdisk -u /dev/sde
n
p
1
 
 
t
fd
w
EOF
Then add the disk as a spare hard drive in the current RAID 5:
mdadm /dev/md0 --add /dev/sde
Then change the level from RAID 5 ro RAID 6:
mdadm /dev/md0 --grow --raid-devices=4 --level=6 --layout=preserve

http://marc.info/?l=linux-raid&m=133630221022568&w=2