Bug 785739

Summary: update mdadm/mdmon to work with systemd unrolling mounts to initramfs mount on shutdown
Product: [Fedora] Fedora Reporter: Jes Sorensen <Jes.Sorensen>
Component: mdadmAssignee: Jes Sorensen <Jes.Sorensen>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: agajania, agk, brian.broussard, bugzilla, dledford, fella, Jes.Sorensen, johannbg, lpoetter, mbroz, metherid, mschmidt, notting, pb, plautrba, rob, rtguille, shawn.p.huang, systemd-maint
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 771405 Environment:
Last Closed: 2012-05-04 16:12:43 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 752593, 771405    
Bug Blocks: 785737    

Description Jes Sorensen 2012-01-30 13:55:24 UTC
+++ This bug was initially created as a clone of Bug #771405 +++

+++ This bug was initially created as a clone of Bug #752593 +++

 2011-11-14 09:24:28 EST ---

Intel BIOS RAID is the common pattern here.
The problem is that Intel RAID is partially implemented in userspace (mdmonitor) and we kill all userspace processes before umounting.
There's been a discussion about this on systemd-devel recently. The fix will be to stop doing the mdmon takeover on boot. Instead the mdmonitor running from initramfs will be kept alive all the time. On shutdown we won't kill it and umount/remount will succeed.

.com on 2011-11-16 12:17:18 EST ---

(In reply to comment #7)
> Intel BIOS RAID is the common pattern here.
> The problem is that Intel RAID is partially implemented in userspace
> (mdmonitor) and we kill all userspace processes before umounting.
> There's been a discussion about this on systemd-devel recently. The fix will be
> to stop doing the mdmon takeover on boot. Instead the mdmonitor running from
> initramfs will be kept alive all the time. On shutdown we won't kill it and
> umount/remount will succeed.

I'm sorry, but where is this conversation at?  And since the fix is to stop mdmon from doing a takeover, maybe it should have involved the mdadm/mdmon maintainers?

--- Additional comment from kay on 2011-11-16 16:08:36 EST ---

(In reply to comment #11)
> I'm sorry, but where is this conversation at?

  http://www.mail-archive.com/systemd-devel@lists.freedesktop.org/msg03659.html

--- Additional comment from dledford on 2011-11-16 16:57:57 EST ---

I'm not entirely convinced by that thread that all things will be OK with systemd, but we can try and see.

--- Additional comment from dledford on 2012-01-03 11:06:16 EST ---

We need to know what versions of systemd under f15/f16/rawhide implement the mentioned changes (unrolling to the initramfs environment) so we can update mdadm/mdmon to match and include an appropriate Requires: systemd >= for each release to make sure compatibility is maintained.


-----------------------------------------------------------------------------

Needed actions for mdadm/mdmon:

1) Redefine mdmon directory so that it stores its pid file on storage that will remain even after the unroll to initramfs environment is complete (/run/mdadm is likely the right place)
2) Make sure that any SysV init script snippets or systemd service files that would restart mdmon via a takeover are no longer included in the package
3) Optionally, disable takeover operations in the mdmon binary itself just as a safety measure to avoid takeovers from the command line.

Comment 1 Jes Sorensen 2012-02-22 12:37:06 UTC
--offroot patches applied in mdadm-3.2.3-4