Looking for a few pointers here.
I am trying to automate the adding and removal of two external usb disks to my linux raid mirror (md) that I use for an offsite copy of my data.
This is what I currently do.
Server has 2 x 500 gb internal disks setup with linux raid 1. (md)
I connect 1 of the external usb disks, add it as a secondary mirror to the main array.
After it rebuilds, I remove it from the array and take it home.
I have two of these external drives so one of them is always offsite, and the other is either being rebuilt, or connected as a secondary mirror.
At the moment, this involves running commands manually. I cannot seem to figure out how to automatically add these disks from and to the array with a script. It seems that every time it rebuilds on the external disk, it gives it a new UUID.
I would like to set it up so:
1.A specific time of day the external disk is removed from the array.
2. If the other usb disk is connected, it is automatically added to the array and the rebuild starts.
Can someone assist?
Bookmarks