The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Swapping Out Drives in Live cPanel System

Discussion in 'General Discussion' started by tbutler, Jul 26, 2010.

  1. tbutler

    tbutler Member

    Joined:
    Feb 11, 2004
    Messages:
    24
    Likes Received:
    0
    Trophy Points:
    1
    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
     
  2. madaboutlinux

    madaboutlinux Well-Known Member

    Joined:
    Jan 24, 2005
    Messages:
    1,052
    Likes Received:
    2
    Trophy Points:
    38
    Location:
    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.
     
  3. Beansprout

    Beansprout Active Member

    Joined:
    Sep 12, 2005
    Messages:
    37
    Likes Received:
    0
    Trophy Points:
    6
    How about running both drives in unison? You'll see much better performance and greater capacity.
     
  4. tbutler

    tbutler Member

    Joined:
    Feb 11, 2004
    Messages:
    24
    Likes Received:
    0
    Trophy Points:
    1
    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.

    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
     
  5. tbutler

    tbutler Member

    Joined:
    Feb 11, 2004
    Messages:
    24
    Likes Received:
    0
    Trophy Points:
    1
    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
     
  6. Lyttek

    Lyttek Well-Known Member

    Joined:
    Jan 2, 2004
    Messages:
    770
    Likes Received:
    3
    Trophy Points:
    18
    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.
     
Loading...

Share This Page