Today I wanted to extend my raid array with one disk, but I made a major error. I forgot partition the new disk to utilize the full 640GB.
I used the following commands to extend the array:
Code:
mdadm --add /dev/md0 /dev/sdf
mdadm --grow --raid-devices=6 /dev/md0
xfs_growfs /dev/md0
After noticing that something was wrong I used these commands to remove the new disk:
Code:
mdadm -f /dev/md0 /dev/sdf
mdadm -r /dev/md0 /dev/sdf
The array has not been damaged, but I have the following situation:
Code:
#mdadm -E /dev/sda1
/dev/sda1:
Magic : a92b4efc
Version : 00.91.00
UUID : 8be5b829:959ee00d:01f9e43d:ac30fbff (local to host server)
Creation Time : Fri Sep 4 12:05:37 2009
Raid Level : raid5
Used Dev Size : 625129216 (596.17 GiB 640.13 GB)
Array Size : 3125646080 (2980.85 GiB 3200.66 GB)
Raid Devices : 6
Total Devices : 6
Preferred Minor : 0
Reshape pos'n : 201877120 (192.53 GiB 206.72 GB)
Delta Devices : 1 (5->6)
Update Time : Sun Mar 6 20:53:21 2011
State : active
Active Devices : 5
Working Devices : 5
Failed Devices : 1
Spare Devices : 0
Checksum : 4e456079 - correct
Events : 18015
Layout : left-symmetric
Chunk Size : 64K
Number Major Minor RaidDevice State
this 0 8 1 0 active sync /dev/sda1
0 0 8 1 0 active sync /dev/sda1
1 1 8 17 1 active sync /dev/sdb1
2 2 8 33 2 active sync /dev/sdc1
3 3 8 49 3 active sync /dev/sdd1
4 4 8 65 4 active sync /dev/sde1
5 5 0 0 5 faulty removed
#
How can I repair this situation? Before starting this adventure I made a back-up of everything that was stored in the raid array.