Subiquity suggests a resize of already mounted (log-persistence) partition
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
subiquity |
Fix Released
|
Undecided
|
Olivier Gayot | ||
ubuntu-desktop-provision |
Triaged
|
Undecided
|
Unassigned |
Bug Description
I created a USB install media with Ubuntu Desktop 24.04 on it.
The installer suggested an installation alongside other partitions with sdb4 as the target. Later on, after confirming the partitioning changes, the installation failed and curtin logs show:
running e2fsck (or equivalent) with an error such as:
Resize requested for format ext4
Resizing /dev/sdb4 of type ext4 down to 12546211840
Running command ['e2fsck', '-p', '-f', '/dev/sdb4'] with allowed return codes [0] (capture=False)
/dev/sdb4 is mounted.
e2fsck: Cannot continue, aborting.
An error occured handling 'disk-sdb': ProcessExecutio
Command: ['e2fsck', '-p', '-f', '/dev/sdb4']
Exit code: 8
In my scenario sdb is the installation media and sdb4 is the log-persistence partition created by casper. As mentioned in bug 1926137 [1], there is no sensible way to make curtin unmount a filesystem that has /var/log on it. IMO Subiquity should not suggest a resize of a partition that is already in use in the live environment.
I think this is a regression that was introduced when we added the ability to create a recovery partition on the installation media.
I'm attaching the storage probe data that can be used to reproduce the issue. One can see the suggested scenario in dry-run mode by using this probe data and running the following steps:
1. make dryrun
2. navigate to the guided storage screen
3. in a separate shell run:
$ curl --unix-socket .subiquity/socket http://
```
{
"status": "DONE",
"error_report": null,
"configured": null,
"targets": [
{
"disk_id": "disk-sda",
"allowed": [
"DIRECT",
"LVM",
"LVM_LUKS",
"ZFS",
],
"disallowed": [],
"$type": "GuidedStorageT
},
{
"disk_id": "disk-sda",
"
"new_size": 189269016576,
"minimum": 28505538560,
"
"maximum": 221172989952,
"allowed": [
"DIRECT",
"LVM",
"LVM_LUKS",
"ZFS",
],
"disallowed": [],
"$type": "GuidedStorageT
},
{
"disk_id": "disk-sdb",
"
"new_size": 17775460352,
"minimum": 2619342848,
"
"maximum": 50505711616,
"allowed": [
"DIRECT",
"LVM",
"LVM_LUKS",
"ZFS",
],
"disallowed": [],
"$type": "GuidedStorageT
},
{
"allowed": [
"MANUAL"
],
"disallowed": [],
"$type": "GuidedStorageT
}
]
}
```
[1] https:/
summary: |
- Subiquity suggests a resize of already mounted log-persistence partition + Subiquity suggests a resize of already mounted (log-persistence) + partition |
Changed in subiquity: | |
status: | In Progress → Fix Committed |
In some of the private reports that I marked as duplicates, it is a partition mounted at /media/ubuntu/$UUID that is targeted for resize. I wonder if it gets automount-ed or if it gets mounted when the one clicks on the device in the GUI.