【轉】NO volume groups found(FC,RHEL4,CentOS4,5 )

     需要從2.6.18內核升級到2.6.39內核,試了N多方法後唯有此法有效,甚是歡喜,遂轉之。

************************************************************************

問題:
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 <CMarcus@xxxxxxxxxxxxxxxxx> 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.

http://lkml.org/lkml/2009/3/24/628

So for new kernel with old userspace (like udev etc) enable it, for new

 

distro with recent userspace keep it disabled.

 

Milan

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章