第二个 2Tb SATA 驱动器无法识别

第二个 2Tb SATA 驱动器无法识别

我正在尝试在 Ubuntu PC 上安装辅助/从属 SATA 硬盘驱动器。新驱动器容量为 2Tb。我可以安装 1T 驱动器,但是当我尝试新的 2T 磁盘时,它无法被识别。起初我认为驱动器有问题并更换了它。替换的行为方式相同,让我认为存在系统问题/疏忽。

在 BIOS 中,SATA 模式设置为 AHCI。其他选项(IDE 和 RAID 模式)均被禁用。 2tb 硬盘似乎没有出现在启动选项中。我认为就是主驱动器和 DVD 驱动器。

难道是BIOS或者主板不支持2T硬盘吗?主板是华硕P8Z68-M Pro,BIOS版本是0402。

“sudo fdisk -l”仅显示主驱动器,而不显示第二个磁盘:

Disk /dev/sdb: 931,5 GiB, 1000204886016 bytes, 1953525168 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
Disklabel type: dos
Disk identifier: 0xdd82f21f

Dispositivo Inicializar      Start        Fim    Setores   Size Id Tipo
/dev/sdb1   *                 2048 1928396799 1928394752 919,5G 83 Linux
/dev/sdb2               1928398846 1953523711   25124866    12G  5 Estendida
/dev/sdb5               1928398848 1953523711   25124864    12G 82 Linux swap /

lspci 返回:

00:00.0 Host bridge: Intel Corporation 2nd Generation Core Processor Family DRAM Controller (rev 09)
00:01.0 PCI bridge: Intel Corporation Xeon E3-1200/2nd Generation Core Processor Family PCI Express Root Port (rev 09)
00:16.0 Communication controller: Intel Corporation 6 Series/C200 Series Chipset Family MEI Controller #1 (rev 04)
00:1a.0 USB controller: Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #2 (rev 05)
00:1b.0 Audio device: Intel Corporation 6 Series/C200 Series Chipset Family High Definition Audio Controller (rev 05)
00:1c.0 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 1 (rev b5)
00:1c.4 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 5 (rev b5)
00:1c.5 PCI bridge: Intel Corporation 82801 PCI Bridge (rev b5)
00:1c.6 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 7 (rev b5)
00:1c.7 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 8 (rev b5)
00:1d.0 USB controller: Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #1 (rev 05)
00:1f.0 ISA bridge: Intel Corporation Z68 Express Chipset Family LPC Controller (rev 05)
00:1f.2 SATA controller: Intel Corporation 6 Series/C200 Series Chipset Family SATA AHCI Controller (rev 05)
00:1f.3 SMBus: Intel Corporation 6 Series/C200 Series Chipset Family SMBus Controller (rev 05)
01:00.0 VGA compatible controller: NVIDIA Corporation GF119 [GeForce GT 520] (rev a1)
01:00.1 Audio device: NVIDIA Corporation GF119 HDMI Audio Controller (rev a1)
03:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 06)
04:00.0 PCI bridge: ASMedia Technology Inc. ASM1083/1085 PCIe to PCI Bridge (rev 01)
05:01.0 Multimedia audio controller: Xilinx Corporation RME Hammerfall DSP (rev 11)
06:00.0 SATA controller: ASMedia Technology Inc. ASM1062 Serial ATA Controller (rev 01)
07:00.0 USB controller: ASMedia Technology Inc. ASM1042 SuperSpeed USB Host Controller

答案1

到目前为止,我会解释一下 dmesg:

[    0.984980] ahci 0000:00:1f.2: AHCI 0001.0300 32 slots 6 ports 6 Gbps 0x1c impl SATA mode
[    0.984986] ahci 0000:00:1f.2: flags: 64bit ncq sntf pm led clo pio slum part ems apst 
[    0.989635] scsi host0: ahci
[    0.989751] scsi host1: ahci
[    0.989842] scsi host2: ahci
[    0.989979] scsi host3: ahci
[    0.990083] scsi host4: ahci
[    0.990176] scsi host5: ahci
[    0.990228] ata1: DUMMY
[    0.990229] ata2: DUMMY
[    0.990233] ata3: SATA max UDMA/133 abar m2048@0xfb405000 port 0xfb405200 irq 38
[    0.990236] ata4: SATA max UDMA/133 abar m2048@0xfb405000 port 0xfb405280 irq 38
[    0.990239] ata5: SATA max UDMA/133 abar m2048@0xfb405000 port 0xfb405300 irq 38
[    0.990240] ata6: DUMMY

您的第一个控制器(Intel 控制器)具有 6 个 SATA 端口,其中 3 个可供设备使用。

[    0.990382] ahci 0000:06:00.0: SSS flag set, parallel bus scan disabled
[    0.990426] ahci 0000:06:00.0: AHCI 0001.0200 32 slots 2 ports 6 Gbps 0x3 impl SATA mode
[    0.990430] ahci 0000:06:00.0: flags: 64bit ncq sntf stag led clo pmp pio slum part ccc sxs 
[    0.990742] scsi host6: ahci
[    0.990837] scsi host7: ahci
[    0.990888] ata7: SATA max UDMA/133 abar m512@0xfb200000 port 0xfb200100 irq 39
[    0.990892] ata8: SATA max UDMA/133 abar m512@0xfb200000 port 0xfb200180 

您的第二个控制器(ASmedia 控制器)有 2 个端口,其中所有 2 个端口都可供设备使用。

你的lscsi输出

$ lsscsi
[2:0:0:0] disk ATA ST2000DM006 CC26 /dev/sda
[3:0:0:0] cd/dvd HL-DT-ST DVDRAM GH22NS70 EX01 /dev/sr0
[4:0:0:0] disk ATA ST1000NM0011 SN03 /dev/sdb

仅显示三个设备,这是完整列表吗?请注意,对sda和 的分配sdb不必按此顺序发生,您不能依赖于此。在执行任何操作之前,请务必先查看哪个磁盘是哪个磁盘。有多种方法可以区分它们。

[    1.294992] ata3: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
[    1.295224] ata3.00: failed to read native max address (err_mask=0x1)
[    1.295226] ata3.00: HPA support seems broken, skipping HPA handling
[    1.295229] ata3.00: ATA-8: ST2000DM006, CC26, max UDMA/133
[    1.295230] ata3.00: 8089950 sectors, multi 16: LBA48 NCQ (depth 31/32)
[    1.295455] ata3.00: configured for UDMA/133 (device error ignored)
[    1.295666] scsi 2:0:0:0: Direct-Access     ATA      ST2000DM006      CC26 PQ: 0 ANSI: 5
[    1.295830] sd 2:0:0:0: [sda] 8089950 512-byte logical blocks: (4.14 GB/3.86 GiB)
[    1.295849] sd 2:0:0:0: Attached scsi generic sg0 type 0

这是第一个磁盘,报告为 4 GB,这是错误的,因为读取磁盘大小的命令期间出现错误。

该磁盘在 dmesg 日志的其余部分中继续给出错误。

这是您的第二个磁盘:

[    1.296244] ata5: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
[    1.297043] ata5.00: ATA-8: ST1000NM0011, SN03, max UDMA/133
[    1.297045] ata5.00: 1953525168 sectors, multi 16: LBA48 NCQ (depth 31/32)
[    1.297996] ata5.00: configured for UDMA/133

[    1.327292] scsi 4:0:0:0: Direct-Access     ATA      ST1000NM0011     SN03 PQ: 0 ANSI: 5
[    1.327494] sd 4:0:0:0: [sdb] 1953525168 512-byte logical blocks: (1.00 TB/932 GiB)
[    1.327517] sd 4:0:0:0: Attached scsi generic sg2 type 0
[    1.327605] sd 4:0:0:0: [sdb] Write Protect is off
[    1.327609] sd 4:0:0:0: [sdb] Mode Sense: 00 3a 00 00
[    1.327652] sd 4:0:0:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA

这是第二个磁盘,容量为 1 TB,运行良好,不再出现错误。

因此,您的 2TB 磁盘和 SATA 控制器之间的通信存在严重问题:命令不起作用、给出错误结果等。尝试将此磁盘依次连接到其他四个端口,看看是否会发生同样的情况。尝试不同的SATA电缆,看看电缆是否损坏。确保接触良好。

它可以是磁盘、控制器或连接;现阶段很难说。

编辑

在新版本中dmesg,第一张卡的端口分配不同,并具有不同的端口寄存器偏移量,这显然很奇怪:

[    0.969158] ahci 0000:00:1f.2: version 3.0
[    0.979912] ahci 0000:00:1f.2: AHCI 0001.0300 32 slots 6 ports 6 Gbps 0x1b impl SATA mode
[    0.979919] ahci 0000:00:1f.2: flags: 64bit ncq sntf pm led clo pio slum part ems apst 
[    0.987156] ata1: SATA max UDMA/133 abar m2048@0xfb405000 port 0xfb405100 irq 38
[    0.987159] ata2: SATA max UDMA/133 abar m2048@0xfb405000 port 0xfb405180 irq 38
[    0.987160] ata3: DUMMY
[    0.987162] ata4: SATA max UDMA/133 abar m2048@0xfb405000 port 0xfb405280 irq 38
[    0.987165] ata5: SATA max UDMA/133 abar m2048@0xfb405000 port 0xfb405300 irq 38
[    0.987166] ata6: DUMMY

如果主板上的端口是硬连线的,则它应该始终是相同的分配。这很奇怪,值得在内核开发错误跟踪器列表上报告错误,即使它是正确的并且他们向您解释了为什么它是正确的。ahci 应该相当标准。

无论如何,在第二个 中dmesg,2 TB 磁盘被正确识别并分配给/dev/sda

[    1.292843] ata1.00: ATA-9: ST2000DM006-2DM164, CC26, max UDMA/133
[    1.292846] ata1.00: 3907029168 sectors, multi 16: LBA48 NCQ (depth 31/32), AA
[    1.294113] scsi 0:0:0:0: Direct-Access     ATA      ST2000DM006-2DM1 CC26 PQ: 0 ANSI: 5
[    1.294307] sd 0:0:0:0: [sda] 3907029168 512-byte logical blocks: (2.00 TB/1.82 TiB)
[    1.294317] sd 0:0:0:0: [sda] 4096-byte physical blocks
[    1.294320] sd 0:0:0:0: Attached scsi generic sg0 type 0
[    1.294425] sd 0:0:0:0: [sda] Write Protect is off
[    1.294428] sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00
[    1.294456] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support
[    1.363542]  sda: sda1
[    1.363976] sd 0:0:0:0: [sda] Attached SCSI disk

并且分区表读取正确,并且我没有看到任何进一步的错误。当您尝试使用它时会发生什么?

相关内容