从 gmirror 迁移到 graid
谷奥 的服务器硬盘坏了,而且托管商很奇怪地用了 gmirror 而不是 BIOS 直接支持的 graid(我厂 Alexander Motin 实现的与 BIOS 兼容的软件 RAID,支持 Intel、Adaptec、JMicron、nVidia、Promise和SiL等多家厂商的软RAID格式),所以趁这个机会给它换掉。记一下迁移的过程。
共 4 篇文章。
谷奥 的服务器硬盘坏了,而且托管商很奇怪地用了 gmirror 而不是 BIOS 直接支持的 graid(我厂 Alexander Motin 实现的与 BIOS 兼容的软件 RAID,支持 Intel、Adaptec、JMicron、nVidia、Promise和SiL等多家厂商的软RAID格式),所以趁这个机会给它换掉。记一下迁移的过程。
最近我厂对 LSI 6Gb/s SAS HBA 的驱动 (mps(4)) 进行了改进,令其可以在 FreeBSD 环境中进行固件刷写操作。目前最新的固件版本是 14,这个版本修正了目前已知的全部问题。
以前一直没有太注意,这类 HBA 卡上可以用两种固件。一种是 IT (initiator target) 固件,这类固件只提供HBA功能;另一种是 IR (integrated RAID) 固件,这类固件提供集成 RAID 功能。对于我们的应用来说,显然希望用 IT 固件,因为它的代码量要少得多,而由于减少了包含校验的冗余,卡本身的 RAID 功能在 ZFS 环境多数情况下都是有害的。
注意:如果您熟悉RAID请不必浪费时间阅读这篇文章。
为什么用RAID-Z/RAID-Z2而不是RAID-5呢?
答案是:RAID-5有一个不可避免的问题,即它必须使用后备电源才能保证写入的正确性。这也是为什么我一直极力反对使用低档RAID卡和软件实现的RAID-5的原因。
And finally, it happend.
On Monday, one of our server, running FreeBSD, panic’ed with “ffs_clusteralloc: map mismatch”. This message is quite uncommon and should only happen when there is some “event” with the memory or hard disk.
I have suggested our administrator to reboot and do “fsck” on the volume, since it has very small block size and can not be checked background (I have made a change to warn about this to FreeBSD, and was MFC’ed to 5-STABLE so you will get the feature in 5.4-RELEASE). Unfortunatelly, the check is so slow and we start to suspect whether there is some hardware problem.