diff options
author | madduck <madduck@3cfab66f-1918-0410-86b3-c06b76f9a464> | 2006-08-02 19:11:46 +0000 |
---|---|---|
committer | madduck <madduck@3cfab66f-1918-0410-86b3-c06b76f9a464> | 2006-08-02 19:11:46 +0000 |
commit | 9a23517aa24c0f5c857cd8a8ce540c6865301fcd (patch) | |
tree | 5c0b73d62572f9c66c1576648c3b087ff6f8c619 /debian/initramfs | |
parent | 5c0ef2266d1a190d029eab5c479e91692b29dc89 (diff) |
* Added safety net to prevent endless loops in RAID autodetection. Now just
which can get in the way of mdadm (also see next item).
* Added a workaround to the initramfs hook to deal with the problem with
/dev/md/X device nodes when /dev/mdX is also present and version-0
superblocks are in use (closes: #381181).
Diffstat (limited to 'debian/initramfs')
-rw-r--r-- | debian/initramfs/hook | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/debian/initramfs/hook b/debian/initramfs/hook index 8152b778..64ab5502 100644 --- a/debian/initramfs/hook +++ b/debian/initramfs/hook @@ -47,6 +47,16 @@ if [ "$INITRDSTART" != none ]; then eval $(mdadm --examine --scan --config=partitions \ | while read a dev level num uuid; do + if expr "$dev" : '/dev/md[0-9].*' >/dev/null; then + devfs_name="/dev/md/${dev#/dev/md}" + if [ -b "$dev" ] && [ -b "$devfs_name" ] \ + && expr "$INITRDSTART" : ".*${devfs_name}.*" >/dev/null; then + echo "W: mdadm: both $dev and $devfs_name exist, and $devfs_name appears to be used." >&2 + echo "W: mdadm: applying workaround for mdadm bug, don't worry! (see #381181)" >&2 + dev="$devfs_name" + fi + fi + if [ "$INITRDSTART" = all ] || expr "$INITRDSTART" : ".*${dev}.*" >/dev/null; then DEVS="$DEVS ${dev}=${uuid#UUID=}" LEVELS="$LEVELS ${level#level=}" |