3

I have an install of CentOS 6.5 which was setup with software raid (as outlined in this official documentation). There are 3 hard drives and I have RAID1 running:

NAME    MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT
sdb       8:16   0 931.5G  0 disk
├─sdb1    8:17   0     2G  0 part
│ └─md1   9:1    0     2G  0 raid1 [SWAP]
├─sdb2    8:18   0   256M  0 part
│ └─md0   9:0    0   256M  0 raid1 /boot
└─sdb3    8:19   0 929.3G  0 part
  └─md2   9:2    0 929.1G  0 raid1 /
sda       8:0    0 931.5G  0 disk
├─sda1    8:1    0     2G  0 part
│ └─md1   9:1    0     2G  0 raid1 [SWAP]
├─sda2    8:2    0   256M  0 part
│ └─md0   9:0    0   256M  0 raid1 /boot
└─sda3    8:3    0 929.3G  0 part
  └─md2   9:2    0 929.1G  0 raid1 /
sdc       8:32   0 931.5G  0 disk
├─sdc1    8:33   0     2G  0 part
│ └─md1   9:1    0     2G  0 raid1 [SWAP]
├─sdc2    8:34   0   256M  0 part
│ └─md0   9:0    0   256M  0 raid1 /boot
└─sdc3    8:35   0 929.3G  0 part
  └─md2   9:2    0 929.1G  0 raid1 /
sr0      11:0    1  1024M  0 rom

I now want to move this system to Hyper-V, but using mondo rescue I'm having issues with restoring it without setting up three virtual drives. We don't want RAID on the new virtualised environment so I want to remove it completely first, before creating the clone with mondo.

From what I've read, I need to stop the arrays and remove them:

mdadm --stop /dev/md0
mdadm --remove /dev/md0
mdadm --stop /dev/md1
mdadm --remove /dev/md1
mdadm --stop /dev/md2
mdadm --remove /dev/md2

And then I can get rid of the superblocks:

mdadm --zero-superblock /dev/sda
mdadm --zero-superblock /dev/sdb
mdadm --zero-superblock /dev/sdc

But at this point, I want to make sure that a) the data is intact (at least on /dev/sda) and b) I can boot to this again. Essentially, I want it to look at the first hard drive as if it never had the RAID setup in the first place.

By stopping the arrays and removing the superblocks is this effectively "removing software RAID" or are there additional steps to achieve what I want?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.