[Bug 874239] Re: util-linux fdisk mixes size terminology (G=gigabyte, gibibyte?)

Chris Bainbridge chris.bainbridge at gmail.com
Thu Oct 20 17:38:44 UTC 2011


To clarify:

What I meant is: it would be clearer if "+size{K,M,G}" were replaced with
"+size{K,KB,M,MB,G,GB}" in the prompt. Or perhaps list the supported
suffixes first like:

Supported: 10^N: KB (KiloByte), MB (MegaByte), GB (GigaByte)
           2^N: K  (KibiByte), M  (MebiByte), G  (GibiByte)
Last sector, +sectors or +size{K,KB,M,MB,G,GB} (3890219008-3907029167,
default 3907029167) :

The problem is that the "Unsupported suffix" error which lists the
supported suffixes only appears if the user makes a mistake. But if
the user sees {K,M,G} offered as suffixes in the prompt they will
never try anything else.

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

Title:
  util-linux fdisk mixes size terminology (G=gigabyte,gibibyte?)

Status in The Util-Linux-ng Set of Utilities:
  New
Status in “util-linux” package in Ubuntu:
  New

Bug description:
  fdisk -p reports "2000.4 GB". The value printed is in gigabytes.

  When creating a new partition the user has the option of entering the
  size as "+sizeG". This value is interpreted in gibibytes.

  Oddly, Karel Zak - the maintainer of util-linux - apparently fixed
  this back in 2007. Either the patch did not make it into the upstream
  source tree, or the Ubuntu version has dropped it somewhere. See
  http://osdir.com/ml/linux.utilities.util-linux-
  ng/2007-12/msg00053.html

  
  Example follows.

  Command (m for help): p

  Disk /dev/sdc: 2000.4 GB, 2000398934016 bytes
  224 heads, 56 sectors/track, 311465 cylinders, total 3907029168 sectors
  Units = sectors of 1 * 512 = 512 bytes
  Sector size (logical/physical): 512 bytes / 4096 bytes
  I/O size (minimum/optimal): 4096 bytes / 4096 bytes
  Disk identifier: 0x188f7216

     Device Boot      Start         End      Blocks   Id  System

  Command (m for help): n
  Command action
     e   extended
     p   primary partition (1-4)
  p
  Partition number (1-4, default 1): 
  Using default value 1
  First sector (2048-3907029167, default 2048): +1864G
  Value out of range.
  First sector (2048-3907029167, default 2048): 
  Using default value 2048
  Last sector, +sectors or +size{K,M,G} (2048-3907029167, default 3907029167): +1864G
  Value out of range.

  Command (m for help): n
  Command action
     e   extended
     p   primary partition (1-4)
  p
  Partition number (1-4, default 1): 
  Using default value 1
  First sector (2048-3907029167, default 2048): 
  Using default value 2048
  Last sector, +sectors or +size{K,M,G} (2048-3907029167, default 3907029167): +1863G

  Command (m for help)

To manage notifications about this bug go to:
https://bugs.launchpad.net/util-linux-ng/+bug/874239/+subscriptions




More information about the foundations-bugs mailing list