0

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.

kumar
  • 423
  • 2
  • 9
  • 23

2 Answers2

0

512 of that is the MBR/MPT.
The other 16k is probably being reserved for the bootloader or something similar.

Chris S
  • 77,337
  • 11
  • 120
  • 212
0

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

Tonny
  • 6,252
  • 1
  • 17
  • 31