Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I created two partitions using the following commands.

parted /dev/sda --script -- mkpart primary 1 50001
parted /dev/sda --script -- mkpart primary 1948001 1998001

Each partition should have 50001 MB. However, when I use "partclone" trying to copy from the first partition to the second, it complains that these two partitions are not the same size. The second one is 50000 MB.

When I do "fdisk -l", below is the output.

Disk /dev/sda: 1999.3 GB, 1999307276288 bytes
255 heads, 63 sectors/track, 243068 cylinders, total 3904897024 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
Disk identifier: 0x000d3669

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1            2048    97658879    48828416   83  Linux
/dev/sda4      3804690432  3902345215    48827392   83  Linux

It shows the difference of the number of blocks.

So if I want to create two partitions with exactly the same size, what should I do?

share|improve this question

I haven't used parted, but with fdisk, if I want to be exact i have to change the units to cylinders or sectors (assuming same disk geometry). How about trying that and seeing if you get closer?

You should be able to put a suffix on your number to indicate unit type. According to the man page it is "s" for sectors and "cyl" for cylinders.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.