Why increase the size by 2B when adding only one?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
1
down vote

favorite












Software parted takes automatically size of sector (512B for GPT).



I enter exact size to MB, but I can't create swap partition with exact size.



mkpart swap linux-swap 15.5GB 17013
print

Number Start End Size File system Name Flags
1 1049kB 10.0GB 10.0GB ext4
2 10.0GB 15.0GB 5000MB ext4
3 15.0GB 15.5GB 512MB ext4
4 15.5GB 17.0GB 1499MB linux-swap(v1)


When I enter another size:
mkpart swap linux-swap 15.5GB 17014
print



Number Start End Size File system Name Flags
1 1049kB 10.0GB 10.0GB ext4
2 10.0GB 15.0GB 5000MB ext4
3 15.0GB 15.5GB 512MB ext4
4 15.5GB 17.0GB 1501MB linux-swap(v1)


Why increase the size by 2B when adding only one?







share|improve this question





















  • parted's default unit of MB/GB always suffers rounding issues. Unless you have special requirements, you really want to use unit MiB or similar with parted. If you're not following the MiB-alignment mantra or want to double-check, go for unit s or even unit b.
    – frostschutz
    Jun 14 at 21:21











  • If is MB or GB incorrect, why somebody uses it? Why everybody don't use Mib and Gib etc.?
    – J. Doe
    Jun 14 at 21:43














up vote
1
down vote

favorite












Software parted takes automatically size of sector (512B for GPT).



I enter exact size to MB, but I can't create swap partition with exact size.



mkpart swap linux-swap 15.5GB 17013
print

Number Start End Size File system Name Flags
1 1049kB 10.0GB 10.0GB ext4
2 10.0GB 15.0GB 5000MB ext4
3 15.0GB 15.5GB 512MB ext4
4 15.5GB 17.0GB 1499MB linux-swap(v1)


When I enter another size:
mkpart swap linux-swap 15.5GB 17014
print



Number Start End Size File system Name Flags
1 1049kB 10.0GB 10.0GB ext4
2 10.0GB 15.0GB 5000MB ext4
3 15.0GB 15.5GB 512MB ext4
4 15.5GB 17.0GB 1501MB linux-swap(v1)


Why increase the size by 2B when adding only one?







share|improve this question





















  • parted's default unit of MB/GB always suffers rounding issues. Unless you have special requirements, you really want to use unit MiB or similar with parted. If you're not following the MiB-alignment mantra or want to double-check, go for unit s or even unit b.
    – frostschutz
    Jun 14 at 21:21











  • If is MB or GB incorrect, why somebody uses it? Why everybody don't use Mib and Gib etc.?
    – J. Doe
    Jun 14 at 21:43












up vote
1
down vote

favorite









up vote
1
down vote

favorite











Software parted takes automatically size of sector (512B for GPT).



I enter exact size to MB, but I can't create swap partition with exact size.



mkpart swap linux-swap 15.5GB 17013
print

Number Start End Size File system Name Flags
1 1049kB 10.0GB 10.0GB ext4
2 10.0GB 15.0GB 5000MB ext4
3 15.0GB 15.5GB 512MB ext4
4 15.5GB 17.0GB 1499MB linux-swap(v1)


When I enter another size:
mkpart swap linux-swap 15.5GB 17014
print



Number Start End Size File system Name Flags
1 1049kB 10.0GB 10.0GB ext4
2 10.0GB 15.0GB 5000MB ext4
3 15.0GB 15.5GB 512MB ext4
4 15.5GB 17.0GB 1501MB linux-swap(v1)


Why increase the size by 2B when adding only one?







share|improve this question













Software parted takes automatically size of sector (512B for GPT).



I enter exact size to MB, but I can't create swap partition with exact size.



mkpart swap linux-swap 15.5GB 17013
print

Number Start End Size File system Name Flags
1 1049kB 10.0GB 10.0GB ext4
2 10.0GB 15.0GB 5000MB ext4
3 15.0GB 15.5GB 512MB ext4
4 15.5GB 17.0GB 1499MB linux-swap(v1)


When I enter another size:
mkpart swap linux-swap 15.5GB 17014
print



Number Start End Size File system Name Flags
1 1049kB 10.0GB 10.0GB ext4
2 10.0GB 15.0GB 5000MB ext4
3 15.0GB 15.5GB 512MB ext4
4 15.5GB 17.0GB 1501MB linux-swap(v1)


Why increase the size by 2B when adding only one?









share|improve this question












share|improve this question




share|improve this question








edited Jun 14 at 23:15









jasonwryan

46.4k14125174




46.4k14125174









asked Jun 14 at 21:02









J. Doe

61




61











  • parted's default unit of MB/GB always suffers rounding issues. Unless you have special requirements, you really want to use unit MiB or similar with parted. If you're not following the MiB-alignment mantra or want to double-check, go for unit s or even unit b.
    – frostschutz
    Jun 14 at 21:21











  • If is MB or GB incorrect, why somebody uses it? Why everybody don't use Mib and Gib etc.?
    – J. Doe
    Jun 14 at 21:43
















  • parted's default unit of MB/GB always suffers rounding issues. Unless you have special requirements, you really want to use unit MiB or similar with parted. If you're not following the MiB-alignment mantra or want to double-check, go for unit s or even unit b.
    – frostschutz
    Jun 14 at 21:21











  • If is MB or GB incorrect, why somebody uses it? Why everybody don't use Mib and Gib etc.?
    – J. Doe
    Jun 14 at 21:43















parted's default unit of MB/GB always suffers rounding issues. Unless you have special requirements, you really want to use unit MiB or similar with parted. If you're not following the MiB-alignment mantra or want to double-check, go for unit s or even unit b.
– frostschutz
Jun 14 at 21:21





parted's default unit of MB/GB always suffers rounding issues. Unless you have special requirements, you really want to use unit MiB or similar with parted. If you're not following the MiB-alignment mantra or want to double-check, go for unit s or even unit b.
– frostschutz
Jun 14 at 21:21













If is MB or GB incorrect, why somebody uses it? Why everybody don't use Mib and Gib etc.?
– J. Doe
Jun 14 at 21:43




If is MB or GB incorrect, why somebody uses it? Why everybody don't use Mib and Gib etc.?
– J. Doe
Jun 14 at 21:43















active

oldest

votes











Your Answer







StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: false,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);








 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f449895%2fwhy-increase-the-size-by-2b-when-adding-only-one%23new-answer', 'question_page');

);

Post as a guest



































active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes










 

draft saved


draft discarded


























 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f449895%2fwhy-increase-the-size-by-2b-when-adding-only-one%23new-answer', 'question_page');

);

Post as a guest













































































Popular posts from this blog

Peggy Mitchell

Palaiologos

The Forum (Inglewood, California)