parted subtracting partition size 16896 from size given

When I create a partition using parted(mkpart) giving unit as Bytes, it is creating “size given – 16896” byte sized partition.
Is there any specific reason to less 16896 bytes from the partition size(in bytes) given?

Here, after creating a partition I get the partition size like:

#parted /dev/sda unit B print.

Note: These partitions are used in RAID formation.
Also, observed this happens only if it is the first partition created in disk.

Answer

Not all partition sizes are valid.
(E.g must be an integral number of blocks or sectors, which can be differently sized on different types of media. Older HD’s usually have 512 bytes per sector. Some HD’s use 4096 byte sectors.

Another thing is that some media have limitations about were partitions can start/end.
E.g. on RAID systems the partitions often must line up with the RAID stripes. (They can’t start/end in the middle of a stripe.)

Most partitoning tools know this and will adjust the size and the partition begin/end to make it fit within the limits of the media.

This is probably what is happening in your case.

(By the way: Are you really specifiying partition size in BYTES ? Those are really unwieldy large numbers.)

Attribution
Source : Link , Question Author : kumar , Answer Author : Tonny

Leave a Comment