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!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

SOLVED cPanel on Google Cloud VM - Resize Disk Not working

Discussion in 'General Discussion' started by supportmwm, Aug 20, 2017.

  1. supportmwm

    supportmwm Member

    Joined:
    May 21, 2014
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Hi

    Google Cloud has just announced their availability of AU region and the first thing I tried to do is try a quick installation of cPanel and other normal operations on their official CentOS 7 image.

    Other things worked fine however I noticed that Disk resize is not working properly specifically after cPanel installation.

    When I tried disk resize without installing cPanel on centos7 server, all I have to do is stop/start the server and the server immediately recognized resized disk.

    However after cPanel installation, server is not able to recognize resized disk even after reboot. According to Google, the OS should recognize it automatically (which it does in previous test) so I believe it's something cPanel doing. Can someone provide help here?

    Google Cloud link for auto resize - Creating Customized Root Disks  |  Compute Engine Documentation  |  Google Cloud Platform
     
  2. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,512
    Likes Received:
    32
    Trophy Points:
    308
    cPanel Access Level:
    Root Administrator
    Hi,

    First, I'd like to note that we haven't tested cPanel & WHM in the environment or situation you are describing. Could you answer the following questions, please? That will guide us along the proper path.

    1. Did you grow or shrink the disk?
    2. Is everything in a single partition?
    3. What is your file system?
    4. What was the size of the partition before, and after the resize attempt?

    Thank you!
     
  3. supportmwm

    supportmwm Member

    Joined:
    May 21, 2014
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Hi Kenneth

    1. I grew the disk - from 20GB to 30GB.
    2. Yes
    3. df -Th shows below output so I believe it is "xfs" file system -

    Filesystem Type Size Used Avail Use% Mounted on/
    dev/sda1 xfs 20G 7.3G 13G 37% /

    4. The partition size on the instance hasn't changed - it has remained at 20GB and server is accessible. However I have upgraded the disk size to 30GB which it doesn't show.

    One additional information. Command "sudo lsblk" shows below output which suggests it has recognized 30GB on disk but not on partition -
    NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
    sda 8:0 0 30G 0 disk
    └─sda1 8:1 0 20G 0 part /
    loop0 7:0 0 651M 0 loop /var/tmp
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,165
    Likes Received:
    1,372
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    The following document suggests automatic resizing is supported with CentOS 6 and CentOS 7:

    Creating Customized Root Disks | Compute Engine Documentation | Google Cloud Platform

    However, it does show "v20160418 or newer". Did you setup this server using v20160418 or newer of the CentOS image offered by Google? If not, you can find discussion of resizing the partition on the following URLs:

    df -h only shows 10GB, but I've assigned a 500GB disk to the GCE instance
    How can size of the root disk in Google Compute Engine be increased?

    Keep in mind this is unsupported, so you should definitely make a backup of the server (or take a snapshot) before attempting any of the instructions referenced in those posts.

    Thank you.
     
    #4 cPanelMichael, Aug 22, 2017
    Last edited: Aug 22, 2017
  5. supportmwm

    supportmwm Member

    Joined:
    May 21, 2014
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    The last comment in above 1st link worked for me -

    First re-create your root partition, type this command:
    (echo d; echo n; echo p; echo 1; echo ; echo; echo w) | sudo fdisk /dev/sda

    Then restart your server. Once restarted, grow your partition
    xfs_growfs /dev/sda1

    Verify with:
    df -h

    snapchat?? :)
     
  6. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,165
    Likes Received:
    1,372
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    I'm happy to see those instructions helped. I've modified that post to reflect "snapshot" :)

    Thanks!
     
Loading...

Share This Page