0

How can I clone a single HDD bootable disk from a Software RAID1 Array in Linux server? It is currently a two-disk HDD mirror array. I have physical access to the server, and it has empty bays for disks. I'd like to leave the RAID1 array the way it is, and just make a single cloned disk of the Linux OS (CentOS 7) and all the data.

I plan on migrating from CentOS 7, which is EOL, and want to use a cloned disk to do so. Then I'd like to create a RAID1 array starting with the new disk to replace the current one.

I've found instructions for removing a disk from an array safely, which I suppose I could do and then clone it (using Clonezilla). However, it would be simpler, I think, to leave the array operational and just clone from it, if possible.

And if I do need to remove the disk from the array, marking it as 'failed' ala instructions such as these, will the disk be bootable when I remove it, so I can create a bootable clone?

Thanks for any help.

1 Answers1

0

You can use Clonezilla to create an image using Linux mdraid as a source without removing anything from the raid. Just boot your system from Clonezilla boot media and select mdXXX as a source. You can then restore the image onto something else and Clonezilla is smart enough to regenerate GRUB entries for you using appropriate UUIDs.

Peter Zhabin
  • 2,696
  • 9
  • 10
  • Thanks! I'll give that a go, and return to accept this answer if it works, as I'm sure it will. – jamminjames Mar 30 '23 at 19:54
  • Is there a reason you say create an image vs just cloning directly? Is it better because the GRUB gets regenerated as you mentioned, or would it work either way? – jamminjames Apr 01 '23 at 01:01
  • There's no difference in the process, but I prefer to create an image cause it serves as a backup and can be used later multiple times without the need to touch the original. – Peter Zhabin Apr 01 '23 at 14:31