View previous topic :: View next topic |
Author |
Message |
Zarhan Veteran
Joined: 27 Feb 2004 Posts: 1016
|
Posted: Sat Jan 26, 2013 9:13 am Post subject: |
|
|
I couldn't get the shutdown script to work. It just returns with an error like this:
Code: | mdadm: Error waiting for /dev/md/STRIPE_0 to be clean
mdadm: Error waiting for /dev/md/RAID_5_0 to be clean
|
However, I noticed that the system *automatically* sets the arrays to be clean if there has been no writes for a while. Hence, I replaced the mdadm-shutdown script with following instead, and haven't had any issues. Hope this helps for anyone else having same issues. Maybe this script could be added to the bug as well...
(Previously I used dmraid, and I just migrated from that to mdadm. My mdadm is version 3.2.6.)
Code: | #!/sbin/runscript
depend()
{
after mount-ro
}
start()
{
ebegin 'Waiting for RAID array to settle'
for i in 1 2 3 4 5 6 7 8 9 10 ; do
if mdadm --detail -vv --scan | grep "State :" | grep -v "clean" > /dev/null; then
echo -n '.'
sleep 3
else
break
fi
done
eend $?
}
|
|
|
Back to top |
|
|
danomac l33t
Joined: 06 Nov 2004 Posts: 881 Location: Vancouver, BC
|
Posted: Mon Feb 04, 2013 10:58 pm Post subject: |
|
|
When I was communicating on the linux-raid list, Neil was lamenting on making mdadm mark the arrays clean automatically. It's very possible new versions of mdadm do this.
I'm going to mass update my computer over the next while and post updates. |
|
Back to top |
|
|
danomac l33t
Joined: 06 Nov 2004 Posts: 881 Location: Vancouver, BC
|
Posted: Thu Feb 14, 2013 10:44 pm Post subject: |
|
|
I spent some time looking into this today.
It turns out that the shutdown script is still needed even though it issues a warning saying it didn't fully stop the array.
If you remove it from the shutdown runlevel it will still mark the array as dirty when you reboot (causing a rebuild.)
I've modified the initscript to suppress these warnings (note: it suppresses all warnings, so use at your own risk.) This change is in the first post.
Note: I'm using mdadm 3.2.6. |
|
Back to top |
|
|
dobbs Tux's lil' helper
Joined: 20 Aug 2005 Posts: 105 Location: Wenatchee, WA
|
Posted: Mon Mar 04, 2013 9:35 am Post subject: |
|
|
Updated my system today (after not booting Gentoo for a while), and the update to gentoo-source-3.7.10 seems to have fixed my 2nd problem. It at least boots without requiring my presence now. For what it's worth, I did upgrade to mdadm-3.2.6 when you suggested that, but it didn't help.
Haven't tested the resync problem yet.
Addendum: Come to think of it, I was still at udev-171 back in December, and updated to udev-197 today. Maybe that has something to do with it? |
|
Back to top |
|
|
danomac l33t
Joined: 06 Nov 2004 Posts: 881 Location: Vancouver, BC
|
Posted: Mon Mar 11, 2013 3:37 pm Post subject: |
|
|
dobbs wrote: |
Addendum: Come to think of it, I was still at udev-171 back in December, and updated to udev-197 today. Maybe that has something to do with it? |
Yes, that could possibly be it. Although I did have a problem with auto assembly until I used newer version of mdadm than what genkernel offered. |
|
Back to top |
|
|
leo.the_zoo Apprentice
Joined: 04 Jul 2005 Posts: 160 Location: Poland
|
Posted: Sat Aug 02, 2014 12:37 am Post subject: |
|
|
Would you care to update the guide using Grub2 which is currently the default bootloader? In theory it should be simpler than with its legacy counterpart. |
|
Back to top |
|
|
danomac l33t
Joined: 06 Nov 2004 Posts: 881 Location: Vancouver, BC
|
Posted: Sun Aug 10, 2014 3:46 pm Post subject: |
|
|
I currently don't have any machines with EFI, so I have no reason to move off of grub legacy, and given my first few experiences with Grub2 on other distros, I'm not going to mess with it. "If it ain't broke, don't fix it.(tm)" |
|
Back to top |
|
|
PF4Public Tux's lil' helper
Joined: 28 Jan 2019 Posts: 104
|
Posted: Sun Sep 27, 2020 10:24 pm Post subject: |
|
|
danomac Thank you very-very much for
Quote: | 4. Set up gentoo to shut down mdadm properly. |
I recently installed Gentoo on a fakeraid and was helplessly fighting resyncs upon each reboot and couldn't find a solution, I almost gave up. But thanks to you, it is now functioning properly. |
|
Back to top |
|
|
|