Chinaunix首页 | 论坛 | 博客
  • 博客访问: 606786
  • 博文数量: 353
  • 博客积分: 1104
  • 博客等级: 少尉
  • 技术积分: 1457
  • 用 户 组: 普通用户
  • 注册时间: 2008-12-23 23:02
个人简介

1、刚工作时做Linux 流控;后来做安全操作系统;再后来做操作系统加固;现在做TCP 加速。唉!没离开过类Unix!!!但是水平有限。。

文章存档

2015年(80)

2013年(4)

2012年(90)

2011年(177)

2010年(1)

2009年(1)

分类: LINUX

2010-06-30 15:00:09

问题:
Linux 升级内核后,出现如下错误..........
主要是RHEL4,5系列,FC系列等Linux发行版在升级内核后,重新引导时常出现此问题
具体是他们的2.6.9---2.6.18间的内核,在升到2.6.20以上时多会出此问题
 

NO volume groups found
Unable to find volume group "VolGroup00"
ERROR:/bin/lvm exited abnormally!(pid 545)
mount:error 6 mounting ext3
mount:error 2 mounting none
switchroot:mount failed:22
umount /initrd/dev failed:2
Kernel panic - not syncing:Attempted to kill init!
 

Reh Hat nash version 4.2.1.13 starting
Reading all physical volumes. This may take a while...
No volume groups found
volume group "vg00" not found
ERROR: /bin/lvm exited abnormally! (pid 421)
mount: error 6 mounting ext3
mount: error 2 mounting none
switchroot:mount failed: 22
umount /initrd/dev failed: 2
kernel panic - not syncing: Attempted to kill init!
 
分析:
  Linux发行版在安装后(主要是使用lvm的),在升级内核后出现上面的错误主要是新内核对旧版的lvm支持默认没打开。这只是表面现象,本质是sysfs的问题,下面的英文资料里说的很清楚了。。
 
解决方法:
  try to recompile kernel with
CONFIG_SYSFS_DEPRECATED=y
CONFIG_SYSFS_DEPRECATED_V2=y

(old lvm will not understand new sysfs design, this should
provide old sysfs entries)
解决方法来源:
 
也有可能是其它问题:
    scsi驱动在initrd中没有,此时可能要升级一下mkinitrd等,这方面网上解决方法比较多
参见:
 
 
 
解决方法来源上的此问题的讨论:
 
On 09/18/2009 12:48 PM, Milan Broz wrote:
Ben Greear wrote:
I recently tried to boot 2.6.31 on Fedora 8, and it couldn't
find the volume groups. The same kernel works fine on F11.

try to recompile kernel with
CONFIG_SYSFS_DEPRECATED=y
CONFIG_SYSFS_DEPRECATED_V2=y

(old lvm will not understand new sysfs design, this should
provide old sysfs entries)

That did the trick, thanks!

Ben


 
On 9/18/2009, Ben Greear (greearb@xxxxxxxxxxxxxxx) wrote:
> > I recently tried to boot 2.6.31 on Fedora 8, and it couldn't
> > find the volume groups. The same kernel works fine on F11.
>
> try to recompile kernel with
> CONFIG_SYSFS_DEPRECATED=y
> CONFIG_SYSFS_DEPRECATED_V2=y
>
> (old lvm will not understand new sysfs design, this should
> provide old sysfs entries)

I'm also an lvm newbie, and since I'll obviously be running into this
sometime soon...

If lvm2 is updated first (before the kernel), I'm assuming it would
still be backward compatible with older kernels?

Or, if I updated the kernel first and compiled it with the above
options, when lvm2 gets updated, will I need to recompile the kernel
with the above options disabled before the next reboot?

Thanks,

--

Best regards,

Charles

 
 
Charles Marcus wrote:
> On 9/18/2009, Ben Greear (greearb@xxxxxxxxxxxxxxx) wrote:
> > > I recently tried to boot 2.6.31 on Fedora 8, and it couldn't
> > > find the volume groups. The same kernel works fine on F11.
> >
> > try to recompile kernel with
> > CONFIG_SYSFS_DEPRECATED=y
> > CONFIG_SYSFS_DEPRECATED_V2=y
> >
> > (old lvm will not understand new sysfs design, this should
> > provide old sysfs entries)
>
> I'm also an lvm newbie, and since I'll obviously be running into this
> sometime soon...
>
> If lvm2 is updated first (before the kernel), I'm assuming it would
> still be backward compatible with older kernels?
>
Yes, I'm almost sure it is. I run a 2.6.30 kernel with
CONFIG_SYSFS_DEPRECATED=y and have a relatively recent LVM, and it works well.

> Or, if I updated the kernel first and compiled it with the above
> options, when lvm2 gets updated, will I need to recompile the kernel
> with the above options disabled before the next reboot?
>

I don't think so. LVM guys are not evil. :)

--
Andrà Gillibert

 
 
Andrà Gillibert wrote:
>> Or, if I updated the kernel first and compiled it with the above
>> options, when lvm2 gets updated, will I need to recompile the kernel
>> with the above options disabled before the next reboot?
>>
>
> I don't think so. LVM guys are not evil. :)

Are you sure? ;-)

Well in fact this is not lvm2 problem, but problem with incompatible
changes in sysfs design.
(Recent lvm2 userspace code will recognise devices in all cases.)

But maybe there can be other problems, not related to lvm2 with these
deprecated options set - see e.g.

So for new kernel with old userspace (like udev etc) enable it, for new
distro with recent userspace keep it disabled.

Milan
 
阅读(3599) | 评论(3) | 转发(0) |
给主人留下些什么吧!~~

renyuan0002011-09-25 18:33:00

chinaunix网友: 再次感谢,目前出现的问题解决。已成功启动新内核.....
哈哈,这个问题不是很好找,我是凑巧找到外国论坛上别人详细的分析的。。。

能帮到你,我很高兴,,哈哈。。原来以为CU升级服务器把我以前的blog都弄丢了。。。。居然又回来了,可惜那个流量控制的他把我的链接的别人的csdn的blog给去掉了。。。

chinaunix网友2011-05-14 06:14:48

再次感谢,目前出现的问题解决。已成功启动新内核

chinaunix网友2011-05-14 05:57:40

现在正在跑,如果成功了,在下感激不尽。这个内核升级搞了我三四天了,一直没找到解决办法,看到你的东西,也不知可不可以。希望这次能从新升级之后的内核正常启动 为了给你留言,我新申请一个帐号,想登录进去,却提示说用户名或密码不正确,晕啊...