I have Ubuntu server running in VirtualBox. I had an 8GB (default vdi size) and I needed more space so I used a 2 steps method: VBoxManager and an iso with GParted. I also installed parted on Ubuntu and I get the following message:
(parted) print Model: ATA VBOX HARDDISK (scsi) Disk /dev/sda: 52.4GB 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 19.1GB 18.8GB extended 5 257MB 19.1GB 18.8GB logical lvm
The 52GB are added from VBoxManager and only added 10 GB to the already existing partition.
Using df -h I get the following:
Filesystem Size Used Avail Use% Mounted on /dev/mapper/kvg-root 6.5G 6.2G 52M 100% / none 4.0K 0 4.0K 0% /sys/fs/cgroup udev 488M 4.0K 488M 1% /dev tmpfs 100M 1.9M 98M 2% /run none 5.0M 0 5.0M 0% /run/lock none 498M 0 498M 0% /run/shm none 100M 0 100M 0% /run/user /dev/sda1 228M 156M 60M 73% /boot
Only 6.5GB which is the old size.
I saw the answer from here Root partition size remains same after partition resize with gparted but I get the following:
resize2fs 1.42.5 (29-Jul-2012) open: Is a directory while opening /
sudo resize2fs /dev/mapper/kvg-root resize2fs 1.42.5 (29-Jul-2012) The filesystem is already 1764352 blocks long. Nothing to do!
What should I do so that df -h will output the right values and use the new extra space?