软件 RAID 阵列中的磁盘出现故障,我正在尝试更换它。我之前已经顺利完成了这项工作,但这次我在尝试复制分区表时遇到了错误。
我正在使用这个命令:
sfdisk -l /dev/sda | sfdisk /dev/sdb
并得到这个错误:
sfdisk: unrecognized input: 121601 cylinders, 255 heads, 63 sectors/track
阅读sfdisk 手册页,我无法诚实地看到这个命令是如何工作的,但它在过去曾多次工作过。
问题:如何将确切的分区表复制到第二个磁盘,以便我可以将其用作 RAID 成员?我不喜欢 sfdisk,这只是之前完成的工作。
如果有帮助,这里有一些细节
sfdisk -l /dev/sda
Disk /dev/sda: 121601 cylinders, 255 heads, 63 sectors/track
Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0
Device Boot Start End #cyls #blocks Id System
/dev/sda1 * 0+ 3646 3647- 29294496 fd Linux raid autodetect
/dev/sda2 3647 121600 117954 947465505 5 Extended
/dev/sda3 0 - 0 0 0 Empty
/dev/sda4 0 - 0 0 0 Empty
/dev/sda5 3647+ 27961 24315- 195310206 fd Linux raid autodetect
/dev/sda6 27962+ 40119 12158- 97659103+ fd Linux raid autodetect
/dev/sda7 120628+ 121600 973- 7815591 fd Linux raid autodetect
/dev/sda8 119655+ 120627 973- 7815591 fd Linux raid autodetect
/dev/sda9 40120+ 119654 79535- 638864856 fd Linux raid autodetect
sfdisk -l /dev/sdb
Disk /dev/sdb: 121601 cylinders, 255 heads, 63 sectors/track
Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0
Device Boot Start End #cyls #blocks Id System
/dev/sdb1 0+ 121600 121601- 976760001 83 Linux
/dev/sdb2 0 - 0 0 0 Empty
/dev/sdb3 0 - 0 0 0 Empty
/dev/sdb4 0 - 0 0 0 Empty
还尝试了该选项的管道-d
,但这告诉我:
Device Boot Start End #sectors Id System
/dev/sdb1 * 63 58589054 58588992 fd Linux raid autodetect
/dev/sdb2 58589055 1953520064 1894931010 5 Extended
/dev/sdb3 0 - 0 0 Empty
/dev/sdb4 0 - 0 0 Empty
/dev/sdb5 58589118 449209529 390620412 fd Linux raid autodetect
/dev/sdb6 449209593 644527799 195318207 fd Linux raid autodetect
/dev/sdb7 1937888883 1953520064 15631182 fd Linux raid autodetect
/dev/sdb8 1922257638 1937888819 15631182 fd Linux raid autodetect
/dev/sdb9 644527863 1922257574 1277729712 fd Linux raid autodetect
Warning: partition 7 does not start at a cylinder boundary
sfdisk: I don't like these partitions - nothing changed.
(If you really want this, use the --force option.)
partition7 是否有可能从 sda 的圆柱边界开始,但不会在 sdb 上?我应该修复这个(分开?)还是强制它?
命令应该是
由于您之前为您工作的命令不再起作用,我有点犹豫是否要告诉您有关克隆 MBR 的信息
dd
……如果您敢于尝试并完全自担风险,请尝试一下。