Ask Your Question

Why is Gnome Disk Utility (gnome-disks) skipping to a non-aligned start when creating a partition?

asked 2017-01-12 14:25:06 -0500

Axel Sommerfeldt gravatar image

updated 2017-01-24 02:23:19 -0500

Using gnome-disks and the partition type "Encrypted, compatible with Linux systems" I created a LUKS encrypted ext4 partition on an external SSD (connected via USB) which had nothing but an empty msdos-style partition table before.

The confusing result is:

Disk /dev/sdb: 447.1 GiB, 480103981056 bytes, 937703088 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 33553920 bytes
Disklabel type: dos
Disk identifier: 0x8bb095b2

Device     Boot Start       End   Sectors   Size Id Type
/dev/sdb1       65535 937674779 937609245 447.1G 83 Linux

Two questions:

  1. Why have the Gnome Disk Utility created a 32MB gap between start and first sector of the partition?
  2. Why did Gnome Disk Utility use 65535 as first start sector? All other partition tools (Anaconda, GParted, Debian Installer, ...) set partitions on a MB boundary to make sure the partition is "aligned" with internal sectors of the USB or SSD drive. But "65535" is not aligned (while "65536" would be). This looks like a bug to me!?

P.S.: It's a SanDisk Extreme 500 SSD w/ build-in USB3 interface.

Addendum: The output of "hdparm -I /dev/sdb" is:

# hdparm -I /dev/sdb


ATA device, with non-removable media
    Model Number:       SanDisk Ultra II 480GB                  
    Serial Number:      ************        
    Firmware Revision:  X41100RL
    Media Serial Num:   
    Media Manufacturer: 
    Transport:          Serial, ATA8-AST, SATA 1.0a, SATA II Extensions, SATA Rev 2.5, SATA Rev 2.6, SATA Rev 3.0
    Used: unknown (minor revision code 0x0110) 
    Supported: 9 8 7 6 5 
    Likely used: 9
    Logical     max current
    cylinders   16383   0
    heads       16  0
    sectors/track   63  0
    LBA    user addressable sectors:  268435455
    LBA48  user addressable sectors:  937703088
    Logical  Sector size:                   512 bytes
    Physical Sector size:                   512 bytes
    Logical Sector-0 offset:                  0 bytes
    device size with M = 1024*1024:      457862 MBytes
    device size with M = 1000*1000:      480103 MBytes (480 GB)
    cache/buffer size  = unknown
    Form Factor: 2.5 inch
    Nominal Media Rotation Rate: Solid State Device
    LBA, IORDY(can be disabled)
    Queue depth: 32
    Standby timer values: spec'd by Standard, no device specific minimum
    R/W multiple sector transfer: Max = 1   Current = 1
    Advanced power management level: 128
    DMA: mdma0 mdma1 mdma2 udma0 udma1 udma2 udma3 udma4 udma5 *udma6 
         Cycle time: min=120ns recommended=120ns
    PIO: pio0 pio1 pio2 pio3 pio4 
         Cycle time: no flow control=120ns  IORDY flow control=120ns
    Enabled Supported:
       *    SMART feature set
            Security Mode feature set
       *    Power Management feature set
       *    Write cache
       *    Look-ahead
       *    Host Protected Area feature set
       *    WRITE_BUFFER command
       *    READ_BUFFER command
       *    Advanced Power Management feature set
            SET_MAX security extension
       *    48-bit Address feature set
       *    Device Configuration Overlay feature set
       *    Mandatory FLUSH_CACHE
       *    FLUSH_CACHE_EXT
       *    SMART error logging
       *    SMART self-test
       *    General Purpose Logging feature set
       *    64-bit World wide name
       *    WRITE_UNCORRECTABLE_EXT command
       *    {READ,WRITE}_DMA_EXT_GPL commands
       *    Segmented DOWNLOAD_MICROCODE
       *    Gen1 signaling speed (1.5Gb/s)
       *    Gen2 signaling speed (3.0Gb/s)
       *    Gen3 signaling speed (6.0Gb/s)
       *    Native Command Queueing (NCQ)
       *    Host-initiated interface power management
       *    Phy event counters
       *    READ_LOG_DMA_EXT equivalent ...
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2017-01-13 13:34:54 -0500

ssieb gravatar image

I expect that it's related to I/O size (minimum/optimal): 512 bytes / 33553920 bytes. 33553920 / 512 = 65535. For some reason the disk (or the kernel) is indicating that that is the best size to segment on. So it is aligning the partition according to what it is told is the best size.

Have you tried the other tools to see what they do with it?

edit flag offensive delete link more


You are right, fdisk is stubborn here, too: First sector (65535-937703087, default 65535): 2048 leads to the error message "Value out of range". GParted does not care, it just uses 1MB boundaries as default. The (quite strange) disk information is: Heads=255, Sectors/Track=2, Cylinders=1838633. However, IMHO these values should not cause anything in modern times.

Axel Sommerfeldt gravatar imageAxel Sommerfeldt ( 2017-01-15 05:08:06 -0500 )edit

Fedora 20 and CentOS 7 report an "optimal value" of 512, but Fedora 23 to 25 (and current CloneZilla Live) report 33553920 instead. Looks like a bug to me (A return value of -1 used as read value!?) which was introduced about two years ago. I will track this further down within the next weeks...

Axel Sommerfeldt gravatar imageAxel Sommerfeldt ( 2017-01-15 09:47:53 -0500 )edit

I would suggest filing a kernel bug for this. Fedora 20 might be ignoring what the disk returns and just use the default of 512. So it might be that the disk is giving strange values. And yes, 65535 is the same as -1 for a 16-bit value.

Check the output of hdparm -I /dev/sda (you probably have to install it). What are the values in the Configuration section?

ssieb gravatar imagessieb ( 2017-01-23 13:25:26 -0500 )edit

@Samuel Sieb I just added the output of "hdparm -I /dev/sdb" to my question. Regarding the kernel bug: I agree, but first of all I would like to debug this a little bit for myself, by looking into libparted and libblkid. (I hope I'll have time for this next week-end.)

Axel Sommerfeldt gravatar imageAxel Sommerfeldt ( 2017-01-24 02:26:19 -0500 )edit

Question Tools

1 follower


Asked: 2017-01-12 14:25:06 -0500

Seen: 525 times

Last updated: Jan 24 '17