问题:
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
阅读(3588) | 评论(3) | 转发(0) |