Urgent help needed to move server to a new drive!

13 posts / 0 new
Last post
#1 Sun, 05/26/2013 - 08:49
bamazy@yahoo.com

Urgent help needed to move server to a new drive!

Dear all,

My Centos server which runs Virtualmin is getting down often lately. The dedicated server company offered a hardware check to see what is the problem. After the check they said both the drives were broken and offered me to install an additional drive so that I can backup and move my data to the new drive. They installed the additional drive and restarted the server. Now I have access to the server but I don't know what to do. Their support clerk said there is nothing more they can do to help me to solve the problem. Even when I asked the clerk to recommend me a source where I can find required information.

Well, I searched How to change faulty drive in RAID and the tutorials I found was mentioning to run cat /proc/mdstat command to see the faulty drive. But the result of the command returned [UU] for the partitions which, according to the tutorials, indicates no drive is faulty.

Now, would you, please, enlighten me what exactly am I supposed to do from now on? My server is up and working now and the additional drive is installed on the server. How do I move all the data to the newly installed drive so that the company removes the faulty drives?

Any help is highly appreciated!

Best Regards

Sun, 05/26/2013 - 21:13
andreychek

Howdy,

Well, that's a bit of a tricky problem to solve :-)

Before you do anything else, I'd definitely recommend making absolute certain that you have recent backups of any data that you'd miss in case of a drive failure.

Since both drives are bad, but currently working -- is there any chance that you could get your provider to use disk imaging software to mirror the contents of your current disks onto new ones?

That would be by far the simplest solution to your predicament.

The problem is that you're not just looking to change a single faulty RAID drive, you're looking to change two.

I'm also not sure why they just gave you one drive to put your data onto, as I imagine you'd like to continue using RAID.

If they'd consider using imaging software to migrate your current drives to new ones, that'd be a pretty straight forward way of handling all this.

-Eric

Mon, 05/27/2013 - 00:20
bamazy@yahoo.com

Hi, Eric.

Thank you very much for the reply.

They first offered to change the faulty drives with new ones but said the data will be lost. When I said I don't want the data be lost, they offered me a permanent and a temporary drive solution. So that I move my data to the additional drive and then they replace the faulty drives with the new ones.

When I asked them to help me with the moving process, they said they will not.

Let me write them to see if they would consider using imaging software as you mentioned.

I'll let you know the consequences.

Thanks a lot again!

Mon, 05/27/2013 - 03:33
bamazy@yahoo.com

Hi, Eric.

They said they don't provide such a service as the server is a root server with full administrative rights and duties.

They offered me a backup space, which I already have and copy backups to, to move my backup data and then remove the faulty drives.

My understanding is that I need to take a whole system backup and ask them to replace the drives with new ones. Then install virtualmin, recover everything from the backup space.

Is it possible to use imaging software myself to migrate everything? Otherwise, I will have to install everything again, make configurations, etc. The process will take a few days to find problems, troubleshoot. I will have to google again or open a thread here every time any problem will arise.

If using imaging software is not possible, can I backup every configuration on the server? Nginx, APC, etc.

Best Regards

Mon, 05/27/2013 - 07:54
andreychek

Do you happen to have console access to the server?

You could certainly perform the disk imaging yourself. There's a number of tools to do it, including clonezilla, or even just using ''dd' on a rescue disk -- however, you generally would need to be at the console to do that. You'd need to boot off of a boot CD.

-Eric

Wed, 05/29/2013 - 07:31
bamazy@yahoo.com

Hello, Eric.

The company said they can give two hours console access for free. Will it be enough to perform the imaging?

What else do I need to have or know? As I understood, both faulty drives and the new drives should be installed on the server. I guess, they haven't installed new drives yet. So, I think, I will also have to ask them to install the new drives too before giving console access.

You mentioned that I'd need to boot off of a boot CD. Should I also ask them to insert a boot CD to the system?

Best Regards

Wed, 05/29/2013 - 10:01
andreychek

The company said they can give two hours console access for free. Will it be enough to perform the imaging?

Hrm, imaging disks can take some time... it depends on the speed and size of your disks though.

While I don't know how long to expect it to take, having that completed within 2 hours might be tough, especially if you're just getting familiar with the process.

They've kind of put you into a spot though, by giving you two bad drives. Which isn't entirely their fault either... but I guess I'd hope they'd offer some leniency there :-)

What else do I need to have or know? As I understood, both faulty drives and the new drives should be installed on the server.

One of the difficult things is determining which drive is which from within the disk imaging software.

However, it's absolutely critical to make sure that you're imaging from the old drives to the new drives :-)

So you'll want to make sure you know which is which.

It's possible that you'd find it easier to disconnect all the drives except for the two you're working with at the moment (one old drive, one new drive).

You mentioned that I'd need to boot off of a boot CD. Should I also ask them to insert a boot CD to the system?

Well, you'd want to walk in there with a plan of exactly what you're going to do. And, unless they're providing this for you -- you'd want to make sure you have all the software you need for this to work.

They could certainly boot a CD for you, but that CD wouldn't likely include the software you need.

You'd want to create a bootable CD (or USB key if your server doesn't have a CD drive) containing the software you plan to use for imaging. I might suggest looking into CloneZilla.

I'd also suggest taking a look at the software before you get into the datacenter, so that you have an ideas to how it works.

Lastly -- I did want to mention that it's technically possible to handle replacing the drives in your system remotely. You'd have to do it one at a time -- marking one as bad, rebooting, replace it with the new one, sync the drives, and then do the same for the other one.

The problem is that it's a cumbersome and time consuming process that's difficult to explain, with lots of opportunities for things to go wrong :-)

Performing disk imaging is the simplest way to do it, and probably the least time consuming overall.

But if you're concerned about how long you'll be spending at the datacenter, you could always get the assistance of someone familiar with swapping out drives in a software RAID setup.

-Eric

Wed, 05/29/2013 - 15:27
bamazy@yahoo.com

Hello, Eric.

They say they can change the drives for me but only if I take backups myself. They just change the drives and leave me alone with it.

From what you have written above about disk imaging, I think, taking backups of the data and the webmin configuration, changing disks and installing everything from scratch and then recovering sites will be more easier for me.

I don't have the possibility to walk in to the datacenter as it's in another country. So, it seems the best solution is to install virtualmin from scratch and recover sites. At least, although not competent, I'm familiar with installing virtualmin, programs, recovering, etc. But the tough will be all the configurations. What would you recommend?

In case of installing from scratch, I will need backups of sites, which I already full backup every hour and move to a remote backup storage. I also will need webmin backups which I already did yesterday. Will it be possible to copy configurations so that I will not have to configure everything again? Like putting nginx in front of apache, changing conf files, configuring mail server, etc.

Best Regards

Wed, 05/29/2013 - 19:01
andreychek

Okay, it sounds like what they're asking you to do, is to generate backups, put those onto the drive they gave you... and then once you do that, they'll replace your two failing drives, reinstall the OS -- and then allow you to restore your system from the drive they gave you?

Does that sound about right?

Do you feel fairly confident that they'd give you the same distro/version as you have now?

If so, I'd be tempted to suggest just using rsync to generate a backup of your current system, put that on your backup drive -- and then when they replace your drives -- you could use rsync to restore the data from that backup drive to the main drives.

So long as you're getting the same distro/version, that should work fairly well (though you'd want to make sure the various services on your system are stopped while that's running).

-Eric

Thu, 05/30/2013 - 01:34
bamazy@yahoo.com

Hi, Eric.

Yes, that's what I think they are asking me to do.

I have CentOS 6.4 installed on the server and I think they will install the same OS. I will ask them to install the same version in my mail, as well.

Is it possible to copy everything between drives using rsync like imaging? Will I have to install all the programs again or after fresh OS install rsyncing from backup drive will bring everything to previous state?

Which services will I have to stop while running rsync?

Eric, please, excuse me for lots of questions if I bored you :)

Warm Regards

Thu, 05/30/2013 - 09:59
andreychek

Is it possible to copy everything between drives using rsync like imaging? Will I have to install all the programs again or after fresh OS install rsyncing from backup drive will bring everything to previous state?

Yes, though having them install the distro for you is the key, as that'll make sure the boot sector is setup properly.

Rsync can copy all files... and with them installing the boot sector, that should handle copying everything.

Which services will I have to stop while running rsync?

Preferably... all of them :-)

You'd probably need to have SSH running, but you'd probably want to shut all the others down to make sure you don't run into problems.

With a service running, that means something could change while the rsync is running.

Another way to handle that would be to take them up on their offer to boot the server off of a boot CD.

If they load up a rescue CD that has network and SSH access, you could then remotely log in, mount the old and new drives, and then use rsync to move all the files from the one to the other.

That would ensure that all services are stopped, and that you aren't getting any unexpected changes during the file copy process.

-Eric

Mon, 06/03/2013 - 15:30
bamazy@yahoo.com

Hi, Eric.

As far as I understood, the steps to be taken are having them install the distro and setup the boot sector, logging into the system, shutting down all the services except SSH and use rsync to copy everything.

If it is not difficult, I'd rather go this way than asking them to boot with a Rescue Cd.

By the way, as they have installed a temporary backup drive, am I supposed to rsync everything to the backup drive and then ask them to format and to install new drives with the distro? Then to rsync back from the backup drive?

I'm getting confused and worried that I might do something wrong...

Warm Regards

Tue, 06/04/2013 - 08:47
andreychek

Well.. almost :-)

The steps I'm envisioning would be something like this --

  • Copy everything from your filesystem over to the backup drive they gave you (stopping all services first)

  • Tell them you're done -- have them replace the failing drives, and have them install your distro onto those new drives

  • rsync everything from the backup drive over to your new drives (if you're not booting off of a boot CD for this, you'd want to make sure all services are stopped).

There's certainly some risk in all this... once they remove your old drives, there may not be getting any of that back if something goes awry.

You'd want to make certain that everything appears to be copying correctly onto the backup drive.

And then, you're hoping they don't do anything silly, like formatting your backup drive that contains all your data :-)

You're also hoping that everything goes well in copying the data from your backup drive, to the new drives they give you.

I'd recommend developing a plan for how to perform the entire maintenance -- think through what all you have to do, and come up with the commands and parameters you need to use ahead of time.

-Eric

Topic locked