Bug#486012: raid(mdadm)+luks(crypt)+lvm shutdown

J.M.Roth jmroth at iip.lu
Thu Jun 12 23:03:34 UTC 2008


Package: mdadm
Version: 2.5.6-9
Severity: important

I'm not sure if these should be regarded as two issues. Please let me know.

First, we have in /etc/rc[06].d:
S50lvm 
S50mdadm-raid 
either:
- lvm is tried to be stopped first (as L precedes M), or
- lvm and mdadm-raid are stopped concurrently :-O
Neither is good.

Now, when all three (raid->luks->lvm) are used (in that order on top of each other), we have:
S48cryptdisks 
S50lvm 
S50mdadm-raid 
S59cryptdisks-early
MDs cannot be unmounted before cryptdisks are gone, and cryptdisks cannot go before lvm is gone
(Bug #363007 addressed a similar case between lvm and luks, which introduced the cryptdisks-early script.)

Suppose we move S50mdadm-raid to S60mdadm-raid, then on shutdown/reboot, we would have:
S48cryptdisks 
S49lvm 
S59cryptdisks-early
S60mdadm-raid 
which is fine in any case. This collides with S60umountroot, but that is no problem, as we can never really umount root, whether it is on an md-device or not. Of course, this does not work if the MD layer is used somewhere in between (like luks->raid->lvm), but who would want that? ;-)

This solution would remedy both problems. That is why I'm reporting this as a bug in mdadm, feel free to change this.

-- System Information:
Debian Release: 4.0
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.18-6-686
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)

Versions of packages mdadm depends on:
ii  debconf [debconf-2.0]  1.5.11etch1       Debian configuration management sy
ii  libc6                  2.3.6.ds1-13etch5 GNU C Library: Shared libraries
ii  lsb-base               3.1-23.2etch1     Linux Standard Base 3.1 init scrip
ii  makedev                2.3.1-83          creates device files in /dev

Versions of packages mdadm recommends:
ii  module-init-tools             3.3-pre4-2 tools for managing Linux kernel mo
ii  postfix [mail-transport-agent 2.3.8-2+b1 A high-performance mail transport 





More information about the pkg-mdadm-devel mailing list