resize qcow2 but partition was not bigger

informant

Renowned Member
Jan 31, 2012
762
10
83
Hi all, i have resize a qcow2 disc, after resize i have start the vm and start the command of resize, but partition was not bigger. following result comes:

Code:
resize2fs /dev/vda
resize2fs 1.42.5 (29-Jul-2012)
resize2fs: Das Gerät oder die Ressource ist belegt beim Versuch, /dev/vda zu öffnen
Kann keinen gültigen Dateisystem-Superblock finden.

Code:
resize2fs -p /dev/vda1
resize2fs 1.42.5 (29-Jul-2012)
Das Dateisystem ist schon 12563712 Blöcke groß. Nichts zu tun!

Code:
fdisk -l
Disk /dev/vda: 161.1 GB, 161061273600 bytes
255 heads, 63 sectors/track, 19581 cylinders, total 314572800 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000a81ce

   Device Boot      Start         End      Blocks   Id  System
/dev/vda1   *        2048   100511743    50254848   83  Linux
/dev/vda2       100513790   104855551     2170881    5  Extended
/dev/vda5       100513792   104855551     2170880   82  Linux swap / Solaris

any ideas?

regards
 
Hi all, i have resize a qcow2 disc, after resize i have start the vm and start the command of resize, but partition was not bigger. following result comes:
Hi!
Code:
resize2fs /dev/vda
resize2fs 1.42.5 (29-Jul-2012)
resize2fs: Das Gerät oder die Ressource ist belegt beim Versuch, /dev/vda zu öffnen
Kann keinen gültigen Dateisystem-Superblock finden.
resize2fs is for ext-filesystems - not for devices
Code:
resize2fs -p /dev/vda1
resize2fs 1.42.5 (29-Jul-2012)
Das Dateisystem ist schon 12563712 Blöcke groß. Nichts zu tun!
you don't change your partitions (only the disks), so resize2fs can't do anything
Code:
fdisk -l
Disk /dev/vda: 161.1 GB, 161061273600 bytes
255 heads, 63 sectors/track, 19581 cylinders, total 314572800 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000a81ce

   Device Boot      Start         End      Blocks   Id  System
/dev/vda1   *        2048   100511743    50254848   83  Linux
/dev/vda2       100513790   104855551     2170881    5  Extended
/dev/vda5       100513792   104855551     2170880   82  Linux swap / Solaris

any ideas?

regards
to extend the disk, this partitionlayout is suboptimal. You can disable swap (also in fstab), remove vda5+2 and then extend vda1 and create an new swap (mkswap + enable in /etc/fstab).

Better is for this case to use lvm - one boot-partition at the beginning and the remaining space for an volumegroup. Then you are able to extend the VG and use the space for the LVs inside (root, swap...).

Udo
 
Hi Udo,

thanks for answer. can i change volume to lvm or do i must reinstall the vm?

regards
 
Hi Udo,

thanks for answer. can i change volume to lvm or do i must reinstall the vm?

regards

Hi,
you can do that without reinstallation (with an second disk, which must be prepared and after an stop/"remove old disk from the VM", you can use the new "hdd-layout").

But this is for not the best thing for linux-newbies, because you must do some things (boot-loader-installation, fstab...) but not an real act and you can learn a lot.

Udo
 
Hi udo, hdd is after change a lvm and we can make it bigger. thanks for your help.

best regards
 

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!