如何让CentOS在3Gb / s启动时运行SATA硬盘?
背景:
我有一个主板声称支持6Gb / s SATA传输速度的问题,但是当它使用4个驱动器时,在具有大磁盘IO的软件RAID 10中,一些SATA链接开始引发内核错误,即。 ata1.00: failed command: WRITE FPDMA QUEUED 。 但是每次都是不同的驱动器,并不总是ata1,每个磁盘上运行扩展testing都不会产生任何错误。
当错误发生时,内核/操作系统(CentOS 6.2)会最终重新设定连接数次,当连接失败时,连接速度会改变为3Gb / s。 一旦发生这种情况,会话剩余时间的错误就会停止。
我想要告诉操作系统将SATA链接设置为3Gb / s以便在启动时启动,因为我认为主板的SATA总线不能以6Gb / s处理所有4个驱动器。 在主板的BIOS中找不到选项来更改链接速度。
问题:
我该怎么做呢? 即。 一个configuration文件?
可以在系统运行时安装RAIDarrays和根分区来完成,还是需要从急救光盘启动?
这会导致数据丢失吗? 我当然有备份,但重新安装/恢复是我希望尽可能避免的几个小时的工作。
不幸的是,在运行时没有任何东西(/ sys / class / ata_link包含只读信息)。
但是在启动时,似乎可以设置所需的参数强制值。 这里的文档在这里: http : //www.kernel.org/doc/Documentation/kernel-parameters.txt
Specifically libata.force= [LIBATA] Force configurations. The format is comma separated list of "[ID:]VAL" where ID is PORT[.DEVICE]. PORT and DEVICE are decimal numbers matching port, link or device. Basically, it matches the ATA ID string printed on console by libata. If the whole ID part is omitted, the last PORT and DEVICE values are used. If ID hasn't been specified yet, the configuration applies to all ports, links and devices. If only DEVICE is omitted, the parameter applies to the port and all links and devices behind it. DEVICE number of 0 either selects the first device or the first fan-out link behind PMP device. It does not select the host link. DEVICE number of 15 selects the host link and device attached to it. The VAL specifies the configuration to force. As long as there's no ambiguity shortcut notation is allowed. For example, both 1.5 and 1.5G would work for 1.5Gbps. The following configurations can be forced. * Cable type: 40c, 80c, short40c, unk, ign or sata. Any ID with matching PORT is used. * SATA link speed limit: 1.5Gbps or 3.0Gbps. * Transfer mode: pio[0-7], mwdma[0-4] and udma[0-7]. udma[/][16,25,33,44,66,100,133] notation is also allowed. * [no]ncq: Turn on or off NCQ. * nohrst, nosrst, norst: suppress hard, soft and both resets. * dump_id: dump IDENTIFY data. If there are multiple matching configurations changing the same attribute, the last one is used.
从内核参数libata.force = 3.0G应该工作..
关于数据丢失,可能不会 – 但坦率地说,因为SATA供应商显然没有正确地认可SATA规格(或它的越野车或其他),谁知道。
MIfe在这里的回答是一个很好的线索(+1有帮助的参考),但不完全完整。
要将SATA链接设置为3Gb / s,请执行以下操作:
编辑/boot/grub/grub.conf
find以kernel开始的行。 在我的,这是:
kernel /vmlinuz-2.6.32-220.17.1.el6.x86_64 ro root=/dev/mapper/vg_lago-host rd_NO_LUKS LANG=en_US.UTF-8...
将libata.force=3.0添加到某个内核行中。
重启
完成上述操作之后,我现在可以运行IO密集型操作,例如将虚拟机映像从磁盘的一部分复制到另一个部分,而不会再出现WRITE FPDMA QUEUED错误。
将其降级到3Gbps可能不可行,但应该可以将链路降级到1.5Gbps。 除非你有10K驱动器或SSD,否则他们将无法饱和150MB / s的连接。
大多数硬盘驱动器可以被迫使用跳线来协商较低的速度。 谷歌为“Sata 1跳线您的驱动器模型 ”