-1

I am trying to increase the size of the raw image from 2G by an extra 4G using the command

$ qemu-img resize usb.img +4G

and it was successful.

$ ls -l -rw-r--r-- 1 root root 6405750784 Dec 22 13:58 usb.img

But inside the vm, the size still says 2G

$ df -kh .

Filesystem Size Used Avail Use% Mounted on

/dev/hda2 1.8G 1.6G 81M 96% /

I tried increasing the size of the partition inside the vm using

$ resize2fs /dev/hda2

resize2fs 1.42.8 (20-Jun-2013)

The filesystem is already 1994752 blocks long. Nothing to do!

and

$ resize2fs /dev/hda

resize2fs 1.42.8 (20-Jun-2013)

The filesystem is already 1994752 blocks long. Nothing to do!

Can anyone let me know what I am missing here.

Community
  • 1
  • 1
rakesh
  • 135
  • 3
  • 15

1 Answers1

0

Use Gparted (on the host) to add the new disk to the existing partition.

Alex
  • 5,759
  • 1
  • 32
  • 47