diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2005-03-24 11:34:15 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2005-03-24 11:34:15 +0000 |
commit | 503849761ece4d878a03044318f24f77939c4a25 (patch) | |
tree | 78aef94891afba5c887700d322b317cdd31a1638 /perl-install | |
parent | 66fd6d0c42ba6dc8cbf104613550334878ceba96 (diff) | |
download | drakx-503849761ece4d878a03044318f24f77939c4a25.tar drakx-503849761ece4d878a03044318f24f77939c4a25.tar.gz drakx-503849761ece4d878a03044318f24f77939c4a25.tar.bz2 drakx-503849761ece4d878a03044318f24f77939c4a25.tar.xz drakx-503849761ece4d878a03044318f24f77939c4a25.zip |
after "mdadm --assemble" there can be some mds in inactivate state busying devices, stopping them
Diffstat (limited to 'perl-install')
-rw-r--r-- | perl-install/raid.pm | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/perl-install/raid.pm b/perl-install/raid.pm index 3de848ee8..273aca6ca 100644 --- a/perl-install/raid.pm +++ b/perl-install/raid.pm @@ -152,13 +152,21 @@ sub inactivate_and_dirty { } sub active_mds() { - map { if_(/^(md\d+) /, $1) } cat_("/proc/mdstat"); + map { if_(/^(md\d+)\s*:\s*active/, $1) } cat_("/proc/mdstat"); +} +sub inactive_mds() { + map { if_(/^(md\d+)\s*:\s*inactive/, $1) } cat_("/proc/mdstat"); } sub detect_during_install { my (@parts) = @_; detect_during_install_once(@parts); detect_during_install_once(@parts) if active_mds(); #- try again to detect RAID 10 + + foreach (inactive_mds()) { + log::l("$_ is an inactive md, we stop it to ensure it doesn't busy devices"); + run_program::run('mdadm', '--stop', devices::make($_)); + } } sub detect_during_install_once { |