Portal Home > Knowledgebase > Articles Database > Hard drive failing, need to move a account


Hard drive failing, need to move a account




Posted by jethbrown, 08-04-2007, 07:57 AM
Hello, I had a smart error emailed to me by the server, so I had Savvis do a hard drive test on my server. They told me my main drive has some bad blocks and is failing. I have a new drive in the tower as a slave already. I went into WHM and clicked in list accounts, the change partition button for a smaller account. That worked moving it from /home to /home2. However when I tried it with a larger account, it seemed to time out. I have all the clients moved accept one, who has a site with about 14 gigs of data. I think the command would be: mv /home/admin /home2/admin Is this correct, or is there a better way to do this? Also if I move it in SSH, will WHM list accounts auto update itself, or will I need to do something for that as well?

Posted by ScalaHosting, 08-04-2007, 12:01 PM
The way you used will not move the OS and all installed software. You need to mirror your main drive to the drive which was added. Both drives must be the same size. Use the following command to mirror the drive. dd if=/dev/disk1 of=/dev/disk2 bs=10M You will need to wait for a while until it completes. Then ask Savvis to set the secondary drive as primary and boot from it.

Posted by SparkSupport, 08-04-2007, 12:19 PM
If you move via ssh then you will have to make sure that the changes is also made in the all config files of that domain from /home/admin to /home2/admin

Posted by ScalaHosting, 08-04-2007, 12:22 PM
This is not a solution for him. That move via WHM will not move databases, mailman lists, OS etc etc. He has to clone the drive.

Posted by FIAHOST, 08-04-2007, 03:49 PM
You should stop all services running on this machine (Apache, mySQL... etc) because they continue to stress your dying hard drive. Then, start moving the smaller and/or the most important websites first. Don't use "mv" because it would remove the original files from the hard drive and you want to read from the HD but not write/erase data from it. Use the command "cp -pR". The p will preserve the files ownership (otherwise they will be all owned by root). Move /home directories and /var/lib/mysql first When all your data is copied, you can try something better. Create a link (ls -s) from your hard drive 1 to your hard drive 2 and launch a complete backup. Your link should be created in such a way that your backups are directly created on your new HD. Eventually, remove the dying HD and install a new one with a fresh OS. Important: - Ask your techs to remove the HD containing the backups during the OS reload. I know a host who formatted the hard drive containing important backups - Don't reboot your machine too much. It may or may not restart.



Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read