All of lore.kernel.org
 help / color / mirror / Atom feed
* cfdisk will happily create a partition of size zero
@ 2015-01-31  9:58 Benno Schulenberg
  2015-02-05 19:59 ` Phillip Susi
  0 siblings, 1 reply; 3+ messages in thread
From: Benno Schulenberg @ 2015-01-31  9:58 UTC (permalink / raw)
  To: Util-Linux


Hi,

My disk is configured like this:

                                 Disk: /dev/sda
             Size: 149.1 GiB, 160041885696 bytes, 312581808 sectors
                       Label: dos, identifier: 0x5ef35ef3

    Device      Boot     Start       End   Sectors   Size Id Type
    /dev/sda1             2048  31262489  31260442  14.9G 83 Linux
    /dev/sda2   *     31262490  62508914  31246425  14.9G 83 Linux
    /dev/sda3         62508915  93755339  31246425  14.9G 83 Linux
    /dev/sda4         93755401 312576704 218821304 104.4G  5 Extended           
    |-/dev/sda5       93755403  94767434   1012032 494.2M 82 Linux swap / Solari
    |-/dev/sda6       94767498 252975554 158208057  75.5G 83 Linux
    |-/dev/sda7      252975618 282776129  29800512  14.2G 83 Linux
    `-/dev/sda8      282776193 312576704  29800512  14.2G 83 Linux
    Free space       312578048 312581807      3760   1.9M

When I delete sda5 to sda8 and then sda4, and then recreate sda4,
and then in the free space create a partition of 1 sector, things
look like this:

    /dev/sda4               93755392  312581807  218826416  104.4G   5 Extended
    |-/dev/sda5             93757440   93757440          0      0B  83 Linux    
    `-Free space            93759488  312581807  218822320  104.4G

Strange.  Start and end of sda5 are on the same sector?

Anyway, if I then in the free space try to create a partition of
say 123M, the response on the bottombar is (in red):

Start sector 93759488 out of range.

??

Benno

-- 
http://www.fastmail.com - Access your email from home and the web


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: cfdisk will happily create a partition of size zero
  2015-01-31  9:58 cfdisk will happily create a partition of size zero Benno Schulenberg
@ 2015-02-05 19:59 ` Phillip Susi
  2015-02-06  9:21   ` Karel Zak
  0 siblings, 1 reply; 3+ messages in thread
From: Phillip Susi @ 2015-02-05 19:59 UTC (permalink / raw)
  To: Benno Schulenberg, Util-Linux

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 1/31/2015 4:58 AM, Benno Schulenberg wrote:
> /dev/sda4               93755392  312581807  218826416  104.4G   5
> Extended |-/dev/sda5             93757440   93757440          0
> 0B  83 Linux `-Free space            93759488  312581807  218822320
> 104.4G
> 
> Strange.  Start and end of sda5 are on the same sector?

Looks like there is also an off by one error in the size calculation
since a partition that starts and ends on the same sector does still
occupy that one sector, so its size can not be zero.


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (MingW32)

iQEcBAEBAgAGBQJU08uuAAoJENRVrw2cjl5RBSEIAJ9h1JTD0rVEx+/veyLN+Rz1
ZfjWQI2hQBgxszdFv1ZxQlJRT9xWOgjru2Cn/n/XGBqhXzRc3naUjKvsTlemNKlQ
d+8hgBv/3dxe80+Wh1BbVAfhjVggmMI+ak5ABlAuKwQm+VD8X2dXA7CpC0o3+9Iu
kRyVtp1tTKHZSOW7SV9kFk/yCgurmA4kskxyfG3RpjPD6+STRsAm2f//m1H3nfdP
ele1aDnvPtb6z85XDAeFNXWY++5Bhk7swgNO+Ad/jmEIaej4kxjItRti0jEjIMK+
nOZ6m/lK4+ATeVwku2aJ7GxPd1YPmhu4MgllDLoelDRBMESC4fh/iCWtND8Vr2A=
=Llf2
-----END PGP SIGNATURE-----

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: cfdisk will happily create a partition of size zero
  2015-02-05 19:59 ` Phillip Susi
@ 2015-02-06  9:21   ` Karel Zak
  0 siblings, 0 replies; 3+ messages in thread
From: Karel Zak @ 2015-02-06  9:21 UTC (permalink / raw)
  To: Phillip Susi; +Cc: Benno Schulenberg, Util-Linux

On Thu, Feb 05, 2015 at 02:59:42PM -0500, Phillip Susi wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> On 1/31/2015 4:58 AM, Benno Schulenberg wrote:
> > /dev/sda4               93755392  312581807  218826416  104.4G   5
> > Extended |-/dev/sda5             93757440   93757440          0
> > 0B  83 Linux `-Free space            93759488  312581807  218822320
> > 104.4G
> > 
> > Strange.  Start and end of sda5 are on the same sector?
> 
> Looks like there is also an off by one error in the size calculation
> since a partition that starts and ends on the same sector does still
> occupy that one sector, so its size can not be zero.

It was core of the problem -), all this should be already fixed. Try it.

    Karel

-- 
 Karel Zak  <kzak@redhat.com>
 http://karelzak.blogspot.com

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-02-06  9:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-31  9:58 cfdisk will happily create a partition of size zero Benno Schulenberg
2015-02-05 19:59 ` Phillip Susi
2015-02-06  9:21   ` Karel Zak

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.