canonical / canonical/cloud-init
growpart + resizefs do not work with BSD disklabel (UFS) partitions on FreeBSD 14.4
- Dominant language
- Python
- Stars
- 3.8k
- Forks
- 1.1k
- Avg merge
- 2d 23h
- Merged PRs (30d)
- 18
Description
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 - /
-:- 10G -
```
There is unallocated space (``), 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.
Contributor guide
Assessment
This issue has not been assessed yet.