I currently have 2 3TB HDDs, one that is always almost full, and another with ~200GB free. I would like to purchase an extra 3TB drive and setup a RAID 5 array, but I am concerned about losing the existing data.
I have found that mdadm will be used to create the array, with a command similar to mdadm --create --verbose /dev/md0 --level=5 --raid-devices=2 /dev/sdb2 /dev/sdc2 --spare-devices=1 /dev/sdd2, where /dev/sdb2 and /dev/sdc2 are my existing drives (that have data) and /dev/sdd2 is a new 3TB drive with no data on it. Will this cause me to lose the data on /dev/sdb2 and /dev/sdc2?
My other idea was to somehow create a 2x3TB RAID 5 array without a spare device, where one of the drives in the array is empty and the other has data. Then I could copy my files over from the existing drive to the new (6TB) array, wipe the now redundant drive, and then add it as the spare drive for the array. Although I doubt this would work?
If neither of the above options will work, is there another way to create a RAID 5 array with 2 drives that already have data and 1 that is empty? What about if I were add 2 new empty drives at once, would that open up new options?
I am using Ubuntu Server 16.04.2 with mdadm version 3.3.