[SOLVED] Disk size / partition size error

If none of the more specific forums is the right place to ask

[SOLVED] Disk size / partition size error

Postby questlinq » 2017-12-30 08:54

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.
questlinq
 
Posts: 24
Joined: 2017-09-19 08:51

Re: Disk size / partition size error

Postby Capitain_Jack » 2017-12-30 09:06

https://www.howtogeek.com/123268/windows-hard-drive-wrong-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
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

Postby questlinq » 2017-12-30 09:23

@Capitain_Jack

Unfortunately, this happens only with Debian, but not with Arch, Gparted or Centos.
Could this be related to Debian installer only?
questlinq
 
Posts: 24
Joined: 2017-09-19 08:51

Re: Disk size / partition size error

Postby Capitain_Jack » 2017-12-30 09:26

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
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

Postby questlinq » 2017-12-30 09:35

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.
questlinq
 
Posts: 24
Joined: 2017-09-19 08:51

Re: Disk size / partition size error

Postby p.H » 2017-12-30 09:38

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.
p.H
 
Posts: 631
Joined: 2017-09-17 07:12

Re: Disk size / partition size error

Postby questlinq » 2017-12-30 09:43

@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.
questlinq
 
Posts: 24
Joined: 2017-09-19 08:51

Re: Disk size / partition size error

Postby Capitain_Jack » 2017-12-30 09:50

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
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

Postby questlinq » 2017-12-30 10:06

@p.H

I believe Debian uses non-binary form, otherwise it would show 312 Gigabytes disk size and not 335 Gigabytes.
questlinq
 
Posts: 24
Joined: 2017-09-19 08:51

Re: Disk size / partition size error

Postby p.H » 2017-12-30 10:07

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.
p.H
 
Posts: 631
Joined: 2017-09-17 07:12

Re: Disk size / partition size error

Postby questlinq » 2017-12-30 10:36

@p.H

Check it out http://www.kylesconverter.com/data-storage/gigabytes-(binary)-to-gigabytes. Same story with other online converters.
questlinq
 
Posts: 24
Joined: 2017-09-19 08:51

Re: Disk size / partition size error

Postby GarryRicketson » 2017-12-30 10:41

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
GarryRicketson
 
Posts: 5163
Joined: 2015-01-20 22:16
Location: Durango, Mexico

Re: Disk size / partition size error

Postby Capitain_Jack » 2017-12-30 10:45

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
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

Postby questlinq » 2017-12-30 11:17

Thank you all, I'm marking it solved.
questlinq
 
Posts: 24
Joined: 2017-09-19 08:51

Re: Disk size / partition size error

Postby p.H » 2017-12-30 11:22

@ 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.
p.H
 
Posts: 631
Joined: 2017-09-17 07:12

Next

Return to General Questions

Who is online

Users browsing this forum: No registered users and 8 guests

fashionable