ALT Linux Bugzilla
– Attachment 561 Details for
Bug 4997
не включается поддержка softraid если используется lvm на md
New bug
|
Search
|
[?]
|
Help
Register
|
Log In
[x]
|
Forgot Password
Login:
[x]
|
EN
|
RU
[patch]
попытка исправить ситуацию
mkinitrd-feat-gns-raid-lvm.patch (text/plain), 2.98 KB, created by
Nick S. Grechukh
on 2004-08-15 19:05:00 MSD
(
hide
)
Description:
попытка исправить ситуацию
Filename:
MIME Type:
Creator:
Nick S. Grechukh
Created:
2004-08-15 19:05:00 MSD
Size:
2.98 KB
patch
obsolete
>--- /sbin/mkinitrd 2004-03-11 18:26:57 +0200 >+++ /home/kolya/hack-initrd/myinitrd.6 2004-08-15 17:01:09 +0300 >@@ -15,6 +15,14 @@ > # Keith Owens <kaos@ocs.com.au> > # > # Rewritten by Dmitry V. Levin <ldv@altlinux.org> >+# >+# Contributors: >+# Nick S. Grechukh <gns@altlinux.ru>: >+# Aug 15, 2004 improved raid support: >+# - using LVM over raid >+# - arrays created with mdadm (without /etc/raidtab) >+# - loading raid support to initrd can be forced (for autodetect at bootstrap) >+# bugs: raid-over-raid (level 10) will not working this way. however, formerly it wasn't working at all. > > PROG=mkinitrd > VERSION=2.9.1 >@@ -137,6 +145,10 @@ > MODULES_CONF= > HAVE_RAID= > >+PVSCAN=/sbin/pvscan >+MDADM=/usr/sbin/mdadm >+FORCE_RAID= >+ > FSTAB_FILE=/etc/fstab > > BIN_SPLASH=/bin/splash >@@ -292,10 +304,14 @@ > { > [ -z "$noraid" ] || return > >- if egrep -s '^/dev/md/?[0-9]+[ ]' "$FSTAB_FILE" | >- fgrep -qsv noauto; then >+ if egrep -s '^/dev/md/?[0-9]+[ ]' "$FSTAB_FILE" | fgrep -qsv noauto \ >+ || [ -x $PVSCAN ] && $PVSCAN grep ACTIVE | egrep -q '"/dev/md/?[0-9]"' \ >+ || [ -n "$FORCE_RAID" ]; then >+#### detects indirect using of raid arrays (e.g. via LVM) >+ > HAVE_RAID=1 > FindModule -md >+ if [ -f /etc/raidtab ]; then > for number in $(grep '^[ ]*raid-level' /etc/raidtab | > awk '{print $2}' |LC_COLLATE=C sort -u); do > case "$number" in >@@ -313,6 +329,38 @@ > ;; > esac > done >+ fi >+ >+#### detects arrays _without_ raidtab (e.g. created with mdadm). maybe rewrite to /proc/mdstat, heh? >+#### of cource, it will detect only running arrays >+ if [ -x $MDADM ]; then >+ for raidmod in `$MDADM --detail --scan|awk '{print $3}'|awk -F '=' '{print $2}'`; do >+ case "$raidmod" in >+ linear|raid[015]) >+ FindModule "$raidmod" >+ ;; >+ *) >+ echo "raid level $raidmod (in output of mdadm) not recognized" >&2 >+ ;; >+ esac >+ done >+ fi >+ >+#### and just for perfection: allow to _manually_ specify raid level, even if it is not running now. >+ case "$FORCE_RAID" in >+ [015]) >+ FindModule "raid$FORCE_RAID" >+ ;; >+ 4) >+ FindModule "raid5" >+ ;; >+ -1|linear) >+ FindModule "linear" >+ ;; >+ *) >+ echo "raid level $FORCE_RAID (in --force-raid) not recognized" >&2 >+ ;; >+ esac > fi > > if grep -s '^/dev/ataraid' "$FSTAB_FILE" |fgrep -qsv noauto; then >@@ -589,13 +637,18 @@ > [ -n "$1" ] && Exit "$1" || Exit > } > >-TEMP=`getopt -n "$PROG" -o fhvd -l help,version,verbose,debug,force,ifneeded,omit-scsi-modules,omit-ide-modules,omit-raid-modules,pause,image-version,nocompress,nobootsplash,strict,fstab:,before:,preload:,with:,after: -- "$@"` || Usage 1 >+TEMP=`getopt -n "$PROG" -o fhvd -l help,version,verbose,debug,force,ifneeded,omit-scsi-modules,omit-ide-modules,omit-raid-modules,pause,image-version,nocompress,nobootsplash,strict,fstab:,before:,preload:,with:,after:,force-raid: -- "$@"` || Usage 1 > eval set -- "$TEMP" > > img_vers= > force= > while :; do > case "$1" in >+ --force-raid) >+ shift >+ FORCE_RAID=$1 >+ shift >+ ;; > --fstab) > shift > FSTAB_FILE=$1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 4997
: 561 |
562
|
662