Can't expand debian9 kvm vm disk

agapitox

Renowned Member
Dec 3, 2008
24
1
68
Zaragoza, Spain
Hello colleagues,

I'm making a vm to use it later as a template, but I have a little problem, it doesn't let me expand the disk. In Proxmox VE everything goes fine, but in the system it doesn't do anything.

It is a debian 9.3, this is what I do:


Code:
root@debian:/home/debian# lsblk
NAME                  MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sda                     8:0    0   55G  0 disk
├─sda1                  8:1    0  243M  0 part /boot
├─sda2                  8:2    0    1K  0 part
└─sda5                  8:5    0 19.8G  0 part
  ├─debian--vg-root   254:0    0 15.8G  0 lvm  /
  └─debian--vg-swap_1 254:1    0    4G  0 lvm  [SWAP]
sr0                    11:0    1  640M  0 rom

root@debian:/home/debian# df -Th
Filesystem                  Type      Size  Used Avail Use% Mounted on
udev                        devtmpfs  2.0G     0  2.0G   0% /dev
tmpfs                       tmpfs     396M  5.4M  391M   2% /run
/dev/mapper/debian--vg-root ext4       16G  1.1G   14G   8% /
tmpfs                       tmpfs     2.0G     0  2.0G   0% /dev/shm
tmpfs                       tmpfs     5.0M     0  5.0M   0% /run/lock
tmpfs                       tmpfs     2.0G     0  2.0G   0% /sys/fs/cgroup
/dev/sda1                   ext2      236M   63M  161M  28% /boot
tmpfs                       tmpfs     396M     0  396M   0% /run/user/0
tmpfs                       tmpfs     396M     0  396M   0% /run/user/1000
root@debian:/home/debian#


growpart /dev/sda 5
pvresize /dev/sda5
lvextend -l +100%FREE /dev/mapper/debian--vg-root
resize2fs /dev/mapper/debian--vg-root

root@debian:/home/debian# df -Th
Filesystem                  Type      Size  Used Avail Use% Mounted on
udev                        devtmpfs  2.0G     0  2.0G   0% /dev
tmpfs                       tmpfs     396M  5.4M  391M   2% /run
/dev/mapper/debian--vg-root ext4       16G  1.1G   14G   8% /
tmpfs                       tmpfs     2.0G     0  2.0G   0% /dev/shm
tmpfs                       tmpfs     5.0M     0  5.0M   0% /run/lock
tmpfs                       tmpfs     2.0G     0  2.0G   0% /sys/fs/cgroup
/dev/sda1                   ext2      236M   63M  161M  28% /boot
tmpfs                       tmpfs     396M     0  396M   0% /run/user/0
tmpfs                       tmpfs     396M     0  396M   0% /run/user/1000
root@debian:/home/debian#

i do everything, but i don't see the results. what am i missing?

Thank you!
 
Last edited:

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!