0

I have a CentOS 7 VPS with 40GB of SSD space, I recently upgraded it to 80GB. How do extend the / partition? I don't want to reinstall Centos 7 and the Centos Web Panel as it was suggested to me that I do. I only want to extend the disk size.

Here is the necessary information:

$ df -h
Filesystem      Size  Used Avail Use% Mounted on
devtmpfs        1.8G     0  1.8G   0% /dev
tmpfs           1.9G     0  1.9G   0% /dev/shm
tmpfs           1.9G  187M  1.7G  11% /run
tmpfs           1.9G     0  1.9G   0% /sys/fs/cgroup
/dev/sda1        40G   15G   24G  39% /
tmpfs           370M     0  370M   0% /run/user/0
$ fdisk -l
Disk /dev/sda: 85.9 GB, 85899345920 bytes, 167772160 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x00098c9e

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048    83886046    41941999+  83  Linux
vidarlo
  • 6,654
  • 2
  • 18
  • 31

1 Answers1

1

Using fdisk, delete partition 1, recreate it with the same start and type, but with a new end. Reboot, and run the appropriate resize command for the file system you have. You can find the file system by doing mount | grep sda1.

vidarlo
  • 6,654
  • 2
  • 18
  • 31