Skip to content

growpart + resizefs do not work with BSD disklabel (UFS) partitions on FreeBSD 14.4 #6845

@vazhevatov

Description

@vazhevatov

Hello,
I am encountering an issue with cloud-init modules growpart and resizefs on a FreeBSD system using BSD disklabel (MBR + BSD slices).

Environment:

  • OS: FreeBSD 14.4
  • Filesystem: UFS
  • Disk layout: BSD label
  • Root filesystem: /dev/da0a

Important note:
The system itself works correctly with MBR + UFS and GPT + UFS. The issue is only related to cloud-init modules (growpart and resizefs) not handling this layout.

Current partitioning example:

lsblk
DEVICE MAJ:MIN SIZE TYPE LABEL MOUNT
da0 0:99 20G BSD - -
da0a 0:100 20G freebsd-ufs - /
<FREE> -:- 10G -

There is unallocated space (<FREE>), but cloud-init does not expand the root partition/filesystem.

Relevant log output:

cc_growpart.py[DEBUG]: growpart found fs=ufs
cc_growpart.py[DEBUG]: '/' SKIPPED: device_part_info(/dev/da0a) failed: Invalid value for devpath: '/dev/da0a'

It appears that /dev/da0a is not recognized as a valid device path by device_part_info.

I also attempted to explicitly configure growpart in multiple ways:

Variant 1:

growpart:
devices: [/, /dev/da0a]
ignore_growroot_disabled: true
mode: gpart

Variant 2:

growpart:
devices: [/]
ignore_growroot_disabled: true
mode: gpart

Variant 3:

growpart:
devices: [/dev/da0a]
ignore_growroot_disabled: true
mode: gpart

None of these configurations worked.

Question:
Is support for BSD disklabel (BSD slices, e.g. /dev/da0a) planned for growpart and resizefs modules?
Or is this layout currently unsupported?
Or is it possible that I have misconfigured something on my side?

Thank you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions