Posted on 2010-02-04 00:47
whspecial 阅读(31)
评论(0) 编辑 收藏 引用
在用mdadm做raid时出现的问题,明明要生成md0设备,reboot后生成了md_d0。
并非什么难以解决的技术问题,只是搜索下中文的资料没找到解决方法,后来在ubuntu的一个论坛上看到某兄的解决方法,记录下来,希望可以对将来遇到这个问题的人有所帮助(本人试过,可行)
网址:http://ubuntuforums.org/showthread.php?t=1168360
Re: mdadm creates /dev/md_d0 and /dev md_d0p1-p4
I
found the same problem after an upgrade to linux-image-2.6.28-11-server
(Jaunty, 9.04) when the /etc/mdadm/mdadm.conf file inside the initrd
image had information that did not match the UUIDs of the real arrays,
thus auto-start failed leaving me with /dev/md_d0, /dev/md_d1 and
/dev/md_d2 instead of /dev/md0, /dev/md1, and dev/md2 as expected.
I then ran "mdadm --stop /dev/md_d0", then on md_d1, etc, to clear the
bad assemble attempt (check /proc/mdstat to see), then ran "mdadm
--auto-detect", mainly to just see what the issue was with
auto-starting of the arrays, however it created them again but properly
this time. I then let it finish the boot process at that point. All
seemed fine. After the system was up, I then force-recreated the
mdadm.conf file so the UUIDs matched... "/usr/share/mdadm/mkconf
force-generate /etc/mdadm/mdadm.conf" (copy your mdadm.conf to /var/tmp
or something first, if you want to diff it later). Then ran
"update-initramfs -u" to re-build the initrd images. Then I rebooted.
Reboot went fine. All arrays recognized and auto-started properly. No
leftover /dev/md_d0 and friends, so I have to assume that when the
arrays auto-start properly, at some point they are renamed to match
what's in /etc/mdadm/mdadm.conf. *shrug* YMMV.