Comment 2 for bug 1860479

Revision history for this message
Nicolas Chauvet (kwizart) wrote :

I've reproduced this bug and I'm suggesting a fix at https://github.com/canonical/cloud-utils/pull/28

Before the fix: (with centos8)
./growpart -N /dev/vda 2
./growpart: ligne 322: 22548578304 octets, : erreur de syntaxe : opérateur arithmétique non valable (le symbole erroné est «  octets, »)

After the fix:

./growpart -N /dev/vda 2
CHANGE: partition=2 start=2099200 old: size=39843840 end=41943040 new: size=41940959 end=44040159
# === old sfdisk -d ===
label: dos
label-id: 0x2ea6aa65
device: /dev/vda
unit: sectors

/dev/vda1 : start= 2048, size= 2097152, type=83, bootable
/dev/vda2 : start= 2099200, size= 39843840, type=8e
# === new sfdisk -d ===
label: dos
label-id: 0x2ea6aa65
device: /dev/vda
unit: sectors

/dev/vda1 : start= 2048, size= 2097152, type=83, bootable
/dev/vda2 : start= 2099200, size= 41940959, type=8e

Using sfdisk --dump will not shape well into the current code as --list expects to have the sectors size and this information isn't provided by the --dump command.

Also I would raise the importance of this issue because It really break the resize capability as soon as a(/any?) non-en locale is set.