2

Today we had our DC replace a failing harddrive in our RAID array, this is the first time I have ever had to do this. However I am now trying to resync the array and I am having difficulties understanding how this systems even working right now.

Our current working drives partition table is the following:

Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x56565656

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1        2089    16777216   fd  Linux raid autodetect
/dev/sda2   *        2089      121602   959983616   fd  Linux raid autodetect

How come the end cylinder of /dev/sda1 and the start cylinder of /dev/sda2 are the same? Because of this I am unable to replicate the partition table on the new drive.

1
  • I'm surprised your distribution's fdisk didn't also provide a warning about DOS-compatible mode being deprecated. If you DID see that error and you're reporting a problem here, that should be something that you include with the question......
    – Magellan
    Apr 4, 2013 at 20:25

1 Answer 1

10

Add the -u option to your fdisk -l to you. Fdisk is deceiving you because you are letting it live in a world where cylinders/heads actually mean something useful (this world is long gone). My guess is that your drive is aligning partitions to 1MB boundaries instead of pseudo cylinders that the get seen. The partition isn't ending on the perfect cylinder boundary.

Example:

$ sudo fdisk -l /dev/sda

Disk /dev/sda: 2000.4 GB, 2000397852160 bytes
255 heads, 63 sectors/track, 243201 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000c82ff

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1         244     1951744   fd  Linux raid autodetect
Partition 1 does not end on cylinder boundary.
/dev/sda2             244      243202  1951559680   fd  Linux raid autodetect

$ sudo fdisk -l -u /dev/sda

Disk /dev/sda: 2000.4 GB, 2000397852160 bytes
255 heads, 63 sectors/track, 243201 cylinders, total 3907027055 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: 0x000c82ff

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1            2048     3905535     1951744   fd  Linux raid autodetect
Partition 1 does not end on cylinder boundary.
/dev/sda2         3905536  3907024895  1951559680   fd  Linux raid autodetect
3
  • Thank you so much! Managed to get this figured out with further help from Google.
    – Jono20201
    Apr 4, 2013 at 21:25
  • 1
    If my answer didn't fully provide all the details, then perhaps you could add your own answer with more details here for future visitors.
    – Zoredache
    Apr 4, 2013 at 22:13
  • Bit of a late reply, however the issue I was having at the time was fully solved by your answer, however it was just one part of the multiple layers of issues I was having.
    – Jono20201
    Apr 30, 2013 at 16:06

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .