Let's say I have a software raid1 array from two partitions. I get one HDD out of the computer, and put it into another computer, and copy some data to the mirrored partiton.
What happens when I put the HDD back into it's original place? Will the new data get mirrored to the other drive? If yes how does the controller check/notice that there is new data on the drive? Surely it can't check the whole partition on every boot.
Also, what happens when I delete a file in the same scenario as above? Will it get deleted back from the other drive, or will it get copied back?
This is on an Ubuntu machine, and by getting the drive out, I mean that the computer is completely turned off while doing this, and is only turned back on the when the drive is back in it's place.
If the raid controller does not recognize the change because the power is off while doing this, is there a way to instruct it to reconstruct the array? Like, let's say that raid is constructed from /dev/sda1 and /dev/sdb1, I turn off the computer, and pull out the sdb drive, copy data to it, put it back, and now I want to instruct the controller to reconstruct the array, using /dev/sdb1 "as a master".