Commit Graph

26 Commits (73b9eaab1da87dce720d50b4ecd84dcc5a620b09)

Author SHA1 Message Date
NeilBrown 3b82ac1696 mdraid/mdraid_start.sh: tell mainloop if we make progress.
mdraid_start is a number of scripts which run after a timeout.
If it makes progress, it should tell the main loop so that it
knows that it is worth waiting a bit longer.

So in that case, create the initqueue/work file which the main loop
checks for.

Signed-off-by: NeilBrown <neilb@suse.de>
2015-03-26 16:38:36 +01:00
Harald Hoyer 967cc19ab1 remove all vim and emacs code format comments 2014-08-29 13:38:47 +02:00
Harald Hoyer cfb7410cd0 mdraid/mdraid_start.sh: remove mdmon workaround 2013-03-02 13:10:57 +01:00
Harald Hoyer e539fa9980 90mdraid: add "--offroot" support 2012-02-13 21:16:31 +01:00
Harald Hoyer e0e9221e23 90mdraid/mdraid_start.sh: fix path to md sysfs 2011-10-04 13:06:33 +02:00
Michal Soltys 9fc3f04520 90mdraid: adjust /dev/md loops
Include '_' to also handle old partitionable arrays (pre-2.6.28).

Signed-off-by: Michal Soltys <soltys@ziu.info>
2011-09-22 17:34:51 +02:00
Michal Soltys 66426469d0 90mdraid: fix/adjust force-run script
1) mdadm -As --auto=yes --run 2>&1 | vinfo (removed)

Currently such auto assembly will not complete or force-run partially
assembled arrays. It might assemble "concurrent" separate array and
force-run it, if possible (though the chances of suddenly showing
missing components in this scenario - a script run after udev timeout -
are pretty thin). See [1] for details. Also see #3 below.

2) mdadm -Is --run 2>&1 (removed)

This will only force-run native arrays - arrays in containers will not
be affected. See [1] for details. Also see #3 below.

3) mdadm -R run loop (implicitly handles #1 & #2)

This loop does everywthing that #1 & #2 are expected to do. Thus, the
above invocations are simply redundant and this is the most safe and
flexible option.

Also, it shouldn't be necessary to go under md/ directory, as those are
just symlinks to /dev/md[0-9]*.

Certain checks were changed to strict ones (array state, degraded state)
instead of relying on env tricks.

'cat' was added explicitly to installed programs (it has been used
implicitly in shutdown script either way)

4) mdmon bug

See [1] for details as well. In short - force-run arrays in containers
will not have mdmon started, so we do that manually.

5) stop/run queue magic

Also removed. mdadm -R will only cause change events to the array
itself, and they should not be an issue.

[1] http://article.gmane.org/gmane.linux.raid/35133

Signed-off-by: Michal Soltys <soltys@ziu.info>
2011-09-22 15:37:25 +02:00
Michal Soltys 9383421c1c 90mdraid: fix/adjust mdraid-cleanup
Stop both arrays (first pass) and containers (second pass).
Loop only over /dev/md[0-9]*
Call cleanup script only once, make sure it's after crypt cleanup.

Signed-off-by: Michal Soltys <soltys@ziu.info>
2011-09-22 15:37:25 +02:00
Harald Hoyer 3b403b32fc removed trailing whitespaces 2011-05-10 11:56:09 +02:00
Harald Hoyer fb59f4c967 get rid of absolute PATHs 2011-04-08 13:49:06 +02:00
Harald Hoyer 0b53ca70b6 Move all hooks to "$hookdir"
hookdir=/lib/dracut/hooks for now, to keep the root directory clean
2011-03-25 16:10:46 +01:00
Harald Hoyer c9f1e3d1f4 check for getarg() function before sourcing dracut-lib.sh
make use of "type getarg" to check, if we really need to source
dracut-lib.sh
2011-03-25 16:10:46 +01:00
Harald Hoyer cc02093d69 reformat source code
removed tabs and set indention to 4 spaces
added emacs and vi format headers
2010-09-10 15:34:36 +02:00
Harald Hoyer 3122e93350 mdraid: try to start degraded arrays in various ways 2010-08-02 14:18:00 +02:00
Harald Hoyer d7cc3f2ef5 mdraid: remove "local" 2010-08-02 14:17:59 +02:00
Harald Hoyer 56f184310a mdraid: try to start container childs manually with "mdadm -R" 2010-04-16 17:59:48 +02:00
Harald Hoyer 7a34efa5c4 md/dm/lvm: install pre-pivot cleanup hooks only if actually needed
- removed dmraid cleanup
- only call lvm cleanup, if no lvm.conf provided
- copy over lvm.conf by default
- add --nolvmconf --lvmconf parameters
2009-09-18 12:20:21 +02:00
Harald Hoyer 5c3f5746bb 90mdraid/65-md-incremental-imsm.rules: first set initqueue-finished,
then initqueue-settled

also introduce md_finished.sh to check for all md activity to be settled
2009-09-15 15:00:25 +02:00
Harald Hoyer 5a8d8dfbb6 switch modules to initqueue-finished 2009-09-15 11:17:22 +02:00
Harald Hoyer f25c9697f8 mdraid: stop udev queue until mdraid assembled 2009-09-08 15:30:17 +02:00
Harald Hoyer 273b197d75 added initqueue-settled and refactored code 2009-09-07 19:12:01 +02:00
Harald Hoyer 587b3497c1 mdraid_start.sh: fixed raid activation 2009-09-07 16:18:12 +02:00
Harald Hoyer f4c36b28f6 mdraid_start: check if raid is already active before trying to run it 2009-09-01 15:42:27 +02:00
Harald Hoyer f874872fc2 add command line parameters to specify exact actions for root assembly
LVM
       rd_NO_LVM
              disable LVM detection

       rd_LVM_VG=<volume group name>
              only activate the volume groups with the given name

crypto LUKS
       rd_NO_LUKS
              disable crypto LUKS detection

       rd_LUKS_UUID=<luks uuid>
              only activate the LUKS partitions with the given UUID

MD
       rd_NO_MD
              disable MD RAID detection

       rd_MD_UUID=<md uuid>
              only activate the raid sets with the given UUID

DMRAID
       rd_NO_DM
              disable DM RAID detection

       rd_DM_UUID=<dmraid uuid>
              only activate the raid sets with the given UUID
2009-07-15 18:27:21 +02:00
Hans de Goede 3564cb7c2c Make Intel BIOS raid use mdraid instead of dmraid when mdadm 3.0 is available
Intel BIOS raid is being shifted from dmraid to mdraid because mdraid offers
more features. So if an imsm metadata capable mdadm is present use mdraid
instead of dmraid for isw_raid_member's

This patch also adds code to mdraid_start.sh so that the raidsets
inside the imsm containers get started once udev is done probing
(doing this earlier leads to potentially degraded use of the sets and
 an unwanted resync).
2009-07-15 18:27:20 +02:00
Harald Hoyer 3076b67917 run a final "mdadm -IRs" after udev has settled 2009-07-13 18:19:32 +02:00