0

I am facing issue configuring RAID 1 with currently running production server (Ubuntu 18.04 LTS).

Currently my configuration is

sda      8:0    0  1.8T  0 disk 
├─sda1   8:1    0    1M  0 part 
└─sda2   8:2    0  1.8T  0 part /
sdb      8:16   0  1.8T  0 disk 
├─sdb1   8:17   0    1M  0 part 
└─sdb2   8:18   0  1.8T  0 part 

I have two 2TB HDD, one is running the server os (sda) and another is 2TB blank HDD (sdb) which I need to configure with (sda) in RAID 1 so that I can get fault tolerance of OS.

I have read multiply article regarding RAID configuration but none of them are running on the production server. So is there any way I can create RAID 1 for two HDD each 2TB and then copy the whole OS into one HDD in a way when I disconnect the original Hard drive it can load from RAID Hard drives ?

Any suggestion are accepted.

Thank You :)

jrnetsec
  • 5
  • 2

1 Answers1

0

Not possible.

You are booted from sda2, so you can't initialize a raid1 device using this disk, it has to be unused first.

So you should first work on a solution to backup your production data, and of course an automated and reliable way of restoring it and bring back the service to users.

Once done, plan downtime, shutdown the production service, backup your data, ensure your backup is ok, and then reinstall your operating system using mdadm raid1 (/dev/md0 device relying on /dev/sda and /dev/sdb), and finally restore the production data.

Chaoxiang N
  • 1,283
  • 5
  • 11
  • I get it. If I got two hard drive /dev/sdb and /dev/sdc each of 2TB can I make it raid and then is there any way I can copy my operating system into on of the raid HDD in way when I remove the /dev/sda after shutting down server it can automatically boot from the raid hard drives? – jrnetsec Mar 02 '20 at 21:44
  • yes it works. take care, it needs good technical skills (mdadm, grub, incremental data copy after production stop). And it is also the safest option, because you have a recovery option (boot on old disk), and it is priceless. – Chaoxiang N Mar 03 '20 at 05:18
  • Thank you! I'll update here once done. So it might help others as well. – jrnetsec Mar 03 '20 at 22:28