所以我有一个 3TB 硬盘/dev/sdc
,我正在尝试在其上创建分区。在此之前,我遇到了如下所述的问题,我将驱动器传输到 Windows 7 计算机并从那里创建了 GPT。 Windows 7 只识别出大约 800 GB,而不是应有的 3 TB。
以下是硬盘的详细信息:
root@VMHost:~# hdparm -i /dev/sdc
/dev/sdc:
Model=ST3000DM001-1CH166, FwRev=CC24, SerialNo=W1F2TRVD
Config={ HardSect NotMFM HdSw>15uSec Fixed DTR>10Mbs RotSpdTol>.5% }
RawCHS=16383/16/63, TrkSize=0, SectSize=0, ECCbytes=4
BuffType=unknown, BuffSize=unknown, MaxMultSect=16, MultSect=16
CurCHS=16383/16/63, CurSects=16514064, LBA=yes, LBAsects=5860533168
IORDY=on/off, tPIO={min:120,w/IORDY:120}, tDMA={min:120,rec:120}
PIO modes: pio0 pio1 pio2 pio3 pio4
DMA modes: mdma0 mdma1 mdma2
UDMA modes: udma0 udma1 *udma2 udma3 udma4 udma5 udma6
AdvancedPM=yes: unknown setting WriteCache=enabled
Drive conforms to: unknown: ATA/ATAPI-4,5,6,7
* signifies the current active mode
以下是从 Windows 7 创建 GPT 后硬盘驱动器的 MBR(前 512 字节):
root@VMHost:~# dd if=/dev/sdc bs=512 count=1 | xxd
1+0 records in
1+0 records out
512 bytes (512 B) copied, 0.000573978 s, 892 kB/s
0000000: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000010: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000020: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000030: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000040: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000050: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000060: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000070: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000080: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000090: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00000a0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00000b0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00000c0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00000d0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00000e0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00000f0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000100: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000110: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000120: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000130: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000140: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000150: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000160: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000170: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000180: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0000190: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00001a0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00001b0: 0000 0000 0000 0000 19d0 7cdc 0000 0000 ..........|.....
00001c0: 0200 eeff ffff 0100 0000 ffff ffff 0000 ................
00001d0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00001e0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00001f0: 0000 0000 0000 0000 0000 0000 0000 55aa ..............U.
现在,如果我执行parted /dev/sdc
它,我会得到以下结果:
root@VMHost:~# parted /dev/sdc
GNU Parted 2.3
Using /dev/sdc
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) print
Error: The backup GPT table is corrupt, but the primary appears OK, so that will be used.
OK/Cancel? O
Warning: Not all of the space available to /dev/sdc appears to be used, you can fix the GPT to use all of the space (an extra 4294967296 blocks) or continue with the current setting?
Fix/Ignore? I
Model: ATA ST3000DM001-1CH1 (scsi)
Disk /dev/sdc: 3001GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Number Start End Size File system Name Flags
1 17.4kB 134MB 134MB Microsoft reserved partition msftres
(parted) mklabel gpt
Warning: The existing disk label on /dev/sdc will be destroyed and all data on this disk will be lost. Do you want to continue?
Yes/No? Yes
(parted) print
Error: /dev/sdc: unrecognised disk label
(parted) quit
Information: You may need to update /etc/fstab.
在上面的例子中,我忽略了错误而不是修复它。之前,我曾尝试让它修复错误,但仍然遇到同样的问题。如您所见,一旦我执行“mklabel gpt”,它似乎成功完成,但随后我在任何后续请求中收到以下错误:
Error: /dev/sdc: unrecognised disk label
最后,当我尝试从驱动器获取 MBR 时,我收到以下信息
root@VMHost:~# dd if=/dev/sdc bs=512 count=1 | xxd
1+0 records in
1+0 records out
512 bytes (512 B) copied, 0.000411262 s, 1.2 MB/s
0000000: ffff ffff ffff ffff ffff ffff ffff ffff ................
0000010: ffff ffff ffff ffff ffff ffff ffff ffff ................
0000020: ffff ffff ffff ffff ffff ffff ffff ffff ................
0000030: ffff ffff ffff ffff ffff ffff ffff ffff ................
0000040: ffff ffff ffff ffff ffff ffff ffff ffff ................
0000050: ffff ffff ffff ffff ffff ffff ffff ffff ................
0000060: ffff ffff ffff ffff ffff ffff ffff ffff ................
0000070: ffff ffff ffff ffff ffff ffff ffff ffff ................
0000080: ffff ffff ffff ffff ffff ffff ffff ffff ................
0000090: ffff ffff ffff ffff ffff ffff ffff ffff ................
00000a0: ffff ffff ffff ffff ffff ffff ffff ffff ................
00000b0: ffff ffff ffff ffff ffff ffff ffff ffff ................
00000c0: ffff ffff ffff ffff ffff ffff ffff ffff ................
00000d0: ffff ffff ffff ffff ffff ffff ffff ffff ................
00000e0: ffff ffff ffff ffff ffff ffff ffff ffff ................
00000f0: ffff ffff ffff ffff ffff ffff ffff ffff ................
0000100: ffff ffff ffff ffff ffff ffff ffff ffff ................
0000110: ffff ffff ffff ffff ffff ffff ffff ffff ................
0000120: ffff ffff ffff ffff ffff ffff ffff ffff ................
0000130: ffff ffff ffff ffff ffff ffff ffff ffff ................
0000140: ffff ffff ffff ffff ffff ffff ffff ffff ................
0000150: ffff ffff ffff ffff ffff ffff ffff ffff ................
0000160: ffff ffff ffff ffff ffff ffff ffff ffff ................
0000170: ffff ffff ffff ffff ffff ffff ffff ffff ................
0000180: ffff ffff ffff ffff ffff ffff ffff ffff ................
0000190: ffff ffff ffff ffff ffff ffff ffff ffff ................
00001a0: ffff ffff ffff ffff ffff ffff ffff ffff ................
00001b0: ffff ffff ffff ffff ffff ffff ffff ffff ................
00001c0: ffff ffff ffff ffff ffff ffff ffff ffff ................
00001d0: ffff ffff ffff ffff ffff ffff ffff ffff ................
00001e0: ffff ffff ffff ffff ffff ffff ffff ffff ................
00001f0: ffff ffff ffff ffff ffff ffff ffff ffff ................
所以parted用全1覆盖了MBR中的所有内容。
最后,如果我尝试用全 0 覆盖 MBR,则会发生以下情况:
root@VMHost:~# dd if=/dev/zero of=/dev/sdc bs=512 count=1
1+0 records in
1+0 records out
512 bytes (512 B) copied, 0.00132826 s, 385 kB/s
root@VMHost:~# dd if=/dev/sdc bs=512 count=1 | xxd
1+0 records in
1+0 records out
512 bytes (512 B) copied, 0.00602964 s, 84.9 kB/s
0000000: ffff ffff ffff ffff ffff ffff ffff ffff ................
0000010: ffff ffff ffff ffff ffff ffff ffff ffff ................
0000020: ffff ffff ffff ffff ffff ffff ffff ffff ................
0000030: ffff ffff ffff ffff ffff ffff ffff ffff ................
0000040: ffff ffff ffff ffff ffff ffff ffff ffff ................
0000050: ffff ffff ffff ffff ffff ffff ffff ffff ................
0000060: ffff ffff ffff ffff ffff ffff ffff ffff ................
0000070: ffff ffff ffff ffff ffff ffff ffff ffff ................
0000080: ffff ffff ffff ffff ffff ffff ffff ffff ................
0000090: ffff ffff ffff ffff ffff ffff ffff ffff ................
00000a0: ffff ffff ffff ffff ffff ffff ffff ffff ................
00000b0: ffff ffff ffff ffff ffff ffff ffff ffff ................
00000c0: ffff ffff ffff ffff ffff ffff ffff ffff ................
00000d0: ffff ffff ffff ffff ffff ffff ffff ffff ................
00000e0: ffff ffff ffff ffff ffff ffff ffff ffff ................
00000f0: ffff ffff ffff ffff ffff ffff ffff ffff ................
0000100: ffff ffff ffff ffff ffff ffff ffff ffff ................
0000110: ffff ffff ffff ffff ffff ffff ffff ffff ................
0000120: ffff ffff ffff ffff ffff ffff ffff ffff ................
0000130: ffff ffff ffff ffff ffff ffff ffff ffff ................
0000140: ffff ffff ffff ffff ffff ffff ffff ffff ................
0000150: ffff ffff ffff ffff ffff ffff ffff ffff ................
0000160: ffff ffff ffff ffff ffff ffff ffff ffff ................
0000170: ffff ffff ffff ffff ffff ffff ffff ffff ................
0000180: ffff ffff ffff ffff ffff ffff ffff ffff ................
0000190: ffff ffff ffff ffff ffff ffff ffff ffff ................
00001a0: ffff ffff ffff ffff ffff ffff ffff ffff ................
00001b0: ffff ffff ffff ffff ffff ffff ffff ffff ................
00001c0: ffff ffff ffff ffff ffff ffff ffff ffff ................
00001d0: ffff ffff ffff ffff ffff ffff ffff ffff ................
00001e0: ffff ffff ffff ffff ffff ffff ffff ffff ................
00001f0: ffff ffff ffff ffff ffff ffff ffff ffff ................
正如您所看到的,dd 认为它已成功完成,但在检查驱动器 MBR 时,它仍然全是 1。
我有两个硬盘正在执行此操作,这是我用来构建 RAID 的三个驱动器中的两个,如本问题所述:mdadm RAID 5 和分开的无法识别的磁盘标签
有谁知道如何让我的驱动器恢复到工作状态,然后我可以再次尝试构建 RAID?
更新:是的,它可以处理 3 TB 驱动器。我已从计算机中删除了不工作的驱动器,因此它们不会显示在此处,但工作的驱动器在这里,其中包括两个 3 TB 驱动器。
lex@VMHost:~$ sudo parted --list
Model: ATA ST1000DM003-1CH1 (scsi)
Disk /dev/sda: 1000GB
Sector size (logical/physical): 512B/4096B
Partition Table: msdos
Number Start End Size Type File system Flags
1 1049kB 256MB 255MB primary ext2 boot
2 257MB 1000GB 1000GB extended
5 257MB 1000GB 1000GB logical lvm
Model: ATA ST3000DM001-1CH1 (scsi)
Disk /dev/sdb: 3001GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Number Start End Size File system Name Flags
1 1049kB 3001GB 3001GB ntfs Basic data partition msftdata
Model: ATA ST3000DM001-1CH1 (scsi)
Disk /dev/sdc: 3001GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Number Start End Size File system Name Flags
1 1049kB 3001GB 3001GB raid
至于所使用的主板是技嘉GA-990FXA-UD5(http://www.gigabyte.com/products/product-page.aspx?pid=3891#ov)
至于lsof /dev/sdc
、cat /proc/mdstat
、 和dmesg | grep -C3 sdc
命令,我今天下班回家时会将其中一个硬盘装回计算机,并发布这些命令的结果。
更新:我已将两个驱动器插入计算机并执行注释中列出的三个命令。我选择了有问题的驱动器之一,sdd:
root@VMHost:/home/lex# lsof /dev/sdd
root@VMHost:/home/lex# cat /proc/mdstat
Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10]
unused devices: <none>
root@VMHost:/home/lex# dmesg | grep -C3 sdd
[ 2.214863] sd 3:0:0:0: [sdc] Mode Sense: 00 3a 00 00
[ 2.214924] sd 3:0:0:0: [sdc] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[ 2.215017] scsi 5:0:0:0: Direct-Access ATA ST3000DM001-1CH1 CC24 PQ: 0 ANSI: 5
[ 2.215162] sd 5:0:0:0: [sdd] 5860533168 512-byte logical blocks: (3.00 TB/2.72 TiB)
[ 2.215167] sd 5:0:0:0: Attached scsi generic sg4 type 0
[ 2.215170] sd 5:0:0:0: [sdd] 4096-byte physical blocks
[ 2.215273] sd 5:0:0:0: [sdd] Write Protect is off
[ 2.215278] sd 5:0:0:0: [sdd] Mode Sense: 00 3a 00 00
[ 2.215306] scsi 5:0:1:0: Direct-Access ATA ST3000DM001-1CH1 CC24 PQ: 0 ANSI: 5
[ 2.215311] sd 5:0:0:0: [sdd] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[ 2.215586] sd 5:0:1:0: [sde] 5860533168 512-byte logical blocks: (3.00 TB/2.72 TiB)
[ 2.215591] sd 5:0:1:0: [sde] 4096-byte physical blocks
[ 2.215625] sd 5:0:1:0: Attached scsi generic sg5 type 0
[ 2.215705] sd 5:0:1:0: [sde] Write Protect is off
[ 2.215710] sd 5:0:1:0: [sde] Mode Sense: 00 3a 00 00
[ 2.215757] sd 5:0:1:0: [sde] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[ 2.264662] sdd: sdd1 sdd2
[ 2.267284] sdc: sdc1
[ 2.267722] sd 3:0:0:0: [sdc] Attached SCSI disk
[ 2.269904] sdb: sdb1
[ 2.270426] sd 2:0:0:0: [sdb] Attached SCSI disk
[ 2.295403] random: lvm urandom read with 81 bits of entropy available
[ 2.321435] sd 5:0:0:0: [sdd] Attached SCSI disk
[ 2.326279] firewire_core 0000:04:0e.0: created device fw0: GUID 0049e550854d0d00, S400
[ 2.330185] sde: sde1 sde2
[ 2.330654] sd 5:0:1:0: [sde] Attached SCSI disk