Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#78880 - [arch-boxes] root partition not automatically growing

Attached to Project: Arch Linux
Opened by Mathias Heyraud (mathias.heyraud) - Saturday, 24 June 2023, 13:31 GMT
Last edited by Toolybird (Toolybird) - Sunday, 25 June 2023, 21:03 GMT
Task Type Bug Report
Category Arch Projects
Status Closed
Assigned To No-one
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

The official cloud image's root partition doesn't automatically grow on first boot :

% lsblk /dev/vda
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
vda 254:0 0 3G 0 disk
├─vda1 254:1 0 1M 0 part
├─vda2 254:2 0 300M 0 part /efi
└─vda3 254:3 0 1.7G 0 part /

This is because cloud-init's growpart fails with the following message: no tools available to resize disk with 'gpt'
Fixed by installing the gptfdisk package (or with a repart.d drop-in but this bypasses cloud-init)

Additional info:
* Image used: Arch-Linux-x86_64-cloudimg-20230624.160251.qcow2
* /var/log/cloud-init.log :

2023-06-24 13:07:05,522 - modules.py[DEBUG]: Running module growpart (<module 'cloudinit.config.cc_growpart' from '/usr/lib/python3.11/site-packages/cloudinit/config/cc_growpart.py'>) with frequency always
2023-06-24 13:07:05,522 - handlers.py[DEBUG]: start: init-network/config-growpart: running config-growpart with frequency always
2023-06-24 13:07:05,522 - helpers.py[DEBUG]: Running config-growpart using lock (<cloudinit.helpers.DummyLock object at 0x7f77d89cd850>)
2023-06-24 13:07:05,522 - cc_growpart.py[DEBUG]: No 'growpart' entry in cfg. Using default: {'mode': 'auto', 'devices': ['/'], 'ignore_growroot_disabled': False}
2023-06-24 13:07:05,522 - subp.py[DEBUG]: Running command ['growpart', '--help'] with allowed return codes [0] (shell=False, capture=True)
2023-06-24 13:07:05,538 - util.py[DEBUG]: Reading from /proc/334/mountinfo (quiet=False)
2023-06-24 13:07:05,538 - util.py[DEBUG]: Read 2986 bytes from /proc/334/mountinfo
2023-06-24 13:07:05,538 - util.py[DEBUG]: Reading from /sys/class/block/vda3/partition (quiet=False)
2023-06-24 13:07:05,538 - util.py[DEBUG]: Read 2 bytes from /sys/class/block/vda3/partition
2023-06-24 13:07:05,538 - util.py[DEBUG]: Reading from /sys/devices/pci0000:00/0000:00:05.0/virtio2/block/vda/dev (quiet=False)
2023-06-24 13:07:05,538 - util.py[DEBUG]: Read 6 bytes from /sys/devices/pci0000:00/0000:00:05.0/virtio2/block/vda/dev
2023-06-24 13:07:05,539 - util.py[DEBUG]: Reading from /proc/334/mountinfo (quiet=False)
2023-06-24 13:07:05,539 - util.py[DEBUG]: Read 2986 bytes from /proc/334/mountinfo
2023-06-24 13:07:05,539 - util.py[DEBUG]: Reading from /proc/334/mountinfo (quiet=False)
2023-06-24 13:07:05,539 - util.py[DEBUG]: Read 2986 bytes from /proc/334/mountinfo
2023-06-24 13:07:05,539 - subp.py[DEBUG]: Running command ['growpart', '--dry-run', '/dev/vda', '3'] with allowed return codes [0] (shell=False, capture=True)
2023-06-24 13:07:05,563 - util.py[WARNING]: Failed growpart --dry-run for (/dev/vda, 3)
2023-06-24 13:07:05,563 - util.py[DEBUG]: Failed growpart --dry-run for (/dev/vda, 3)
Traceback (most recent call last):
File "/usr/lib/python3.11/site-packages/cloudinit/config/cc_growpart.py", line 196, in resize
subp.subp(
File "/usr/lib/python3.11/site-packages/cloudinit/subp.py", line 335, in subp
raise ProcessExecutionError(
cloudinit.subp.ProcessExecutionError: Unexpected error while running command.
Command: ['growpart', '--dry-run', '/dev/vda', '3']
Exit code: 2
Reason: -
Stdout: FAILED: failed to get a resizer for format 'gpt'
Stderr: no tools available to resize disk with 'gpt'
2023-06-24 13:07:05,564 - util.py[DEBUG]: resize_devices took 0.026 seconds
2023-06-24 13:07:05,564 - cc_growpart.py[DEBUG]: '/' FAILED: failed to resize: disk=/dev/vda, ptnum=3: Unexpected error while running command.
Command: ['growpart', '--dry-run', '/dev/vda', '3']
Exit code: 2
Reason: -
Stdout: FAILED: failed to get a resizer for format 'gpt'
Stderr: no tools available to resize disk with 'gpt'
2023-06-24 13:07:05,564 - handlers.py[DEBUG]: finish: init-network/config-growpart: SUCCESS: config-growpart ran successfully

Steps to reproduce:

Boot the image within a disk larger than the base 2G size.
This task depends upon

Closed by  Toolybird (Toolybird)
Sunday, 25 June 2023, 21:03 GMT
Reason for closing:  Upstream
Additional comments about closing:  See comments
Comment by Toolybird (Toolybird) - Sunday, 25 June 2023, 21:03 GMT
Thanks for the report, but this is in the wrong place. arch-boxes issues reside over here [1]. Please resubmit there.

[1] https://gitlab.archlinux.org/archlinux/arch-boxes

Loading...