Why does the partition start on sector 2048 instead of 63?

I had two drives partitioned the same and running two RAID partitions on each.

One died and I replaced it under warranty for the same model.

While trying to partition it, the first partition can only start on sector 2048, instead of 63 that was before. Drive have different geometry as previous and remaining ones. (Fewer heads/more cylinders)

Old drive:

$ sudo fdisk -c -u -l /dev/sdb 

Disk /dev/sdb: 2000.4 GB, 2000398934016 bytes
255 heads, 63 sectors/track, 243201 cylinders, total 3907029168 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: 0x000aa189

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *          63   174080339    87040138+  83  Linux
/dev/sdb2       174080340   182482334     4200997+  82  Linux swap / Solaris
/dev/sdb3       182482335  3907024064  1862270865   fd  Linux raid autodetect

Remanufactured drive received from warranty:

$ sudo fdisk -c -u -l /dev/sda

Disk /dev/sda: 2000.4 GB, 2000398934016 bytes
81 heads, 63 sectors/track, 765633 cylinders, total 3907029168 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: 0x000d0b5d

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1            2048  ...

Why is that?


Solution 1:

Because your old disc was partitioned with a old utility, such as the Linux fdisk, that uselessly implemented track-alignment using the entirely fake disc geometry that you see reported, and your new disc has been or is being partitioned by a newer utility that (by default) aligns to 1MiB boundaries instead.

Further reading

  • Jonathan de Boyne Pollard (2011). The gen on disc partition alignment. Frequently Given Answers.

Solution 2:

fdisk -c=dos

You used the old DOS partition table when creating your partition. Newer versions of fdisk do not use dos compatibility mode by default.

Solution 3:

Maybe it will be useful to add a comment here. For LUKS partition, it is said to delete and re-create the partition at the same place, but larger before calling cryptsetup resize. But when you created your partition long time ago, it start at the sector 63. Using fdisk, the partition will be recreated at the wrong offset, resulting in a lost partition.

I've managed to recover it using fdisk -c=dos to be able to create partition from sector 63, without troubles.