Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Crashed disk in new machine

Discussion in 'Data Protection' started by morriscey, Dec 15, 2017.

  1. morriscey

    morriscey Member

    Joined:
    Apr 7, 2017
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    PEI
    cPanel Access Level:
    Root Administrator
    Hello all,

    So last weekend our server gave up the ghost, and became unresponsive, and wouldn't reboot.

    The previous setup wasn't backing up the accounts as far as I know, and now I'm trying to recover them - the bulk of them are wordpress sites. Hindsight being 20/20 - this machine will be properly configured to back up the accounts - but I need them back first.

    Much of the info or tutorials out there seem out of date, and I'm currently following along here.

    Old machine had 2x500GB drives, i3 2100, and 4gb ram. New machine is a 6th gen xeon, 4c/8t, 16gb, 2x 1tb so more resources in every way. Ip addresses have changed.

    First issue I encountered was couldn't mount the disk because it's unknow filetype LVM2, but I was able to get around that and mount the main partition of the 500gb drive (sdb2) on /mnt/olddisk.

    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.

    Thanks in advance for any help - and let me know if more information is needed.
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    43,711
    Likes Received:
    1,794
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. morriscey

    morriscey Member

    Joined:
    Apr 7, 2017
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    PEI
    cPanel Access Level:
    Root Administrator
    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.
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    43,711
    Likes Received:
    1,794
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. morriscey

    morriscey Member

    Joined:
    Apr 7, 2017
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    PEI
    cPanel Access Level:
    Root Administrator
    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.
     
  6. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    43,711
    Likes Received:
    1,794
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  7. morriscey

    morriscey Member

    Joined:
    Apr 7, 2017
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    PEI
    cPanel Access Level:
    Root Administrator
    SMH ... yes lol.
     
  8. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    43,711
    Likes Received:
    1,794
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hi,

    Not a problem! I've updated that section of the guide to better reflect the difference.

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  9. morriscey

    morriscey Member

    Joined:
    Apr 7, 2017
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    PEI
    cPanel Access Level:
    Root Administrator
    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
     
  10. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    43,711
    Likes Received:
    1,794
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    It's normal to see no additional output. You can also start MySQL with a command such as:

    Code:
    /scripts/restartsrv_mysql
    Or, to simply verify it's running, you can use the following command:

    Code:
     /scripts/restartsrv_mysql --status
    You can check to see if the pkgacct command is still running for the list of accounts. EX:

    Code:
    ps aux|grep pkgacct
    It may take some time to complete, depending on the number of accounts and size of the data.

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  11. morriscey

    morriscey Member

    Joined:
    Apr 7, 2017
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    PEI
    cPanel Access Level:
    Root Administrator
    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
     
  12. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    43,711
    Likes Received:
    1,794
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    Can you confirm if valid backup archives of the accounts exist in the /home directory?

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  13. morriscey

    morriscey Member

    Joined:
    Apr 7, 2017
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    PEI
    cPanel Access Level:
    Root Administrator
    still chrooted so switched to home, and all that is listed there is
    cPanelInstall (AccountUsername) beach cpanelsolr virtfs
     
  14. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    43,711
    Likes Received:
    1,794
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    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":

    Code:
    /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:

    Code:
    ls -al  /var/cpanel/users/
    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  15. morriscey

    morriscey Member

    Joined:
    Apr 7, 2017
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    PEI
    cPanel Access Level:
    Root Administrator
    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
     
  16. morriscey

    morriscey Member

    Joined:
    Apr 7, 2017
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    PEI
    cPanel Access Level:
    Root Administrator
    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.
     
  17. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    43,711
    Likes Received:
    1,794
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  18. morriscey

    morriscey Member

    Joined:
    Apr 7, 2017
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    PEI
    cPanel Access Level:
    Root Administrator
    any insight as to what went wrong?
     
  19. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    43,711
    Likes Received:
    1,794
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  20. morriscey

    morriscey Member

    Joined:
    Apr 7, 2017
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    PEI
    cPanel Access Level:
    Root Administrator
    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.
     
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice