I set up a RAID 1 of 2 drives using mdadm
on a Linux machine. What would happen if I – while the device is busy – disconnected one of the drives and then some time later reconnected it? Assume that the hardware doesn't break due to the drive being disconnected from power while busy.
- Would the ongoing read and write operations just continue in any case (even if the drive I disconnected was the one the read operation was physically happening on as a read operation only requires the RAID software to access one drive)?
- Would the RAID software automatically recognize the drive once I connected it again and write the newest data onto it, therefore automatically repairing the array?
- If so, will the RAID software copy all of the data of the drive which wasn't disconnected to the one which was or just the changed data?
- If I disconnected drive 1 first, changed some files, then disconnected drive 2, then reconnected drive 1, changed some files, and then reconnected drive 2, what would happen?