I have Ubuntu 15.04 as a guest OS in VirtualBox, and have resized the VDI drive and the partition inside it using GParted LiveCD. GParted correctly see the new size (14.5 GB), but inside Ubuntu it's still the old size:
$ df -k
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/mapper/zion--vg-root 7331536 7115864 0 100% /
none 4 0 4 0% /sys/fs/cgroup
udev 1013420 4 1013416 1% /dev
tmpfs 204912 448 204464 1% /run
none 5120 0 5120 0% /run/lock
none 1024556 0 1024556 0% /run/shm
none 102400 0 102400 0% /run/user
/dev/sda1 240972 136514 92017 60% /boot
overflow 1024 140 884 14% /tmp
EDIT
Output of parted -l
:
Model: ATA VBOX HARDDISK (scsi)
Disk /dev/sda: 15.7GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number Start End Size Type File system Flags
1 1049kB 256MB 255MB primary ext2 boot
2 257MB 15.7GB 15.5GB extended
5 257MB 15.7GB 15.5GB logical lvm
Model: Linux device-mapper (linear) (dm)
Disk /dev/mapper/zion--vg-swap_1: 533MB
Sector size (logical/physical): 512B/512B
Partition Table: loop
Number Start End Size File system Flags
1 0.00B 533MB 533MB linux-swap(v1)
Model: Linux device-mapper (linear) (dm)
Disk /dev/mapper/zion--vg-root: 7764MB
Sector size (logical/physical): 512B/512B
Partition Table: loop
Number Start End Size File system Flags
1 0.00B 7764MB 7764MB ext4
Warning: Unable to open /dev/sr0 read-write (Read-only file system). /dev/sr0
has been opened read-only.
Error: Can't have a partition outside the disk!
sudo parted -l
from the Ubuntu system installed in the VirtualBox might be helpful. Please edit your question to add it.VBoxManage modifyhd
, no shrinking after that