Increase the size of the Debian VM

Salut @stephdl

A real newbee error… the disk was full :frowning:
I have a 32G disk and thought it was enough.

I tried to resize it without success. It was easy to increase the size of the VM disk but I was not able to find the right way to make Debian to recognize the increase in size.

Any suggestion before I have to start with a new VM?


start a new VM

I kill one thousand VM a day

At least try to snapshot a state before to install the cluster, like this you can go back as you want, clone is also another option

Cher @stephdl

What is serious is not making a mistake, to err is human. What is serious is not correcting it. In which case, the error becomes a serious fault.
KHALED Lemnouer

Luckily I am doing a doc on NS8, so it will be a good way to see if I missed something else.

I will try a backup of all the apps and at the same time verify the backup/restore app.

But, for sure there is a way to have Debian to recognize the increase in size.
In Window$, it is quite easy. I don’t beleive that there is no way with Ext4 in Linux…


1 Like

You “murderer” :crazy_face:

1 Like

Hi all,

Thank you @Andy_Wismer but I already consulted those pages to no avail.

Those guys forgot a very important fact: the swap. It looks as they don’t have one.

So, if they extend the disk, the new extension part will be at the end of all the other partitions i.e. after the swap. Then the first partition is impossible to resize as the swap is between the first partition and the extension part.

I added 50G to the disk.
Boot the VM with gparted-AMD64 and exit to the cosole.
Start fdisk /dev/sda and delete the swap and the extended partition.
I created a 48G primary partiton, then an extended one at the end (3G), another partition (type 83) in the extended one, changed the type from Type 83 to Type 82 (swap).
Delete the 2nd partition to be able to extend the 1st one.
Write and quit fdisk.
Back to the gparted console, reboot as sda1 was never touched.
Re-entered gparted and extended sda1.
Applied and reboot.

The boot complained about the swap:

But after 2-3 minutes, Debian finished the boot and offered the login page.

[root@ns8 ~]# fdisk -l
Disque /dev/sda : 82 GiB, 88046829568 octets, 171966464 secteurs
Modèle de disque : QEMU HARDDISK
Unités : secteur de 1 × 512 = 512 octets
Taille de secteur (logique / physique) : 512 octets / 512 octets
taille d'E/S (minimale / optimale) : 512 octets / 512 octets
Type d'étiquette de disque : dos
Identifiant de disque : 0x95722270

Périphérique Amorçage     Début       Fin  Secteurs Taille Id Type
/dev/sda1    *             2048 165771263 165769216    79G 83 Linux  <<<==================
/dev/sda4             165771264 171966463   6195200     3G  5 Étendue
/dev/sda5             165773312 171966463   6193152     3G 82 partition d'échange Linux / So
[root@ns8 ~]#
[root@ns8 ~]# cat /proc/partitions
major minor  #blocks  name

   8        0   85983232 sda
   8        1   82884608 sda1  <<<==================
   8        4          1 sda4
   8        5    3096576 sda5  <<<==================
  11        0     524288 sr0
[root@ns8 ~]#

I ajusted fstab to the new UUID of sda1 and sda5 (swap). The reboot still complained but took less time to offer the login screen.

I thought I will now be able to raise the victory banner and install WordPress; but I was not able to get the admin-cluster page of NS8.


I managed to “solve” the problem of extending the disk but the extension generated another problem.

And to crown everything, last night, I lost one of my Proxmox RAID 1TB disk.
Computer life has some interesting surprises!

Enough, “loosing time”, I will restart from scratch, it will be faster…


Not quite true, I actually see a swap partition on sda3 here.

A system using only 2 partitions, but also one using three partitions does not really need to use an extended partition just to place the swap there.
As everyone knows, using extended partitions slows down everything by a little bit, why, when it’s unneeded?

But if the system requires it, this must be replicated…

You did the right thing by erasing the swap and extended partition and recreating them.

→ However, one must still question the wisdom of using an extended partition on a system which will never use 4 partitions…

This is probably due to the wrong label of the disk

As this is a very current system (Not Centos7 based!), using a “Dos” label on a disk is highly questionable. GPT might be more appropriate, this can be set in fdsik when initially formatting the disk.

My 2 cents

1 Like

Hi @Andy_Wismer

I kept it the same way as the original installation of Debian-12 had it with the swap in an extended partition.

Also I just now noticed:

You don’t need remounting rebooting etc. Last, you should restore swap partition. Simply use fdisk again, create new partition as swap. After writing ‘w’, device sda2 will be restored. Prepare swap structure on it using mkswap /dev/sda2, remove remarks for swap on /etc/fstab and finally do swapon -a. Look using swapon or top command, swap is activated.

Maybe that’s the part I am missing…


1 Like

Recall doing swap on Proxmox… :slight_smile:

Hi all,

I restored a previuos state of the VM used before the resize.

The no codecs found is already there.

So, it was not due from the resize procedures.



yes, because snd_hda_intel refers to a soundcard device (hda = high definition audio), where probably you are lacking divers. If this is a VM and you don’t need sound (for a nethserver you might not need it), consider removing the sound device for the VM in the Hypervisor. The message should then disappear.