Skip to main content

Crashed disk in new machine

Comments

20 comments

  • cPanelMichael
    Hello, I recommend reaching out to your data center or a qualified system administrator for help with mounting the additional drive, as any mistakes during the process could result in accidental data loss. We provide a list of companies offering system administration services at: System Administration Services | cPanel Forums Thank you.
    0
  • morriscey
    I did reach out to my data center - they told me it would be $1200 USD to have someone do a restore from the old disk - which is simply not in the budget. That's why I'm asking for some help.
    0
  • cPanelMichael
    Hello, You may want to reach out to some of the system administration service providers in the URL referenced in my last response for additional assistance if you don't receive additional user-feedback to this thread. Or, you could try another resource such as StackOverflow to see if you can find additional feedback there. We're happy to help answer any cPanel-related questions once you have the drive mounted. Thank you.
    0
  • morriscey
    The drive *is* mounted at /mnt/olddisk - at least I think so. I can see it on "disk usage" in WHM. I was able to bind /proc, /dev and /sys (at least when entering those commands adjusted for my locations i didn't get any errors). SO am I missing a step to properly mount those drives? Sorry for the basic level questions - I usually draw pictures.
    0
  • cPanelMichael
    Get to the point in step 2 - where to verify everything is mounted correctly. and I get permission denied errors when I try > /dev/olddisk/lv_root /mnt/olddisk none rw,bind 0 0 not sure how to properly proceed.

    Hi, I apologize, I think I may have misunderstood your original question. For instance, when following the steps on the Guide: Create account backups from a crashed hard drive thread, are you mistaking the output from the "grep chroot /etc/mtab" command as additional commands you need to run? For instance, in that thread, it shows: -bash-4.1# grep chroot /etc/mtab /dev/sdb1 /mnt/chroot none rw,bind 0 0 /mnt/chroot/proc /proc none rw,bind 0 0 /mnt/chroot/dev /dev none rw,bind 0 0 /mnt/chroot/sys /sys none rw,bind 0 0 I used bold text for the only part that's actually a command you need to run. The rest is simply an example of what that command will output. Thank you.
    0
  • morriscey
    SMH ... yes lol.
    0
  • cPanelMichael
    Hi, Not a problem! I've updated that section of the guide to better reflect the difference. Thank you.
    0
  • morriscey
    ok made it a few steps further lol I got to step 5 - entered the start mysql command and got >Redirecting to /bin/systemctl start mysql.service no errors afterwards, but no "mysql start success" message either. Went to the users directory in step 6. ran the string there, didn't see any errors, but seemed to bring me out of 'screen' Ran the mysql stop command - no errors or success messages. then tried to unmount /proc, /dev and /sys and get a target is busy message - so clearly I am missing something. Thanks again
    0
  • cPanelMichael
    I got to step 5 - entered the start mysql command and got >Redirecting to /bin/systemctl start mysql.service no errors afterwards, but no "mysql start success" message either.

    It's normal to see no additional output. You can also start MySQL with a command such as:
    /scripts/restartsrv_mysql
    Or, to simply verify it's running, you can use the following command:
    /scripts/restartsrv_mysql --status
    Went to the users directory in step 6. ran the string there, didn't see any errors, but seemed to bring me out of 'screen'

    You can check to see if the pkgacct command is still running for the list of accounts. EX:
    ps aux|grep pkgacct
    It may take some time to complete, depending on the number of accounts and size of the data. Thank you.
    0
  • morriscey
    ok was able to confirm mysql has stopped. When I run ps aux|grep pkgacct i get the following output root 22033 0.0 0.0 112660 976 pts/1 S+ 13:27 0:00 grep --color=auto pkgacct and proc, dev and sys still say target is busy while trying to unmount. Thanks for the help
    0
  • cPanelMichael
    Hello, Can you confirm if valid backup archives of the accounts exist in the /home directory? Thank you.
    0
  • morriscey
    still chrooted so switched to home, and all that is listed there is cPanelInstall (AccountUsername) beach cpanelsolr virtfs
    0
  • cPanelMichael
    Hello, What about in the "/mnt/chroot/home/" directory? If no files exist there, you may want to start with "Step 3" again and when you get to "Step 5", verify that MySQL is running before proceeding to "Step 6":
    /scripts/restartsrv_mysql --status
    If it's not running, try restarting it using the "/scripts/restartsrv_mysql" command and then check again to see if it's started. Additionally, before you start "Step 6", verify the usernames exist in the /var/cpanel/users/ directory with a command such as:
    ls -al /var/cpanel/users/
    Thank you.
    0
  • morriscey
    Wasn't able to see files in /mnt/olddisk/home/ either so I went back to step 3, ran "/scripts/restartsrv_mysql" Got to 2017-12-18 13:33:23 22248 [Note] /usr/sbin/mysqld: ready for connections. 171218 13:33:23 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql Then it saved to an error log and says "mysql failed, and to contact system admin if it doesnt automagically recover. " "ls -al /var/cpanel/users/" did say 16 total users
    0
  • morriscey
    I tried to reboot the server through whm with "graceful reboot" and it has become unresponsive. When I try to connect to whm I get ERR_CONNECTION_REFUSED, When I try to connect with putty I get network error: connection refused. I tried to reboot through the peer1 backend and get no joy there either - just says "rebooting" and has been about twenty minutes.
    0
  • cPanelMichael
    Hello, I recommend reaching out to your data center or a system administrator for assistance if you are unable to boot your system, as that's outside the scope of anything you can address with the cPanel & WHM software. Thank you.
    0
  • morriscey
    any insight as to what went wrong?
    0
  • cPanelMichael
    any insight as to what went wrong?

    There's no way to know for sure. When your server is able to boot up again, then you should be able to view /var/log/messages or /var/log/dmesg to get a better idea of what happened, but generally this is something you'd need to seek the help from a system administrator for. Thank you.
    0
  • morriscey
    Server eventually came back online. mount the disk, bind the directories, I tried "view /var/log/messages" there were errors in there from dec 10 and 11, but nothing from today. run "/scripts/restartsrv_mysql --status" and it shows that it is running I tried /var/log/dmesg and get permission denied. chrooted /var/log/dmesg and get permission denied. get the environmental info from the old server. seems ok. then I try "service mysql start" again and I get ..ERROR! Run "/scripts/restartsrv_mysql --status" and it says service is down. I try "/scripts/restartsrv_mysql" I get an error with the subprocess reporting error number 1 when it ended.
    0
  • cPanelMichael
    I try "/scripts/restartsrv_mysql" I get an error with the subprocess reporting error number 1 when it ended.

    Hello, Feel free to open a support ticket using the link in my signature and we can take a closer look to see why MySQL is failing. Thank you.
    0

Please sign in to leave a comment.