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.

How to mount disks after server booted into rescue

Discussion in 'General Discussion' started by busterkat, Mar 21, 2015.

  1. busterkat

    busterkat Active Member

    Joined:
    Aug 20, 2007
    Messages:
    41
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    NY
    My rhel whm/cpanel server crashed and was booted into rescue but I have NO idea really what to do next.

    This is what I'm looking at now:
    NetworkLayer Linux Rescue Version 2.0

    Text Editors: ed, joe, nano, vim
    Command line web browsers: elinks, links, wget

    Raid Utilities:
    3ware: tw_cli (in path)
    Adaptec: arcconf (/usr/StorMan)
    LSI: MegaCli (/opt/MegaRAID)

    Recue Layer is CentOS based and yum functions.
    Additional packages can be added via yum as long
    as enough tmpfs space is available.

    [linuxrescue -- **RESCUE**]# pvdisplay
    [linuxrescue -- **RESCUE**]# vgdisplay
    No volume groups found
    [linuxrescue -- **RESCUE**]# fdisk -v
    fdisk (util-linux 2.13-pre7)
    [linuxrescue -- **RESCUE**]#

    [linuxrescue -- **RESCUE**]# fdisk -l

    Disk /dev/sda: 251.0 GB, 251000193024 bytes
    255 heads, 63 sectors/track, 30515 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes

    Device Boot Start End Blocks Id System
    /dev/sda1 * 1 14 104448 83 Linux
    Partition 1 does not end on cylinder boundary.
    /dev/sda2 14 1319 10485760 83 Linux
    /dev/sda3 1319 2624 10485760 83 Linux
    /dev/sda4 2624 30516 224040384 5 Extended
    /dev/sda5 2625 3930 10485760 83 Linux
    /dev/sda6 3930 4191 2097152 82 Linux swap / Solaris
    /dev/sda7 4191 4322 1048576 83 Linux
    /dev/sda8 4322 30516 210404352 83 Linux

    Managed to get devs on mnt/sda1,2,3 etc, but most directories owner/group got reset to 500/500 or similar. I don't know how to proceed at this point. I need serious help
     
  2. 24x7ss

    24x7ss Well-Known Member

    Joined:
    Sep 30, 2014
    Messages:
    271
    Likes Received:
    16
    Trophy Points:
    18
    Location:
    India
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello,

    You will need to chroot the / partition to see the correct ownerships. Once you mount the / partition, you can do following. I am assuming sda1 is your root partition

    mount /dev/sda1 /mnt
    chroot /mnt
     
  3. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    653
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello,

    I don't think you will receive much user-feedback on this topic, as most of the discussions here revolve around the cPanel/WHM software itself. I highly recommend consulting with a qualified system administrator that can assist you with this issue, as you might make a mistake that results in data loss if you are inexperienced with system recovery. Feel free to update this thread with the outcome.

    Thank you.
     
  4. busterkat

    busterkat Active Member

    Joined:
    Aug 20, 2007
    Messages:
    41
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    NY
    OK. I got the server reloaded. I got WHM reloaded. I have a tar.gz cpbackup file. I have no access via WHM or ssh but I do have access via sftp. Where do I put the backup and then what is the next step please?
     
  5. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    653
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Is there anything in particular preventing you from accessing WHM or SSH? You will need access to at least SSH if you want to restore an account.

    Thank you.
     
  6. busterkat

    busterkat Active Member

    Joined:
    Aug 20, 2007
    Messages:
    41
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    NY
    Michael thank you for replying.
    I now have SSH and WHM and ftp finally. Got the disks mounted. I don't know why access was prevented, I believe that it was an id_rsa issue after the os rescue reload. A lot of things were different after the rescue including ips and passwords.

    I have the server up now in rescue mode and ftp'd the restore files up to /root. For some reason I could not write to /home, I would get 'could not create folder named "whatever"'
    I used full restore by username.
    Some sites are fine but others will not come up although they look fine in WHM/CP.
    The ips were mixed up. I reset those to their original ips.
    Two sites return the default cp page. Another returns internal server error.
    A wordpress site is not working. The db looks OK.
    The restore process did not create the usual subfolders in /home (is it supposed to do?). Everything is in root:
    https://www.dropbox.com/s/5mzizvok0kmjv3c/shot1.png?dl=0
    (binval/ is an account)

    From the original backup I also have folders dirs (containing etc/usr/var folders) and files (containing various cnfs -not sure if I should put them where they would have been pre-crash).

    I have a new server ready but I'd like to get everything cleaned up and running OK on the old server before moving. It will not have the same ips. I am not clear as to which process to use at that point.

    Any advice is much appreciated.
     
  7. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    653
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello,

    You need to ensure the server is operating as expected before restoring accounts. If the /home partition was not able to have new files written to it, then the restore likely failed. I suggest contacting a qualified system administrator to help you ensure the server is up and running in normal mode, rather then attempting to restore the accounts in rescue mode.

    Thank you.
     
Loading...

Share This Page