Bug 2043319 - blivet.errors.DeviceError: Failed to add the device:device is too small for new format
Summary: blivet.errors.DeviceError: Failed to add the device:device is too small for n...
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: blivet-gui
Version: 35
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Vojtech Trefny
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:c36bf3a83c2d7eccf1e1e02e758...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-01-21 01:33 UTC by zpangwin
Modified: 2022-12-13 16:24 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-12-13 16:24:09 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
File: anaconda-tb (2.20 MB, text/plain)
2022-01-21 01:33 UTC, zpangwin
no flags Details
File: anaconda.log (13.73 KB, text/plain)
2022-01-21 01:33 UTC, zpangwin
no flags Details
File: dbus.log (3.56 KB, text/plain)
2022-01-21 01:33 UTC, zpangwin
no flags Details
File: environ (651 bytes, text/plain)
2022-01-21 01:33 UTC, zpangwin
no flags Details
File: journalctl (1.45 MB, text/plain)
2022-01-21 01:33 UTC, zpangwin
no flags Details
File: lsblk_output (4.57 KB, text/plain)
2022-01-21 01:33 UTC, zpangwin
no flags Details
File: lvm.log (106.13 KB, text/plain)
2022-01-21 01:33 UTC, zpangwin
no flags Details
File: nmcli_dev_list (1.95 KB, text/plain)
2022-01-21 01:33 UTC, zpangwin
no flags Details
File: os_info (706 bytes, text/plain)
2022-01-21 01:33 UTC, zpangwin
no flags Details
File: program.log (26.78 KB, text/plain)
2022-01-21 01:33 UTC, zpangwin
no flags Details
File: storage.log (530.17 KB, text/plain)
2022-01-21 01:33 UTC, zpangwin
no flags Details
File: blivet.png (140.30 KB, application/octet-stream)
2022-01-21 01:33 UTC, zpangwin
no flags Details
File: gparted.png (69.37 KB, application/octet-stream)
2022-01-21 01:33 UTC, zpangwin
no flags Details

Description zpangwin 2022-01-21 01:33:31 UTC
Description of problem:
Setup:

* I had an existing multiboot setup with Windows and several Linux partitions.
* According to GParted, the drive was a Samsung 860 SSD with an msdos partition style.
* The Windows OS partition (sda2) and its "System Reserved" partition (sda1) were both primary partitions.
* The 3 Linux partitions (sda4/5/6) were all logical partitions created under an "extended" partition.
* PC was using legacy BIOS mode rather than UEFI due to the old Windows install being done under BIOS.
* I deleted one of said partitions (sda4) using GParted. The free space from the deleting this partition was 120 GiB.
* The deletion was done prior to / outside of the live session where I was installing Fedora.

Steps to reproduce:

1. Produce a similar drive layout to that described under Setup section, e.g. multi-boot
2. One of my primary goals was to have a LUKS2 encrypted root (/) partition after install in order to protect my /etc/shadow.
3. After booting to a live environment of Fedora 35 xfce spin, I launched the installer from the desktop shortcut
4. In Anaconda, I selected the blivet option so that I could get visual confirmation of my selections and SDA.
5. In blivet, I selected the free space (formerly sda4) of 120 GiB and choose New
6. I left Device type as Partition and choose the filesystem as Btrfs
7. Entered "/" (without the quotes) as the Mountpoint
8. Checked "Encrypt" checkbox and left the default selection of "luks2"
9. Entered my passhrase twice and saw the checkmark indicating both matched.
10. Clicked OK and received an error "device is too small for new format"

I believe this error message to be, well, "in error" as 120 GiB is plenty for a Linux partition (as evidenced most receively by a Linux Mint partition that formerly occupied the same space). 
Not to mention the fact that my current Fedora 34 partition (which I did not delete / upgrade yet) is sitting at 28 GiB used space after about of year of me installing all kinds of things.

Expected behavior:

* Blivet should have created a new LUKS2 encrypted Btrfs partition with the entered passphrase and mounted at "/" in the free space of 120 GB available.
* It should re-use the existing boot entries as done when not encrypting the drive, or failing this, provide an error message specifically noting some limitation of using BIOS mode/msdos MBR/etc when used with LUKS rather than an unhelpful message that the device is too small.
* If it does not support LUKS2 properly, then this option should be hidden from Anaconda installer.

Version-Release number of selected component:
anaconda-core-35.22.2-3.fc35.x86_64

The following was filed automatically by anaconda:
anaconda 35.22.2 exception report
Traceback (most recent call first):
  File "/usr/lib/python3.10/site-packages/blivetgui/osinstall.py", line 234, in _reraise_exception
    raise type(exception)(message + str(exception) + "\n" + traceback)
  File "/usr/lib/python3.10/site-packages/blivetgui/blivetgui.py", line 509, in add_device
    self._reraise_exception(result.exception, result.traceback, message,
blivet.errors.DeviceError: Failed to add the device:device is too small for new format
Traceback (most recent call last):
  File "/usr/lib/python3.10/site-packages/blivetgui/blivet_utils.py", line 1314, in add_device
    actions = add_function(self, user_input)
  File "/usr/lib/python3.10/site-packages/blivetgui/blivet_utils.py", line 1010, in _create_partition
    actions.extend(self._create_format(user_input, luks_dev))
  File "/usr/lib/python3.10/site-packages/blivetgui/blivet_utils.py", line 909, in _create_format
    actions = self._create_btrfs_format(user_input, device)
  File "/usr/lib/python3.10/site-packages/blivetgui/blivet_utils.py", line 932, in _create_btrfs_format
    device.format = btrfs_fmt
  File "/usr/lib/python3.10/site-packages/blivet/threads.py", line 53, in run_with_lock
    return m(*args, **kwargs)
  File "/usr/lib/python3.10/site-packages/blivet/devices/storage.py", line 780, in <lambda>
    lambda d, f: d._set_format(f),
  File "/usr/lib/python3.10/site-packages/blivet/threads.py", line 53, in run_with_lock
    return m(*args, **kwargs)
  File "/usr/lib/python3.10/site-packages/blivet/devices/storage.py", line 738, in _set_format
    raise errors.DeviceError("device is too small for new format")
blivet.errors.DeviceError: device is too small for new format


Additional info:
addons:         com_redhat_kdump
cmdline:        /usr/bin/python3  /sbin/anaconda --liveinst --graphical
cmdline_file:   BOOT_IMAGE=vmlinuz initrd=initrd.img root=live:CDLABEL=Fedora-Xfce-Live-35-1-2  rd.live.image rd.live.check quiet
dnf.librepo.log: 
executable:     /sbin/anaconda
hashmarkername: anaconda
kernel:         5.14.10-300.fc35.x86_64
other involved packages: blivet-gui-runtime-2.3.0-3.fc35.noarch
product:        Fedora
release:        Fedora release 35 (Thirty Five)
type:           anaconda
version:        35

Comment 1 zpangwin 2022-01-21 01:33:38 UTC
Created attachment 1852372 [details]
File: anaconda-tb

Comment 2 zpangwin 2022-01-21 01:33:39 UTC
Created attachment 1852373 [details]
File: anaconda.log

Comment 3 zpangwin 2022-01-21 01:33:40 UTC
Created attachment 1852374 [details]
File: dbus.log

Comment 4 zpangwin 2022-01-21 01:33:41 UTC
Created attachment 1852375 [details]
File: environ

Comment 5 zpangwin 2022-01-21 01:33:46 UTC
Created attachment 1852376 [details]
File: journalctl

Comment 6 zpangwin 2022-01-21 01:33:47 UTC
Created attachment 1852377 [details]
File: lsblk_output

Comment 7 zpangwin 2022-01-21 01:33:48 UTC
Created attachment 1852378 [details]
File: lvm.log

Comment 8 zpangwin 2022-01-21 01:33:49 UTC
Created attachment 1852379 [details]
File: nmcli_dev_list

Comment 9 zpangwin 2022-01-21 01:33:50 UTC
Created attachment 1852380 [details]
File: os_info

Comment 10 zpangwin 2022-01-21 01:33:52 UTC
Created attachment 1852381 [details]
File: program.log

Comment 11 zpangwin 2022-01-21 01:33:53 UTC
Created attachment 1852382 [details]
File: storage.log

Comment 12 zpangwin 2022-01-21 01:33:55 UTC
Created attachment 1852383 [details]
File: blivet.png

Comment 13 zpangwin 2022-01-21 01:33:56 UTC
Created attachment 1852384 [details]
File: gparted.png

Comment 14 Ben Cotton 2022-11-29 17:42:40 UTC
This message is a reminder that Fedora Linux 35 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora Linux 35 on 2022-12-13.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
'version' of '35'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, change the 'version' 
to a later Fedora Linux version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora Linux 35 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora Linux, you are encouraged to change the 'version' to a later version
prior to this bug being closed.

Comment 15 Ben Cotton 2022-12-13 16:24:09 UTC
Fedora Linux 35 entered end-of-life (EOL) status on 2022-12-13.

Fedora Linux 35 is no longer maintained, which means that it
will not receive any further security or bug fix updates. As a result we
are closing this bug.

If you can reproduce this bug against a currently maintained version of Fedora Linux
please feel free to reopen this bug against that version. Note that the version
field may be hidden. Click the "Show advanced fields" button if you do not see
the version field.

If you are unable to reopen this bug, please file a new report against an
active release.

Thank you for reporting this bug and we are sorry it could not be fixed.


Note You need to log in before you can comment on or make changes to this bug.