Kernel error on CD-RW/DVD ROM
Alexander Dupuy
alex.dupuy at mac.com
Wed Apr 15 13:24:53 CDT 2009
Patti Clark wrote:
> the last message was generated right after I'd added space to an LVM partition.
This is a telling point. I have a small snippet of shell code that will
update /etc/lvm/lvm.conf to exclude CD/DVD-ROM/RW devices - I suspect
that if you try running this on your machine (make a backup copy of
/etc/lvm/lvm.conf first!), it will prevent these messages, at least if
they are caused by LVM attempting to identify volumes.
# update lvm configuration to not bother trying to probe cdroms/cdwriters
FILTER=
for DEVICE in /dev/cd* /dev/dvd*
do
case $DEVICE in *'*') : continue ;; esac
FILTER="$FILTER \"r|$DEVICE|\","
LINK=`readlink $DEVICE`
case $LINK in
'') : ;;
/*) FILTER="$FILTER \"r|/$LINK|\"," ;;
*) FILTER="$FILTER \"r|/dev/$LINK|\","
esac
done
if [ -n "$FILTER" ]; then
ed -s /etc/lvm/lvm.conf <<-EOF
/^ *filter =/s@=.*@= [$FILTER "a/.*/" ]@
wq
EOF
rm -f /etc/lvm/.cache /etc/lvm/cache/.cache
fi
You could also just edit /etc/lvm/lvm.conf directly and set the filter
patter manually - just remember to delete the cache file.
@alex
More information about the Linux-PowerEdge
mailing list