从 gmirror 迁移到 graid
谷奥 的服务器硬盘坏了,而且托管商很奇怪地用了 gmirror 而不是 BIOS 直接支持的 graid(我厂 Alexander Motin 实现的与 BIOS 兼容的软件 RAID,支持 Intel、Adaptec、JMicron、nVidia、Promise和SiL等多家厂商的软RAID格式),所以趁这个机会给它换掉。记一下迁移的过程。
共 8 篇文章。
谷奥 的服务器硬盘坏了,而且托管商很奇怪地用了 gmirror 而不是 BIOS 直接支持的 graid(我厂 Alexander Motin 实现的与 BIOS 兼容的软件 RAID,支持 Intel、Adaptec、JMicron、nVidia、Promise和SiL等多家厂商的软RAID格式),所以趁这个机会给它换掉。记一下迁移的过程。
注意:如果您熟悉RAID请不必浪费时间阅读这篇文章。
为什么用RAID-Z/RAID-Z2而不是RAID-5呢?
答案是:RAID-5有一个不可避免的问题,即它必须使用后备电源才能保证写入的正确性。这也是为什么我一直极力反对使用低档RAID卡和软件实现的RAID-5的原因。
备份在最近成为了一件越来越让人头疼的事情。我过去采取的做法是把数据刻录成光盘,寄给若干个分布在不同地区的几个朋友,但这种做法正在变得越来越不现实,因为数据的产生速度变得越来越快,而整理和加密其中需要保密的部分所需的时间也越来越长。
在阿鲁的帮助下,我们终于在今天晚上正式恢复了 ftp.cn.FreeBSD.org 的服务。这次服务中断是由于所采用的磁盘阵列柜电源出现故障导致的,由于厂商备件不足等种种的原因,总共花费了两周的时间才把新的换上。
So he has finally (after about six or more months) imported read-only ResierFS, congratulations, dumbbell, you have made a quite impressive change!
Since 6-ism VFS interface is quite different from 5-ism, so this change is not likely to be merged IMO. Read-write is also not likely to be available soon, but anyway, ReiserFS is a nice FS and supporting it is a good move.
Today another GPL kernel has problem with a 4TB RAID5 array, it thought that it is 2.1TB (on boot) and refuse to initialize it with its native file systems, including ReiserFS. On contrary, FreeBSD 5.4 and 6.0 works smoothly with a GENERIC kernel. Oh well…
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.
It seems that if one host is fsck’ing and the other is trying to boot, then the controller will halt. I’m so tired and sick about this!