Swapping Out Drives in Live cPanel System

tbutler

Well-Known Member
Feb 11, 2004
59
9
158
Hi everyone,
I'm looking to replace my primary drive in a live cPanel-based server with a new, larger drive. I'm trying to figure out how to do this with the absolute minimum downtime possible. Can anyone offer recommendations?

Ideas I've considered:

1.) Doing a fresh RHEL5 and cPanel provisioning on the new drive while the old drive is installed in the server's third drive bay and then using WHM's migration tools to reactivate all the accounts. This seems like it would lead to a fairly lengthy downtime.

2.) Installing the new drive initially as the third drive, using some utility (dd? partimage? Something else -- recommendations/confirmations welcome!) to clone the partitions from the old drive to the new one and then (if it wasn't done as part of the transfer) resize the partitions to fill the new drive.

Recommendations?

Thanks,
Tim
 

madaboutlinux

Well-Known Member
Jan 24, 2005
1,051
2
168
Earth
The better option is to setup a new server with a larger drive and perform the migration of all the accounts/settings using rsync.

Once everything is synced on the new server, change the A record of all the accounts on the old server to point to the new server IP so traffic will be routed on the new server. In the mean time, change the DNS of the domains to point to the new ones OR if you want to keep the same DNS, change the IPs.

The websites will work from the new server via the old server till the DNS are propagated and you can safely remove the old server in 24 hours.

If you need any help in the migration, feel free to ask.
 

Beansprout

Active Member
Sep 12, 2005
37
0
156
How about running both drives in unison? You'll see much better performance and greater capacity.
 

tbutler

Well-Known Member
Feb 11, 2004
59
9
158
The better option is to setup a new server with a larger drive and perform the migration of all the accounts/settings using rsync.

Once everything is synced on the new server, change the A record of all the accounts on the old server to point to the new server IP so traffic will be routed on the new server. In the mean time, change the DNS of the domains to point to the new ones OR if you want to keep the same DNS, change the IPs.

The websites will work from the new server via the old server till the DNS are propagated and you can safely remove the old server in 24 hours.

If you need any help in the migration, feel free to ask.
Thanks!

That might be the way to go. This all transpired while talking to my datacenter (SoftLayer) and they offered a good deal for me to upgrade my current server, part of which involves replacing the 250GB drives I have now with more spacious 500GB ones. Trouble is trying to figure out how to do this efficiently!

I'm not sure I can get the same offer if I replace the server outright, although maybe that is worthwhile. In any case, that is why I was hoping to instead clone the old drive onto the new before making the permanent switch.

Beansprout said:
How about running both drives in unison? You'll see much better performance and greater capacity.
The DC is trading drives with me, so I won't actually retain possession of the old drives once the data is off of them.

Am I going after a semi-impossible quest, perhaps?

Thanks,
Tim
 

tbutler

Well-Known Member
Feb 11, 2004
59
9
158
OK, here is another, wild idea. As long as I am doing this, could I some how (if I had the DC put in two new drives at the same time) not only do what I was trying to do before (clone the data from the old disk) but also turn the two new disks into a software RAID 1 array?

Or, should I give up on trying to migrate on a live server and just start over?

If I do start over, is there an easy way to make sure I pull in not just client accounts, but most of the tweaks I've applied to standard server components?

Thanks,
Tim
 

Lyttek

Well-Known Member
Jan 2, 2004
775
5
168
If you're going the dedicated server route, you'll probably be better off getting a new server and doing as mentioned. That gives you a bit of a buffer if something goes wrong as well.

Otherwise, you're best bet is to image the system, etc which is going to entail some support costs somewhere...

If you're just running out of space, check into the possibility of just adding drives rather than replacing... then you can use that new space to migrate your /home.