LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1468|回复: 3

关于lvm 关于udev 关于genkernel

[复制链接]
发表于 2010-10-15 19:44:01 | 显示全部楼层 |阅读模式
/boot 挂在sda3
想把root分区挂到lvm 的逻辑分区上/dev/vg1/root上,出现错误,后来root挂到sda2上,也出现这个错误。   还是想实现root 挂到/dev/vg1/root上,所以像修改grub中选项(不用initrd命令,)的回复就不用回了。  我google.了一下,好像是udev 或者lvm2的bug,
======================================


系统在启动过程中出现
* Setting up the Logical Volume Manager ...
  The link /dev/vg1/res should had been created by udev but it was not found. Falling back to direct link creation.
  The link /dev/vg1/home should had been created by udev but it was not found. Falling back to direct link creation.
  The link /dev/vg1/video should had been created by udev but it was not found. Falling back to direct link creation.
  The link /dev/vg1/java should had been created by udev but it was not found. Falling back to direct link creation.
  The link /dev/vg1/text should had been created by udev but it was not found. Falling back to direct link creation.
  The link /dev/vg1/swap should had been created by udev but it was not found. Falling back to direct link creati









grub 中
title Gentoo CJK 2.6.31-r7    2010-10-1
root (hd0,2)
kernel /kernel-genkernel-x86-2.6.31-cjk-r7  dolvm root=/dev/sda2 rootfstype=ext4 vga=0x317 quiet
initrd /boot/initramfs-genkernel-x86-2.6.31-cjk-r7




sys-fs/lvm2
     Installed versions:  2.02.73{tbz2}(18时33分26秒 2010年10月15日)(lvm1 readline static -clvm -cman -selinux)
     Homepage:            http://sources.redhat.com/lvm2/
     Description:         User-land utilities for LVM2 (device-mapper) software.

sys-fs/udev
     Installed versions:  151-r4{tbz2}(17时21分02秒 2010年10月14日)(extras -devfs-compat -old-hd-rules -selinux -test)
     Homepage:            http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html
     Description:         Linux dynamic and persistent device naming support (aka userspace devfs)


另外,我没用hal ,不知有没有关系(估计不会,因为我在有hal的备份上,升级udev lvm2后,出现这个问题,没升级前,没这个问题,但问题在哪还是不清楚)




=================================================
jixiuf@jf /boot $ emerge --info
Portage 2.1.8.3 (default/linux/x86/10.0/desktop, gcc-4.4.3, glibc-2.11.2-r0, 2.6.31-cjk-r7 i686)
=================================================================
System uname: Linux-2.6.31-cjk-r7-i686-Intel-R-_Pentium-R-_Dual_CPU_T3400_@_2.16GHz-with-gentoo-2.0.1
Timestamp of tree: Fri, 15 Oct 2010 09:00:16 +0000
ccache version 2.4 [enabled]
app-shells/bash:     4.1_p7
dev-java/java-config: 2.1.11
dev-lang/python:     2.6.5-r3, 3.1.2-r4
dev-util/ccache:     2.4-r7
dev-util/cmake:      2.8.1-r2
sys-apps/baselayout: 2.0.1
sys-apps/openrc:     0.6.3
sys-apps/sandbox:    2.3-r1
sys-devel/autoconf:  2.13, 2.65-r1
sys-devel/automake:  1.8.5-r4, 1.9.6-r3, 1.10.3, 1.11.1
sys-devel/binutils:  2.20.1-r1
sys-devel/gcc:       4.4.3-r2
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.10
sys-devel/make:      3.81-r2
virtual/os-headers:  2.6.30-r1
ACCEPT_KEYWORDS="x86"
ACCEPT_LICENSE="* -@EULA Broadcom license dlj-1.1 IBM-J1.5 PUEL AdobeFlash-10.1"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe -fomit-frame-pointer -mfpmath=sse"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/X11/xkb /var/bind /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=native -O2 -pipe -fomit-frame-pointer -mfpmath=sse"
DISTDIR="/resource/pkg/gentoo/distfiles"
FEATURES="assume-digests buildpkg buildsyspkg ccache distlocks fixpackages news parallel-fetch protect-owned sandbox sfperms strict unmerge-logs unmerge-orphans userfetch"
GENTOO_MIRRORS="http://60.191.81.189/gentoo http://61.135.158.199 http://mirrors.acm.cs.rpi.edu/gentoo/ http://distfiles.gentoo.org http://gentoo.aditsu.net http://gentoo.139pay.com http://128.111.24.43/pub/mirrors/linux/gentoo http://129.101.198.59/pub/gentoo http://gentoo.netnitco.net/ ftp://ftp.lecl.net/pub/gentoo/ http://gentoo.cites.uiuc.edu/pub/gentoo/ http://gentoo.chem.wisc.edu/gentoo/ http://ftp.gentoo.or.kr/http://ftp.ncnu.edu.tw/Linux/Gentoo ftp://ftp3.tsinghua.edu.cn/mirror/gentoo ftp://ftp.sjtu.edu.cn/distfiles http://linux.ntcu.net/ftp/dists/gentoo "
LANG="zh_CN.UTF-8"
LC_ALL="zh_CN.UTF-8"
LDFLAGS="-Wl,-O2,--as-needed"
LINGUAS="zh_CN.UTF-8 zh_CN zh_CN.GBK zh_CN.gb2312 zh_TW zh_TW.UTF-8   zh en en_US  en_US.UTF-8"
MAKEOPTS="-j3"
PKGDIR="/resource/pkg/gentoo/binPackages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/resource/pkg/gentoo/layman/crossdev /resource/pkg/gentoo/layman/gentoo-china"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X a52 aac acl acpi alsa berkdb bluetooth branding bzip2 cairo cdr cjk cli consolekit cracklib crypt cxx dbus directfb dri dts dvd dvdr emacs emboss encode exif fam ffmpeg firefox flac gdbm gif gpm gstreamer gtk iconv jpeg laptop lcms ldap libnotify mad midi mikmod mng modules mp3 mp4 mpeg mudflap ncurses nls nptl nptlonly ogg opengl openmp pam pango pcre pdf perl png ppds pppd python qt3support readline reflection sdl session spell sqlite sqlite3 ssl startup-notification svg sysfs system-sqlite tcpd tiff truetype udev unicode usb vorbis wlan x264 x86 xcb xml xorg xulrunner xv xvid xvmc zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="zh_CN.UTF-8 zh_CN zh_CN.GBK zh_CN.gb2312 zh_TW zh_TW.UTF-8   zh en en_US  en_US.UTF-8" PHP_TARGETS="php-5.2" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="nvidia" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
发表于 2010-10-15 22:41:01 | 显示全部楼层
这个错误我也有,不过用起来没感觉:
同问
* Setting up the Logical Volume Manager ...
The link /dev/vg1/res should had been created by udev but it was not found. Falling back to direct link creation.
The link /dev/vg1/home should had been created by udev but it was not found. Falling back to direct link creation.
The link /dev/vg1/video should had been created by udev but it was not found. Falling back to direct link creation.
The link /dev/vg1/java should had been created by udev but it was not found. Falling back to direct link creation.
The link /dev/vg1/text should had been created by udev but it was not found. Falling back to direct link creation.
The link /dev/vg1/swap should had been created by udev but it was not found. Falling back to direct link creati
回复 支持 反对

使用道具 举报

发表于 2010-10-16 02:40:02 | 显示全部楼层
Post by chenfengyuan;2115806
这个错误我也有,不过用起来没感觉:
同问
* Setting up the Logical Volume Manager ...
The link /dev/vg1/res should had been created by udev but it was not found. Falling back to direct link creation.
The link /dev/vg1/home should had been created by udev but it was not found. Falling back to direct link creation.
The link /dev/vg1/video should had been created by udev but it was not found. Falling back to direct link creation.
The link /dev/vg1/java should had been created by udev but it was not found. Falling back to direct link creation.
The link /dev/vg1/text should had been created by udev but it was not found. Falling back to direct link creation.
The link /dev/vg1/swap should had been created by udev but it was not found. Falling back to direct link creati


我猜:
你在initrd里面有用
  1. vgchange -ay
复制代码
吧?

把它改成
  1. vgchagen -av <vgname>/<rootlvname>
复制代码

那就只有/root才有警告。基本上因為你的logical volume是自己activate而不是udev做的你要手動制造symblic links...你也可以自己在initrd裡手動制造link(但我不知道怎樣在關機時delete掉link、因為那時候udev還會警告一次)。

這是無痛的警告。可以忽略。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2010-10-20 12:37:03 | 显示全部楼层
自欺欺人的做法,隐藏
无痛,看着碍眼,看了下/etc/init.d/lvm
发现了/lib/rcscripts/addons/lvm-start.sh lvm-stop.sh
修改里面所有vg* lv* pv* 都 >/dev/null 2>/dev/null
眼不见心不烦
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表