For mdadm --create
and RAID 1, it's usually the first device copied to the second one. However, there is no guarantee for this.
After all, mdadm --create
creates a new RAID from scratch with no data on it, so it does not matter which direction things are copied for the initial sync. Any data you want to be there, you have to write after creation.
If you wish to force the matter, you can create a degraded RAID and add the other drive afterwards:
mdadm --create /dev/md100 --level=1 --raid-devices=2 missing /dev/sdy1
mdadm --manage /dev/md100 --add /dev/sdx1
In this fashion the sync would go from /dev/sdy1
being the only drive in the RAID, to /dev/sdx1
which was added afterwards.
Even then, you can not rely on what data will be on the RAID.
Using mdadm --create
for data recovery purposes is possible, but only if you know what you are doing. Basically this can be made to work by circumstance, it's not designed for this purpose.
In RAID 1 there is also the option to mark individual drives as write-mostly
, which will mostly avoid reading from this drive as much as possible (but not completely). This can help offset some performance penalty in an array where one drive is noticably slower than the other.