Resize KVM hard drive on a non LVM partition

asmar

Active Member
Nov 15, 2014
108
0
36
Hi all,

I've got a VM with initially about 100GB disk space which I want to enlarge.
I've changed the disk size through the GUI rebooted but drive is not getting bigger.

Code:
[root@dionysos ~]# df -kh
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda2       115G   65G   44G  60% /
tmpfs           7.8G     0  7.8G   0% /dev/shm
/usr/tmpDSK     4.0G  140M  3.7G   4% /tmp

With fdisk however it reports the proper size that I want to have:
Code:
[root@dionysos ~]# fdisk -l

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/sda: 343.6 GB, 343597383680 bytes
255 heads, 63 sectors/track, 41773 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: 0x000dcb4e

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1         511     4096000   82  Linux swap / Solaris
Partition 1 does not end on cylinder boundary.
/dev/sda2   *         511       15666   121732096   83  Linux

Any idea how I can make this drive to work with the new size?
All the docs I found online are relatively to LVM paritions.

Thanks
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!