Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

[SOLVED] Disk size / partition size error

If none of the specific sub-forums seem right for your thread, ask here.
Post Reply
Message
Author
questlinq
Posts: 69
Joined: 2017-09-19 08:51

[SOLVED] Disk size / partition size error

#1 Post by questlinq »

Hello,
I have a 312.0 GB disk while Debian installer shows it's 335.0 GB.
After partitioning with Debian installer, I again get size errors after running

Code: Select all

fdisk -l
and

Code: Select all

lsblk
.
I make:
/boot 1.0 GB
/ 30.0 GB
/home 100.0 GB
/var 200.0 GB

After installtion fdisk-l shows:

Code: Select all

Disk /dev/vda: 312 GiB, 335007449088 bytes, 654311424 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x88fe9297

Device     Boot     Start       End   Sectors   Size Id Type
/dev/vda1  *         2048   1953791   1951744   953M 83 Linux
/dev/vda2         1955838 646483967 644528130 307.3G  5 Extended
/dev/vda5         1955840  60547071  58591232    28G 83 Linux
/dev/vda6        60549120 255858687 195309568  93.1G 83 Linux
/dev/vda7       255860736 646483967 390623232 186.3G 83 Linux
and lsblk shows:

Code: Select all

NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sr0     11:0    1  1024M  0 rom  
vda    254:0    0   312G  0 disk 
├─vda1 254:1    0   953M  0 part /boot
├─vda2 254:2    0     1K  0 part 
├─vda5 254:5    0    28G  0 part /
├─vda6 254:6    0  93.1G  0 part /home
└─vda7 254:7    0 186.3G  0 part /var
How come installer fails to make properly sized partitions?
Last edited by questlinq on 2017-12-30 11:18, edited 1 time in total.

User avatar
Capitain_Jack
Posts: 153
Joined: 2017-12-15 12:07
Location: Brazil capital, Brasilia, At the favela.

Re: Disk size / partition size error

#2 Post by Capitain_Jack »

https://www.howtogeek.com/123268/window ... -capacity/

Please, if you consider your issue solved, edit the first message title adding [SOLVED] to the beginning of it, so others can benefit from your solution.
"Great spirits have always encountered violent opposition from mediocre minds."
Albert Einstein
"All wrong-doing arises because of mind. If mind is transformed can wrong-doing remain?"
Buddha

questlinq
Posts: 69
Joined: 2017-09-19 08:51

Re: Disk size / partition size error

#3 Post by questlinq »

@Capitain_Jack

Unfortunately, this happens only with Debian, but not with Arch, Gparted or Centos.
Could this be related to Debian installer only?

User avatar
Capitain_Jack
Posts: 153
Joined: 2017-12-15 12:07
Location: Brazil capital, Brasilia, At the favela.

Re: Disk size / partition size error

#4 Post by Capitain_Jack »

questlinq wrote:Unfortunately, this happens only with Debian, but not with Arch, Gparted or Centos.
Is this disk an hybrid? It can be that also.
"Great spirits have always encountered violent opposition from mediocre minds."
Albert Einstein
"All wrong-doing arises because of mind. If mind is transformed can wrong-doing remain?"
Buddha

questlinq
Posts: 69
Joined: 2017-09-19 08:51

Re: Disk size / partition size error

#5 Post by questlinq »

No it's a regular SSD, it's the same problem with HDD. It should be related to Debian installer, as I've said before, it happens only with Debian.

p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

Re: Disk size / partition size error

#6 Post by p.H »

I do not see any error in what you report. Do you mean size mismatch ?

Your disk size is 335 GB = 312 GiB.

1 GB = 1 000 000 000 bytes
1 GiB = 1 073 741 824 bytes

Disk manufacturers and the Debian installer display disk sizes in gigabytes (GB), i.e. decimal SI prefixes.
Some other software such as fdisk display disk sizes in gibibytes (GiB), i.e. binary non-SI prefixes. Unfortunately, for historical reasons they often forget to display the "i" indicating the use of a binary prefix. This has created and will continue to create much confusion as long as all software won't be fixed.

questlinq
Posts: 69
Joined: 2017-09-19 08:51

Re: Disk size / partition size error

#7 Post by questlinq »

@p.H

In Debian installer is impossible to choose GiB as size unit. So, is there any other way how to solve the issue?
Last edited by questlinq on 2017-12-30 09:58, edited 1 time in total.

User avatar
Capitain_Jack
Posts: 153
Joined: 2017-12-15 12:07
Location: Brazil capital, Brasilia, At the favela.

Re: Disk size / partition size error

#8 Post by Capitain_Jack »

questlinq wrote:@p.H

Does that mean that I need to specify size in GiB while partitioning with Debian?
That means my first explanation is the why. Other installers use the binary form, Debian uses the non binary form. You are not loosing space, just two forms of displaying the space that differ.

Edit: misplaced the "non" word :P
Last edited by Capitain_Jack on 2017-12-30 10:42, edited 1 time in total.
"Great spirits have always encountered violent opposition from mediocre minds."
Albert Einstein
"All wrong-doing arises because of mind. If mind is transformed can wrong-doing remain?"
Buddha

questlinq
Posts: 69
Joined: 2017-09-19 08:51

Re: Disk size / partition size error

#9 Post by questlinq »

@p.H

I believe Debian uses non-binary form, otherwise it would show 312 Gigabytes disk size and not 335 Gigabytes.

p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

Re: Disk size / partition size error

#10 Post by p.H »

questlinq wrote:In Debian installer is impossible to choose GiB as size unit. So, is there any other way how to solve the issue?
What issue are you talking about ?
The only issue I see here is fdisk and lsblk not displaying multiplier prefixes properly. Solving this issue means fixing these software.
Capitain_Jack wrote:Other installers use the non binary form, Debian uses the binary form.
No, the other way around. The Debian installer correctly uses decimal prefixes.

questlinq
Posts: 69
Joined: 2017-09-19 08:51

Re: Disk size / partition size error

#11 Post by questlinq »

@p.H

Check it out http://www.kylesconverter.com/data-stor ... -gigabytes. Same story with other online converters.

User avatar
GarryRicketson
Posts: 5644
Joined: 2015-01-20 22:16
Location: Durango, Mexico

Re: Disk size / partition size error

#12 Post by GarryRicketson »

I was writing when you posted, yes, that is your solution. Bravo!
So, is there any other way how to solve the issue?
Simply calculate the sizes you want, based on the information you have.
There are even many on line converters to help simplify it more.
convert gib to gb
For example, you want to know:
In Debian installer is impossible to choose GiB as size unit. So, is there any other way how to solve the issue?
Yes,
So you copy paste, the Gib size you have or want into the converter;

Code: Select all

500 gib = 536.870912 gb 
or vice versa, if your drive is only 500gb, obviously you can not use 500 gib, it won't fit.

Code: Select all

465.66128730773926 gib = 500gb 
I would round it out, 465 gib = 500gb.
I know it sounds confusing, but a little bit of logic, and some basic math ,
and it is not to hard to understand.

User avatar
Capitain_Jack
Posts: 153
Joined: 2017-12-15 12:07
Location: Brazil capital, Brasilia, At the favela.

Re: Disk size / partition size error

#13 Post by Capitain_Jack »

335GB = 312 Gb

Again, please, if you feel your issue has been solved, please, edit the first message title adding [SOLVED] to the beginning of it, so others can benefit from this information as well.
"Great spirits have always encountered violent opposition from mediocre minds."
Albert Einstein
"All wrong-doing arises because of mind. If mind is transformed can wrong-doing remain?"
Buddha

questlinq
Posts: 69
Joined: 2017-09-19 08:51

Re: Disk size / partition size error

#14 Post by questlinq »

Thank you all, I'm marking it solved.

p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

Re: Disk size / partition size error

#15 Post by p.H »

@ questlinq

Again, what is the issue that you need to solve with a converter ?
Do you just want to check that the decimal sizes match the binary sizes ?
Or do you want to define partition sizes with binary prefixes ? If so, why do you think it is better than decimal prefixes ? Does it matter that much whether a partition size is 30 GiB or 30 GB ? Whether you use binary or decimal prefixes, the disk size is always the same.

User avatar
Capitain_Jack
Posts: 153
Joined: 2017-12-15 12:07
Location: Brazil capital, Brasilia, At the favela.

Re: Disk size / partition size error

#16 Post by Capitain_Jack »

p.H wrote:Whether you use binary or decimal prefixes, the disk size is always the same.
He didn't know or wasn't thinking about that, this was his issue.
"Great spirits have always encountered violent opposition from mediocre minds."
Albert Einstein
"All wrong-doing arises because of mind. If mind is transformed can wrong-doing remain?"
Buddha

p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

Re: [SOLVED] Disk size / partition size error

#17 Post by p.H »

Then what was the need for a converter ?

User avatar
Capitain_Jack
Posts: 153
Joined: 2017-12-15 12:07
Location: Brazil capital, Brasilia, At the favela.

Re: [SOLVED] Disk size / partition size error

#18 Post by Capitain_Jack »

p.H wrote:Then what was the need for a converter ?
To convert one unit to other and correctly size partitions as wanted.
"Great spirits have always encountered violent opposition from mediocre minds."
Albert Einstein
"All wrong-doing arises because of mind. If mind is transformed can wrong-doing remain?"
Buddha

p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

Re: [SOLVED] Disk size / partition size error

#19 Post by p.H »

Well then, back to my previous question :
p.H wrote:Or do you want to define partition sizes with binary prefixes ? If so, why do you think it is better than decimal prefixes ? Does it matter that much whether a partition size is 30 GiB or 30 GB ?
Why would one need to size partitions in GiB instead of GB ?

Post Reply