qcow2 resize without lvm

informant

Renowned Member
Jan 31, 2012
793
10
83
Hi all,

i have a KVM server with a qcow2 partition. i have resize it on webinterface. fdsik -l show me new size, but i can´t resize the system.

how can i resize the partition in system?

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: 0x00029a9a

   Device Boot      Start         End      Blocks   Id  System
/dev/vda1   *        2048   201129983   100563968   83  Linux
/dev/vda2       201132030   209713151     4290561    5  Extended
/dev/vda5       201132032   209713151     4290560   82  Linux swap / Solaris

Code:
pvresize /dev/vda1
-bash: pvresize: Kommando nicht gefunden.

Code:
resize2fs /dev/vda1
resize2fs 1.42.5 (29-Jul-2012)
Das Dateisystem ist schon 25140992 Blöcke groß. Nichts zu tun! / system is on block 25140992. not to change!

best regards
 
Hi,

First please make a backup, resizing a (root) partition can go easily wrong.

to quote
Code:
man resize2fs

The resize2fs program does not manipulate the size of partitions. If you wish to enlarge a filesystem, you must make sure you can expand the size of the underlying partition
first. This can be done using fdisk(8) by deleting the partition and recreating it with a larger size or using lvextend(8), if you're using the logical volume manager lvm(8).
When recreating the partition, make sure you create it with the same starting disk cylinder as before! Otherwise, the resize operation will certainly not work, and you may lose
your entire filesystem. After running fdisk(8), run resize2fs to resize the ext2 filesystem to use all of the space in the newly enlarged partition.

That's why your resize2fs command didn't work.

The easiest way would be gparted, you can mount an gparted live iso in the cd drive of your VM and boot that up, do the resizing stuff and voilà.

The other harder way would be fdisk/gdisk.For that refer to other answers in the web, your favourite search engine helps you here for sure (a quick look gave me this for example).
 
hmm, ok thanks for answer.

and how can i make resize back to old space. also, if i have resize on webinterface +50GB and would have back to -50GB? well in webinterface i can not make back.

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!