I did another test. First of all I shutdown and powered down the server properly. Then I unplugged one device and started the computer again. mdadm detected the missing device. After a couple of minutes I re-attached the SATA cable. mdadm didn't make an attempt to integrate the partitions.
Here is an output of mdadm -D for the MD device and -E for all three partitions. /dev/sdc1 is the partition of the disk that was missing during boot. The 'Array State : AAA' of /dev/sdc1 looks suspicious to me.
# mdadm -D /dev/md0
/dev/md0:
Version : 1.2
Creation Time : Tue Apr 17 15:09:30 2012
Raid Level : raid1
Array Size : 487412 (476.07 MiB 499.11 MB)
Used Dev Size : 487412 (476.07 MiB 499.11 MB)
Raid Devices : 3
Total Devices : 2
Persistence : Superblock is persistent
Update Time : Mon Apr 23 14:11:48 2012
State : clean, degraded
Active Devices : 2
Working Devices : 2
Failed Devices : 0
Spare Devices : 0
Name : vlserver:0 (local to host vlserver)
UUID : b3b367ee:f2f4f4c0:c22cdc7b:4ac1ea2c
Events : 89
Number Major Minor RaidDevice State
3 8 1 0 active sync /dev/sda1
1 8 17 1 active sync /dev/sdb1
2 0 0 2 removed
I did another test. First of all I shutdown and powered down the server properly. Then I unplugged one device and started the computer again. mdadm detected the missing device. After a couple of minutes I re-attached the SATA cable. mdadm didn't make an attempt to integrate the partitions.
Here is an output of mdadm -D for the MD device and -E for all three partitions. /dev/sdc1 is the partition of the disk that was missing during boot. The 'Array State : AAA' of /dev/sdc1 looks suspicious to me.
# mdadm -D /dev/md0
/dev/md0:
Version : 1.2
Creation Time : Tue Apr 17 15:09:30 2012
Raid Level : raid1
Array Size : 487412 (476.07 MiB 499.11 MB)
Used Dev Size : 487412 (476.07 MiB 499.11 MB)
Raid Devices : 3
Total Devices : 2
Persistence : Superblock is persistent
Update Time : Mon Apr 23 14:11:48 2012
State : clean, degraded
Active Devices : 2
Working Devices : 2
Failed Devices : 0
Spare Devices : 0
Name : vlserver:0 (local to host vlserver) f2f4f4c0: c22cdc7b: 4ac1ea2c
UUID : b3b367ee:
Events : 89
Number Major Minor RaidDevice State
3 8 1 0 active sync /dev/sda1
1 8 17 1 active sync /dev/sdb1
2 0 0 2 removed
# mdadm -E /dev/sda1 f2f4f4c0: c22cdc7b: 4ac1ea2c
/dev/sda1:
Magic : a92b4efc
Version : 1.2
Feature Map : 0x0
Array UUID : b3b367ee:
Name : vlserver:0 (local to host vlserver)
Creation Time : Tue Apr 17 15:09:30 2012
Raid Level : raid1
Raid Devices : 3
Avail Dev Size : 974824 (476.07 MiB 499.11 MB) ea75cde1: bd3ec883: f6c4f709
Array Size : 974824 (476.07 MiB 499.11 MB)
Data Offset : 24 sectors
Super Offset : 8 sectors
State : clean
Device UUID : caee6e67:
Update Time : Mon Apr 23 14:11:48 2012
Checksum : 4ea9d4d9 - correct
Events : 89
Device Role : Active device 0
Array State : AA. ('A' == active, '.' == missing)
# mdadm -E /dev/sdb1 f2f4f4c0: c22cdc7b: 4ac1ea2c
/dev/sdb1:
Magic : a92b4efc
Version : 1.2
Feature Map : 0x0
Array UUID : b3b367ee:
Name : vlserver:0 (local to host vlserver)
Creation Time : Tue Apr 17 15:09:30 2012
Raid Level : raid1
Raid Devices : 3
Avail Dev Size : 974824 (476.07 MiB 499.11 MB) 6f8dae0c: ffc93d08: bfcd4870
Array Size : 974824 (476.07 MiB 499.11 MB)
Data Offset : 24 sectors
Super Offset : 8 sectors
State : clean
Device UUID : 8ee52fbe:
Update Time : Mon Apr 23 14:11:48 2012
Checksum : bb12772a - correct
Events : 89
Device Role : Active device 1 f2f4f4c0: c22cdc7b: 4ac1ea2c
Array State : AA. ('A' == active, '.' == missing)
# mdadm -E /dev/sdc1
/dev/sdc1:
Magic : a92b4efc
Version : 1.2
Feature Map : 0x0
Array UUID : b3b367ee:
Name : vlserver:0 (local to host vlserver)
Creation Time : Tue Apr 17 15:09:30 2012
Raid Level : raid1
Raid Devices : 3
Avail Dev Size : 974824 (476.07 MiB 499.11 MB) f6bda45d: 973bbdad: 364290be
Array Size : 974824 (476.07 MiB 499.11 MB)
Data Offset : 24 sectors
Super Offset : 8 sectors
State : clean
Device UUID : e7df883f:
Update Time : Mon Apr 23 14:05:59 2012
Checksum : 812786b4 - correct
Events : 75
Device Role : Active device 2
Array State : AAA ('A' == active, '.' == missing)