SVN: geninitrd/trunk/functions
glen
glen at pld-linux.org
Thu Nov 1 18:30:15 CET 2007
Author: glen
Date: Thu Nov 1 18:30:15 2007
New Revision: 8951
Modified:
geninitrd/trunk/functions
Log:
- more information why lvdisplay failed to resolve lvm name
Modified: geninitrd/trunk/functions
==============================================================================
--- geninitrd/trunk/functions (original)
+++ geninitrd/trunk/functions Thu Nov 1 18:30:15 2007
@@ -95,10 +95,23 @@
;;
esac
+ if [ ! -b "$node" ]; then
+ echo >&2 "dm_lvm2_name: $node is not a block device"
+ return 1
+ fi
+
local lvm_path=$(/sbin/lvdisplay -c 2>/dev/null | awk -F: -vn=$dm_minor '{node=$1; major=$12; minor=$13; if (n == minor) print node}' | xargs)
if [ -z "$lvm_path" ]; then
# XXX: this could happen also for non-lvm nodes?
- echo >&2 "lvdisplay couldn't find device-mapper node with minor $dm_minor. try running 'vgscan --mknodes'."
+ cat >&2 <<-EOF
+ LVM doesn't recognize device-mapper node with minor $dm_minor
+
+ In case your Physical Volumes are device mapper nodes, you should add to lvm.conf:
+ types = [ "device-mapper", 254 ]
+
+ In case the LVM nodes are not present yet, it could be fixed by running:
+ # vgscan --mknodes
+ EOF
return 2
fi
if [ ! -r "$lvm_path" ]; then
More information about the pld-cvs-commit
mailing list