Clone OS Drive (RAID1)

General support questions
Post Reply
simon_lefisch
Posts: 92
Joined: 2017/07/12 21:02:02

Clone OS Drive (RAID1)

Post by simon_lefisch » 2020/05/29 16:23:16

Hello,

I have (2x) 500GB RAID1 SSDs that hold all my VMS. I'm looking to consolidate storage by moving the VMs to my OS drives (2x RAID1 250GB SSDs), however I need larger devices. I was wondering how difficult it would be to clone my OS drives? Looking to get (2x) 1TB SSDs so I can have the VMs stored on them as well. Possible? Difficult? I've looked online and couldn't find a direct answer so figured I would ask here. Thanks!
Hardware:
Supermicro X10SRi-F mobo
E5-2683v4 16-core CPU
112GB ECC RAM
2x 250GB SSD RAID1 (current CentOS 7 version)
2x 500GB SSD RAID1 (VM Disk Image Storage)
2x 4TB HDD RAID1 (Backup Storage via FreeNAS VM)
2X 6TB HDD RAID1 (Data Storage via FreeNAS VM)

User avatar
jlehtone
Posts: 3038
Joined: 2007/12/11 08:17:33
Location: Finland

Re: Clone OS Drive (RAID1)

Post by jlehtone » 2020/05/29 18:56:54

Software, hardware, or fakeRAID?
Plain partitions or LVM?
Online migration or offline cloning?

simon_lefisch
Posts: 92
Joined: 2017/07/12 21:02:02

Re: Clone OS Drive (RAID1)

Post by simon_lefisch » 2020/05/29 19:01:17

jlehtone wrote:
2020/05/29 18:56:54
Software, hardware, or fakeRAID?
Plain partitions or LVM?
Online migration or offline cloning?
Software RAID thru mdadm
Plain Partitons (although I have thought about switching to LVM but figure I would have to reinstall OS for that, unless it's do-able)
Offline cloning (clonezilla?)
Hardware:
Supermicro X10SRi-F mobo
E5-2683v4 16-core CPU
112GB ECC RAM
2x 250GB SSD RAID1 (current CentOS 7 version)
2x 500GB SSD RAID1 (VM Disk Image Storage)
2x 4TB HDD RAID1 (Backup Storage via FreeNAS VM)
2X 6TB HDD RAID1 (Data Storage via FreeNAS VM)

User avatar
jlehtone
Posts: 3038
Joined: 2007/12/11 08:17:33
Location: Finland

Re: Clone OS Drive (RAID1)

Post by jlehtone » 2020/05/29 20:48:13

Offline, with Clonezilla should be relatively easy. (Says a person, who has perhaps once used Clonezilla for something.)
IIRC, there was option to clone whole disk (you get partition table, sector 0, etc.) and option to clone individual partitions (possibly with resize too).


However, with RAID1 there is an another (semi-live) option:
1. drop one leg and replace that drive with larger one
2. let RAID1 clone
3. fix boot (if necessary)
4. drop the other old leg and replace that drive with larger one
5. let RAID1 clone
6. fix boot (if necessary)
7. resize/add partitions/etc

This I have definitely done (back in 2006?)

simon_lefisch
Posts: 92
Joined: 2017/07/12 21:02:02

Re: Clone OS Drive (RAID1)

Post by simon_lefisch » 2020/05/29 21:06:02

jlehtone wrote:
2020/05/29 20:48:13
Offline, with Clonezilla should be relatively easy. (Says a person, who has perhaps once used Clonezilla for something.)
IIRC, there was option to clone whole disk (you get partition table, sector 0, etc.) and option to clone individual partitions (possibly with resize too).


However, with RAID1 there is an another (semi-live) option:
1. drop one leg and replace that drive with larger one
2. let RAID1 clone
3. fix boot (if necessary)
4. drop the other old leg and replace that drive with larger one
5. let RAID1 clone
6. fix boot (if necessary)
7. resize/add partitions/etc

This I have definitely done (back in 2006?)
Interesting....maybe that will be a better solution. If I do the semi-live option, I assume I have to boot from a recovery CD/USB and adjust partiton sizes in parted/fdisk?

With Clonezilla, I guess I'm a little confused as to how it copy everything. I assume that will copy any "flags" related to the RAID array as well?
Hardware:
Supermicro X10SRi-F mobo
E5-2683v4 16-core CPU
112GB ECC RAM
2x 250GB SSD RAID1 (current CentOS 7 version)
2x 500GB SSD RAID1 (VM Disk Image Storage)
2x 4TB HDD RAID1 (Backup Storage via FreeNAS VM)
2X 6TB HDD RAID1 (Data Storage via FreeNAS VM)

User avatar
jlehtone
Posts: 3038
Joined: 2007/12/11 08:17:33
Location: Finland

Re: Clone OS Drive (RAID1)

Post by jlehtone » 2020/05/29 21:22:04

That depends.

You can resize (enlarge) the last partition live. (It might require a reboot for the kernel to notice new size.)
You can enlarge XFS live (xfs_growfs requires a mount point).

You can add new partitions and mount them, rather than grow existing partitions.


Do you have a rescue kernel? There is some dracut*rescue* packet that adds one, with "fat" initramfs.
viewtopic.php?t=65335
Then there is no need for USB/DVD.

simon_lefisch
Posts: 92
Joined: 2017/07/12 21:02:02

Re: Clone OS Drive (RAID1)

Post by simon_lefisch » 2020/05/29 21:49:14

I do have the rescue kernel installed. This is a UEFI system, not legacy if that makes a difference. /boot, /home and / are ext4. So you're saying I could use the semi-live method and once I have swapped out the drives for larger ones, I can boot into rescue and resize / and /home?
Hardware:
Supermicro X10SRi-F mobo
E5-2683v4 16-core CPU
112GB ECC RAM
2x 250GB SSD RAID1 (current CentOS 7 version)
2x 500GB SSD RAID1 (VM Disk Image Storage)
2x 4TB HDD RAID1 (Backup Storage via FreeNAS VM)
2X 6TB HDD RAID1 (Data Storage via FreeNAS VM)

Post Reply

Return to “CentOS 7 - General Support”