Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 670370 - sys-fs/mdadm - mdadm-last-resort prevents logins, brings down services
Summary: sys-fs/mdadm - mdadm-last-resort prevents logins, brings down services
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on: 670472
Blocks:
  Show dependency tree
 
Reported: 2018-11-05 14:02 UTC by Carsten Böcker
Modified: 2021-03-05 19:03 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info (emerge--info.txt,5.86 KB, text/plain)
2018-11-05 14:02 UTC, Carsten Böcker
Details
journalctl -b with loglevel debug (boot_failed.log,975.58 KB, text/x-log)
2018-11-05 14:04 UTC, Carsten Böcker
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Carsten Böcker 2018-11-05 14:02:53 UTC
Created attachment 554130 [details]
emerge --info

After upgrade to systemd-239-r2 it was impossible to login if I waited to long or partitions are not mounted and services not running if I login fast enough.

After searching a while I think I found the reason.

systemd has a job mdadm-last-resort which seems to be allways called and starts to unmount all mdadm-devices and also stopping nearly all services.

I found the solution in a debian-bug-report:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=892257

Applying the patch mentioned to /lib/systemd/system/mdadm-last-resort\@.service resolved the boot-problems.

Relevant part of the Patch is:
+-Conflicts=sys-devices-virtual-block-%i.device
++ConditionPathExists=!/sys/devices/virtual/block/%i/md/sync_action

Appended output of emerge --info and also output of journalctl -b with LogLevel=debug from a failed boot
Comment 1 Carsten Böcker 2018-11-05 14:04:08 UTC
Created attachment 554132 [details]
journalctl -b with loglevel debug
Comment 2 Mike Gilbert gentoo-dev 2018-11-05 15:36:21 UTC
This is a bug in sys-fs/mdadm. It has been fixed in the latest version (4.1).
Comment 3 Carsten Böcker 2018-11-05 15:54:56 UTC
Thanks for the information. I added ~adm64-keyword for mdadm and 
mdadm-last-resort\@.service has the change and everything works as expected.

Perhaps mdadm-4.1 should be stabilized ..... but perhaps I am the only one with systemd and mdadm so it is not necessary anymore
Comment 4 Mike Gilbert gentoo-dev 2018-11-05 16:01:25 UTC
Agreed, we should stabilize 4.1 or backport the change to the current stable version.
Comment 5 Carsten Böcker 2018-11-05 16:10:24 UTC
Yes backporting would be a very good Idea. I can confirm that this change is working with current stable mdadm, it is a small change and perhaps it saves someone some time to debug this startup-problems.