Drive

結束和開始氣缸一樣嗎?

  • April 4, 2013

今天我們讓我們的 DC 更換了 RAID 陣列中出現故障的硬碟,這是我第一次不得不這樣做。但是,我現在正在嘗試重新同步陣列,但我很難理解這個系統現在是如何工作的。

我們目前工作的驅動器分區表如下:

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

/dev/sda1 的結束柱面和 /dev/sda2 的起始柱面為什麼相同?因此,我無法在新驅動器上複製分區表。

-u選項添加fdisk -l到您的。Fdisk 在欺騙您,因為您讓它生活在一個圓柱體/磁頭實際上意味著有用的世界中(這個世界早已不復存在)。我的猜測是您的驅動器將分區對齊到 1MB 邊界,而不是看到的偽柱面。分區沒有在完美的柱面邊界上結束。

例子:

$ 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

引用自:https://serverfault.com/questions/496253