forked from pool/mdadm
- udev-rules.fix: make sure systemd doesn't try
to mount array before it is fully assembled. (bnc#752869) OBS-URL: https://build.opensuse.org/package/show/Base:System/mdadm?expand=0&rev=59
This commit is contained in:
parent
7bd795bf3e
commit
0650dcc2aa
@ -1,3 +1,10 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu May 24 01:52:37 UTC 2012 - nfbrown@suse.com
|
||||||
|
|
||||||
|
- udev-rules.fix: make sure systemd doesn't try
|
||||||
|
to mount array before it is fully assembled.
|
||||||
|
(bnc#752869)
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Tue May 22 05:15:52 UTC 2012 - nfbrown@suse.com
|
Tue May 22 05:15:52 UTC 2012 - nfbrown@suse.com
|
||||||
|
|
||||||
|
@ -36,6 +36,7 @@ Source4: boot.md
|
|||||||
Source5: mkinitrd-setup.sh
|
Source5: mkinitrd-setup.sh
|
||||||
Source6: mkinitrd-boot.sh
|
Source6: mkinitrd-boot.sh
|
||||||
Source7: mdadm.cron
|
Source7: mdadm.cron
|
||||||
|
Patch1: udev-rules.fix
|
||||||
|
|
||||||
%description
|
%description
|
||||||
Mdadm is a program that can be used to control Linux md devices. It is
|
Mdadm is a program that can be used to control Linux md devices. It is
|
||||||
@ -44,6 +45,7 @@ programs but with a very different interface.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -a1
|
%setup -q -a1
|
||||||
|
%patch1 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
make %{?_smp_mflags} CC="%__cc" CXFLAGS="$RPM_OPT_FLAGS -Wno-error"
|
make %{?_smp_mflags} CC="%__cc" CXFLAGS="$RPM_OPT_FLAGS -Wno-error"
|
||||||
|
28
udev-rules.fix
Normal file
28
udev-rules.fix
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
From 339b77467a7ad5e5354b5ab0542f8148b18c898c Mon Sep 17 00:00:00 2001
|
||||||
|
From: NeilBrown <neilb@suse.de>
|
||||||
|
Date: Thu, 24 May 2012 11:49:49 +1000
|
||||||
|
Subject: [PATCH] udev-rules: prevent systemd from mount devices before they
|
||||||
|
are ready.
|
||||||
|
|
||||||
|
When an array is assembled incrementally, systemd might see it
|
||||||
|
before it is ready, try to mount it, fail, and give up.
|
||||||
|
Result is that array doesn't get mounted.
|
||||||
|
|
||||||
|
If we ask udev to tell systemd that it isn't ready yet in this
|
||||||
|
case, systemd waits until it is ready, and all are happy.
|
||||||
|
|
||||||
|
Signed-off-by: NeilBrown <neilb@suse.de>
|
||||||
|
|
||||||
|
diff --git a/udev-md-raid.rules b/udev-md-raid.rules
|
||||||
|
index f564f70..814c897 100644
|
||||||
|
--- a/udev-md-raid.rules
|
||||||
|
+++ b/udev-md-raid.rules
|
||||||
|
@@ -28,7 +28,7 @@ ENV{DEVTYPE}=="partition", GOTO="md_ignore_state"
|
||||||
|
# never leave state 'inactive'
|
||||||
|
ATTR{md/metadata_version}=="external:[A-Za-z]*", ATTR{md/array_state}=="inactive", GOTO="md_ignore_state"
|
||||||
|
TEST!="md/array_state", GOTO="md_end"
|
||||||
|
-ATTR{md/array_state}=="|clear|inactive", GOTO="md_end"
|
||||||
|
+ATTR{md/array_state}=="|clear|inactive", ENV{SYSTEMD_READY}="0", GOTO="md_end"
|
||||||
|
LABEL="md_ignore_state"
|
||||||
|
|
||||||
|
IMPORT{program}="/sbin/mdadm --detail --export $tempnode"
|
Loading…
Reference in New Issue
Block a user