用新的驱动器替换 RAID 阵列中的故障驱动器...但是 WD 更改了块大小?

用新的驱动器替换 RAID 阵列中的故障驱动器...但是 WD 更改了块大小?

我买了一个全新的(相同型号)WD Caviar Green 硬盘来替换我的 5x2TB Raid 5 阵列中出现故障的硬盘。但是,新磁盘似乎略有不同。根据互联网,Western Digital 更改了其块大小?

以下是原始磁盘之一:

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: 0xfdeee051

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1              63  3907025198  1953512568   83  Linux

新的是:

Disk /dev/sdd: 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 / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x11e82af4

   Device Boot      Start         End      Blocks   Id  System
/dev/sdd1            2048  3907029167  1953513560   83  Linux

注意不同的 I/O 大小。当我尝试 sfdisk 分区表时...

[root]# sfdisk -d /dev/sda | sfdisk /dev/sdd
Checking that no-one is using this disk right now ...
OK

Disk /dev/sdd: 243201 cylinders, 255 heads, 63 sectors/track
Old situation:
Warning: The partition table looks like it was made
  for C/H/S=*/81/63 (instead of 243201/255/63).
For this listing I'll assume that geometry.
Units = cylinders of 2612736 bytes, blocks of 1024 bytes, counting from 0

   Device Boot Start     End   #cyls    #blocks   Id  System
/dev/sdd1          0+ 765633- 765634- 1953513560   83  Linux
        end: (c,h,s) expected (1023,80,63) found (513,80,63)
/dev/sdd2          0       -       0          0    0  Empty
/dev/sdd3          0       -       0          0    0  Empty
/dev/sdd4          0       -       0          0    0  Empty
New situation:
Units = sectors of 512 bytes, counting from 0

   Device Boot    Start       End   #sectors  Id  System
/dev/sdd1            63 3907025198 3907025136  83  Linux
/dev/sdd2             0         -          0   0  Empty
/dev/sdd3             0         -          0   0  Empty
/dev/sdd4             0         -          0   0  Empty
Warning: partition 1 does not end at a cylinder boundary

sfdisk: I don't like these partitions - nothing changed.
(If you really want this, use the --force option.)

呃,我不想强​​迫它。当我尝试手动执行时...

[root]# fdisk /dev/sdd

The device presents a logical sector size that is smaller than
the physical sector size. Aligning to a physical sector (or optimal
I/O) size boundary is recommended, or performance may be impacted.

Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4, default 1): 
Using default value 1
First sector (2048-3907029167, default 2048):

它不允许我像其他磁盘一样从 63 开始分区。救命!我应该强制执行吗?

答案1

三个选项:

  • 咬紧牙关,重塑你的 MD。

  • 强制分区表并遭受性能损失

  • 使用 sg_format 将设备大小调整得稍大一些,以便有足够的空间容纳对齐的分区(如果你很幸运的话)

我怀疑你会先做(2),直到你找到时间去做(1)。

相关内容