I moved away from software RAID due to all the hassle it brings. After OS reinstall, I am left with only one drive. I ordered a hardware RAID controller today, and when the controller arrives, I'd like to plug in the identical drives into the RAID controller and set up RAID 1 WITHOUT losing any data or needing to reinstall the OS (Debian Jessie x86_64).
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 931.5G 0 disk
├─sda1 8:1 0 953M 0 part /boot
├─sda2 8:2 0 29.8G 0 part [SWAP]
└─sda3 8:3 0 900.8G 0 part
├─vgmain-lvroot 254:0 0 621.4G 0 lvm /
├─vgmain-lvmail 254:1 0 93.1G 0 lvm /var/vmail
├─vgmain-lvhome 254:2 0 93.1G 0 lvm /home
├─vgmain-lvtmp 254:3 0 18.6G 0 lvm /tmp
└─vgmain-lvvar 254:4 0 74.5G 0 lvm /var
sdb 8:16 0 931.5G 0 disk
Can I do this somehow by
dding the existing data to the clean drive while having it plugged into the RAID controller and sat up as RAID 1? To clarify, let's say sda is the drive with my data, sdb is the drive which is not in use.
- Plug sda into the mobo sata controller
- Plug sdb into the RAID controller
- Define sdb as RAID 1 drive
- Boot from liveCD and
ddcontents of sda -> sdb
- Plug sda into RAID controller, define as RAID1
- RAID controller syncs the drives, (copies over sdb to sda) (?)
- Boot without problems?
dd copy the drive in a way that mbr/partitions/etc. are preserved? Am I thinking in a completely stupid way of doing this?
I contacted the RAID controller manufacturer and asked if it has some kind of utility to convert a drive into 2 drives in RAID1, but they said no. If it's relevant in any way, the specific controller is a
HighPoint RocketRAID 620 PCI-Express 2.0 x1 SATA III RAID card