Score:0

How to use dd to clone single drive to raid1?

ye flag

Running dd if=/dev/sda of=/dev/md126 is taking some time so it seems like it's working but I am not sure what else may need to be done after to make the system bootable.

When trying to mount /dev/md126 it says: wrong fs type, bad option, bad superblock on /dev/md126, missing codepage or elper program, or other error.

/dev/sda is the source drive (256GB SSD)

/dev/md126 is the target drive (512GB SSD RAID 1) - setup using bios/motherboard RAID controller. So fake RAID I believe.

Tried using Clonezilla but it didn't detect the /dev/md126 device, just the individual drives (sdb/sdc).

Do I need to edit /etc/fstab on target disk and set up grub after? What commands are necessary?

oldfred avatar
cn flag
I do not think that works. Your dd will just totally erase the first 250GB of the target making it an identical image of your sda. It also copies all empty space, so dd is always slow. If an install better to reinstall so configuration is correct for RAID, and rsync all data from your normal backup into new install. Also most post that fake RAID is not preffered. Ubuntu Software RAID vs FakeRaid vs Hardware RAID. Home user https://ubuntuforums.org/showthread.php?t=2422516&p=13873154#post13873154
Enigma avatar
ye flag
Looking into a hardware RAID1... any recommendations for something inexpensive but reliable? Just needs two ports. I'm definitely avoiding doing a reinstall if I can.
oldfred avatar
cn flag
I do not know RAID nor servers. But what I have seen is that RAID is for uptime, not backup. So why RAID? Link has info on Software RAID which I often see recommended. https://askubuntu.com/questions/1234949/install-ubuntu-20-04-focal-fossa-with-raid-1-on-two-devices & http://www.smallnetbuilder.com/nas/nas-features/31745-data-recovery-tales-raid-is-not-backup
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.