结束和开始气缸一样吗?

Jon*_*201 2 drive

今天我们让 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
Run Code Online (Sandbox Code Playgroud)

为什么 /dev/sda1 的结束柱面和 /dev/sda2 的开始柱面是一样的?因此,我无法在新驱动器上复制分区表。

Zor*_*che 10

-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
Run Code Online (Sandbox Code Playgroud)