cPanel on AWS E2 Instance : How to Resize Disk

0

I have question about my disk partition,

here is the result from fdisk -l command

Disk /dev/loop0: 4294 MB, 4294967296 bytes
255 heads, 63 sectors/track, 522 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000


Disk /dev/xvda: 536.9 GB, 536870912000 bytes
255 heads, 63 sectors/track, 65270 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00050d75

    Device Boot      Start         End      Blocks   Id  System
/dev/xvda1   *           1       26109   209714176   83  Linux

As you can see, i have 500GB space (/dev/xvda) and our cPanel is using only 200GB (/dev/xvda1).

here is the result from lsblk command
NAME    MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
loop0     7:0    0    4G  0 loop /tmp
xvda    202:0    0  500G  0 disk
└─xvda1 202:1    0  200G  0 part /

Here you can see i have 500GB disk,

My question is , How i can resize xvda1 so it can use it available space OR How i can can create new disk space to use in our cPanel to use more space.

My aim is to increase the disk space in cPanel but dont know how this is possible.

Thank's for your help !

amazon-ec2
cpanel
whm

2 Answers

0

Run the following:

sudo yum install cloud-guest-utils growpart /dev/xvda 1

then reboot

answered on Stack Overflow Feb 20, 2019 by Ahmed Abdelazim • edited Feb 20, 2019 by Ahmed Abdelazim
0

You can use "growpart" to resize the partition and then reszie the file system.

install "cloud-guest-utils" if it is not installed already

apt install cloud-guest-utils

resize partition

growpart /dev/xvda 1

check the result

lsblk

resize filesystem

resize2fs /dev/xvda1

Check after resizing

df -h

Take a snapshot of your volume before trying this.

answered on Stack Overflow Feb 20, 2019 by Jeevagan

User contributions licensed under CC BY-SA 3.0