Public bug reported:

Title: GNOME Disks fails to create a maximum-size partition on an empty
USB SSD with "No space left on device"

Summary:
GNOME Disks repeatedly fails to create a partition using the maximum size 
offered by its interface. This happens immediately after initializing a new 
partition table and confirming that the entire external SSD is unallocated.

Command-line partitioning and ext4 formatting succeed on the same
device, with the configuration differences noted below.

Environment:
Ubuntu 24.04.5 LTS
gnome-disk-utility: 46.0-1ubuntu3
udisks2: 2.10.1-6ubuntu1.5
mke2fs: 1.47.0
External USB SSD, approximately 256 GB

Steps to reproduce on the affected device:
WARNING: These steps erase the selected disk. Use a disposable test disk.

1. Open GNOME Disks and select the external SSD.
2. Use Format Disk to initialize an MBR partition table.
3. Confirm that the entire disk is displayed as unallocated.
4. Click the plus button to create a partition.
5. Leave the size at the offered maximum, approximately 256 GB, with 0 GB of 
free space following.
6. Leave Extended Partition unchecked.
7. Select ext4 and enter "test" as the volume name.
8. Leave Erase and Password protect volume (LUKS) disabled.
9. Click Create.

Expected result:
GNOME Disks creates a partition within the available usable space and formats 
it as ext4.

Actual result:
Partition creation fails with the following error. The device path has been 
generalized:

Error creating partition on /dev/sdX: Failed to add new partition to the
table: No space left on device (udisks-error-quark, 0)

Successful command-line comparison:
After clearing existing partition-table signatures on the unused device, these 
operations succeeded:

parted --script --align minimal /dev/sdX mklabel gpt mkpart test ext4 1MiB 100%
mkfs.ext4 -F -m 0 -L test /dev/sdX1

A direct filesystem check returned:

LABEL="test" TYPE="ext4"

Repeating the GUI procedure after the successful command-line operation
reproduced the same error.

Comparison limitations:
The successful command-line test used GPT and minimal alignment. The failing 
GUI test used MBR. These were not identical partitioning configurations, so the 
test does not establish the root cause or the responsible component.

Potentially relevant alignment observation:
An earlier parted operation without "--align minimal" displayed:

Warning: The resulting partition is not properly aligned for best
performance: 2048s % 65535s != 0s

I do not know whether this warning is related to the GUI failure.

Additional context:
The SSD previously contained LUKS/LVM storage. Leftover device-mapper mappings 
were removed and verified absent, but the partition-creation error continued 
afterward.

The failure reproduces with encryption disabled. It occurs during
partition creation, before filesystem formatting.

** Affects: udisks2 (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: udisks2

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

Title:
  GNOME Disks fails to create a maximum-size partition on an empty USB
  SSD with "No space left on device"

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


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to