Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
HOWTO: Installing on Intel (imsm) fakeraid using mdadm
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2  
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
Zarhan
l33t
l33t


Joined: 27 Feb 2004
Posts: 994

PostPosted: Sat Jan 26, 2013 9:13 am    Post subject: Reply with quote

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
View user's profile Send private message
danomac
l33t
l33t


Joined: 06 Nov 2004
Posts: 881
Location: Vancouver, BC

PostPosted: Mon Feb 04, 2013 10:58 pm    Post subject: Reply with quote

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
View user's profile Send private message
danomac
l33t
l33t


Joined: 06 Nov 2004
Posts: 881
Location: Vancouver, BC

PostPosted: Thu Feb 14, 2013 10:44 pm    Post subject: Reply with quote

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
View user's profile Send private message
dobbs
Tux's lil' helper
Tux's lil' helper


Joined: 20 Aug 2005
Posts: 105
Location: Wenatchee, WA

PostPosted: Mon Mar 04, 2013 9:35 am    Post subject: Reply with quote

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
View user's profile Send private message
danomac
l33t
l33t


Joined: 06 Nov 2004
Posts: 881
Location: Vancouver, BC

PostPosted: Mon Mar 11, 2013 3:37 pm    Post subject: Reply with quote

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
View user's profile Send private message
leo.the_zoo
Apprentice
Apprentice


Joined: 04 Jul 2005
Posts: 160
Location: Poland

PostPosted: Sat Aug 02, 2014 12:37 am    Post subject: Reply with quote

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
View user's profile Send private message
danomac
l33t
l33t


Joined: 06 Nov 2004
Posts: 881
Location: Vancouver, BC

PostPosted: Sun Aug 10, 2014 3:46 pm    Post subject: Reply with quote

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
View user's profile Send private message
PF4Public
Tux's lil' helper
Tux's lil' helper


Joined: 28 Jan 2019
Posts: 103

PostPosted: Sun Sep 27, 2020 10:24 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum