[Bug 1991083] Re: Resize error when installing alongside

Adrien Nader 1991083 at bugs.launchpad.net
Fri Oct 7 12:31:09 UTC 2022


tl;dr: add a 10% margin to the current minimal size estimate

As far as I can tell, the issue originates in get_ext2_resize_range() in
ubiquity/d-i/source/partman-partitioning/lib/resize.sh . The function
parses the output from `tune2fs -l` in order to find the total number of
blocks and the number of free blocks; it then uses the difference as the
number of used blocks which gets multiplied by the block size to get the
used space.

However, resize2fs disagrees. It also outputs the minimal number of
blocks which is a fair bit higher than what had been computed by
get_ext2_resize_range(). Resize2fs provides an estimate and it might be
wrong but since obviously it is not going to accept anything lower than
what is has determined, there is little point in not using its output
value.

Unfortunately, resize2fs errors out immediately if the filesystem has
not been unmounted cleanly (enough?). I don't know how ubiquity handles
resizing of partition that need fsck first but in any case, I don't want
to add code to run fsck before giving a size estimate.

Moreover, I don't think that it makes sense to use the absolute smallest
size possible. The fact the user resizes the existing partition rather
than overwriting it denotes a will to keep the other system working. If
it gets shrunk so much that there is no free space, it's not going to be
working well anymore. That can't be the user's intent.

I believe it is best to keep the current estimate but so something like
multiplying it by 1.1 or even 1.05. The current estimate is quite off
compared to what resize2fs outputs so it might need a bit of improvement
too. I'll try to gather stats for various filesystems.

I haven't checked yet if that applied to anything else than ext*
filesystems.

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/1991083

Title:
  Resize error when installing alongside

Status in ubiquity package in Ubuntu:
  New

Bug description:
  Using UB 22.10 beta - on a 20GB virtualdisk (virtualbox).

  Installed UB full install successfully

  Next test was the resize test in the QA tracker - moved the slider all
  the way to the left allocating 10.2 GB for the left side OS.
  Immediately on install I saw a resize failed error.

  Repeated this twice so far

  ProblemType: Bug
  DistroRelease: Ubuntu 22.10
  Package: ubiquity 22.10.6 [modified: lib/partman/automatically_partition/question]
  ProcVersionSignature: Ubuntu 5.19.0-15.15-generic 5.19.0
  Uname: Linux 5.19.0-15-generic x86_64
  NonfreeKernelModules: zfs zunicode zavl icp zcommon znvpair
  ApportVersion: 2.23.0-0ubuntu2
  Architecture: amd64
  CasperMD5CheckResult: pass
  CasperVersion: 1.475
  CurrentDesktop: Budgie:GNOME
  Date: Wed Sep 28 09:19:55 2022
  InstallCmdLine: BOOT_IMAGE=/casper/vmlinuz file=/cdrom/preseed/ubuntu-budgie.seed maybe-ubiquity quiet splash ---
  LiveMediaBuild: Ubuntu-Budgie 22.10 "Kinetic Kudu" - Beta amd64 (20220927.1)
  ProcEnviron:
   TERM=xterm-256color
   PATH=(custom, no user)
   XDG_RUNTIME_DIR=<set>
   LANG=en_US.UTF-8
   SHELL=/bin/bash
  SourcePackage: ubiquity
  UpgradeStatus: No upgrade log present (probably fresh install)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ubiquity/+bug/1991083/+subscriptions




More information about the foundations-bugs mailing list