Removing a directory in /dev is not reflected in /lib/dev-state and will be resurrected by a reboot. There is a rule in the /etc/devfsd.conf which says: DELETE .* CFUNCTION GLOBAL unlink /lib/dev-state/$devname But unlink will fail if $devname refers to a directory. This can happen when using lvremove for example. Reproducible: Always Steps to Reproduce: 1. mkdir /dev/foo 2. rmdir /dev/foo Actual Results: Directory not removed in /lib/dev-state and error message appears in /var/log/messages: devfsd[128]: error calling: "unlink" in "GLOBAL" Expected Results: Corresponding directory should have been removed in /lib/dev-state. Portage 2.0.49-r20 (default-x86-1.4, gcc-3.2.3, glibc-2.3.2-r9, 2.6.1-gentoo) ============================================================ ===== System uname: 2.6.1-gentoo i686 AMD Athlon(tm) Processor Gentoo Base System version 1.4.3.10 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CFLAGS="-O3 -mcpu=i686 -funroll-loops -pipe" CHOST="i486-pc-linux-gnu" COMPILER="gcc3" CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3/share/ config /usr/share/config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d" CXXFLAGS="-O3 -mcpu=i686 -funroll-loops -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs ccache sandbox" GENTOO_MIRRORS="http://gentoo.gg3.net/ http://ftp.gentoo.or.kr/ ftp://gg3.net/pub/linux/ gentoo/" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="" SYNC="rsync://rsync.asia.gentoo.org/gentoo-portage" USE="X apm arts avi berkdb canna cjk crypt cups encode esd foomaticdb gdbm gif gnome gpm gtk gtk2 imlib java jpeg libg++ libwww mad mikmod motif mozilla mpeg mule ncurses nls opengl oss pam pdflib perl png python quicktime readline sdl slang spell ssl svga tcpd truetype x86 xml2 xv zlib"
considering this *looks* to be a kernel bug and devfsd is pretty much dead upstream, what do you guys think we should do about this ?
I cannot remember if unlink calls rm .. you might try: -- DELETE .* CFUNCTION GLOBAL unlink -rf /lib/dev-state/$devname -- ??
like i said, devfs is pretty much dead ... either use RC_DEVICE_TARBALL="no" in /etc/conf.d/rc or send a patch :)