[Bug 2096799] Re: Subiquity refuses to resize an existing partition if the FS is unsupported, even if the partition is wiped
Launchpad Bug Tracker
2096799 at bugs.launchpad.net
Thu Apr 10 09:05:47 UTC 2025
** Merge proposal unlinked:
https://code.launchpad.net/~canonical-foundations/subiquity/+git/subiquity/+merge/483384
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to subiquity in Ubuntu.
https://bugs.launchpad.net/bugs/2096799
Title:
Subiquity refuses to resize an existing partition if the FS is
unsupported, even if the partition is wiped
Status in subiquity:
Fix Committed
Status in subiquity package in Ubuntu:
Fix Committed
Status in subiquity source package in Noble:
Fix Released
Status in subiquity source package in Plucky:
Fix Committed
Bug description:
Currently, Subiquity only supports resizing ext4, ext3, ext2 and NTFS.
If Subiquity gets a request to resize an existing partition that has
an unsupported file system (especially when resizing down!), it makes
sense for the installer to error out.
For a new partition (i.e., preserve=False), this limitation does not
apply. If we create the requested filesystem from scratch using
mkfs.{fs}, there is obviously no need for resize support.
=> This is already working in the installer today.
However, the installer also applies the limitation to existing
partitions that we decided to wipe (i.e., reformat). This does not
really make sense. If we are wiping the partition, we will also
recreate the requested FS from scratch, so there is no need to check
if we have resize support for it.
2025-01-27 19:31:21,243 DEBUG root:38 start: subiquity/Filesystem/v2_edit_partition_POST:
2025-01-27 19:31:21,244 DEBUG subiquity.server.controllers.filesystem:1316 ModifyPartitionV2(disk_id='disk-sda', partition=Partition(size=1000000000, number=1, preserve=True, wipe='superblock', annotations=['existing', 'already formatted as swap', 'unused'], mount=None, format='ext4', grub_device=False, boot=False, os=None, offset=1048576, estimated_min_size=1048576, resize=None, path='/dev/sda1', is_in_use=False))
2025-01-27 19:31:21,244 DEBUG subiquity.common.filesystem.manipulator:268 partition_disk_handler: Disk(ptable='gpt', serial='VBOX_HARDDISK_VB6466b5b5-b4f4b6e3', path='/dev/sda', preserve=True, id='disk-sda', type='disk') {'mount': None, 'fstype': 'ext4', 'size': 1000000000, 'wipe': 'superblock'} Partition(device=disk-sda, size=1073741824, flag='swap', number=1, preserve=True, offset=1048576, partition_type='0657fd6d-a4ab-43c4-84e5-0933c84b4f4f', path='/dev/sda1', uuid='52233480-a16f-4155-ad6e-3ef1675f1a4f', id='partition-sda1', type='partition') None
2025-01-27 19:31:21,245 DEBUG root:38 finish: subiquity/Filesystem/v2_edit_partition_POST: SUCCESS: 500 Traceback (most recent call last):
File "/snap/ubuntu-desktop-bootstrap/301...
2025-01-27 19:31:21,245 DEBUG subiquity.server.server:541 request to /storage/v2/edit_partition crashed
Traceback (most recent call last):
File "/snap/ubuntu-desktop-bootstrap/301/bin/subiquity/subiquity/common/api/server.py", line 164, in handler
result = await implementation(**args)
File "/snap/ubuntu-desktop-bootstrap/301/bin/subiquity/subiquity/server/controllers/filesystem.py", line 1336, in v2_edit_partition_POST
self.partition_disk_handler(disk, spec, partition=partition)
File "/snap/ubuntu-desktop-bootstrap/301/bin/subiquity/subiquity/common/filesystem/manipulator.py", line 283, in partition_disk_handler
raise Exception("partition cannot support resize")
Exception: partition cannot support resize
Steps to reproduce
------------------
* Boot the desktop installer in a VM with at least one disk
* Add a partition to that disk (here /dev/sda). You can use fdisk for that.
* On the new partition, create a file-system that does not support resizing e.g.,
* mkfs.fat -F 32 /dev/sda1
* Navigate to the partitioning screen and select manual partitioning
* Edit the FAT32 partition
* Modify the size
* Change the "Used as" field from "Leave formatted as VFAT" to "Ext4"
* Validate the change
* The installer errors out, even though the intention was to wipe the partition
To manage notifications about this bug go to:
https://bugs.launchpad.net/subiquity/+bug/2096799/+subscriptions
More information about the foundations-bugs
mailing list