On 13/08/12 12:43, Michael Tokarev wrote:
> On 13.08.2012 14:10, Miquel van Smoorenburg wrote:
>> Package: mdadm
>> Version: 3.2.5-1
>> Severity: serious
>> Tags: patch wheezy sid
>>
>> The initramfs hook supplied by mdadm doesn't install mdmon. Also, mdmon
>> is not included in the .udeb for the installer.
>>
>> This means that if you have an array with external metadata (ddf or,
>> more widely used, imsm - Intel Matrix Raid) that it will come up
>> readonly. This causes the installer to hang or the system not being
>> able to boot if root is on that array.
> 
> I'm not sure this is the right course of actions -- speaking of the
> initramfs part, not about the d-i part.
> 
> Why the system is not being able to boot if root is on such an array?


I disagree with Michael, and agree with Miquel. mdmon is needed in the
initramfs and I wanted to propose it's inclusion myself as well.

Reading mdmon(8) section START UP AND SHUTDOWN, I am convinced that
mdmon is required when rootfs is on an external metadata array. Does it
make sense to you, Michael?


>> The attached patch does a couple of things:
>>
>> - it makes sure mdadm is included in the initramfs and the udeb package

s/mdadm/mdmon/ as mdadm was available already ;-)

> 
> Sure it is needed in the d-i (udeb), because d-i have to write the
> system to it.  But I'm not convinced it is needed in the initramfs.
> 

ok.

>> - it adds a mdadm-waitidle script that runs just before reboot/halt. For all
>>   arrays that are still running, it sets safe_mode_delay to a low version,
>>   sets sync_action to idle, and waits for the array(s) to go idle.
>>   This is needed so that the array is clean, otherwise it will start
>>   to resync at the next boot.
> 
> This is risky - we may never finish shutdown.  This is especially risky
> for things like raid - eg, stalled raid (resync) thread (we've seen
> these more than once) -- in such cases current code will shut down,
> but with this wait it wont anymore.  Especially useful for remote
> systems.  Such an approach should be tested with extra care, I'm
> not sure we have resources to do that for wheezy.  Generally it is a
> good idea I think.
> 

Agree, sounds risky but doing this right is worth the effort.

>> - it adds 2 lines of code to mdmon.c so that it symlinks its pidfile
>>   into /run/sendsigs.omit.d - mdmon should not be killed at shutdown,
>>   we still need it after the rootfs has been unmounted.
> 
> And I'm not sure this is needed, either: it can trivially be done in
> the initscript.
> 

No patching of mdmon is required. We simply need MDMON_DIR configure
option to be set to /run/sendsigs.omit.d.


-- 
Regards,
Dmitrijs.


-- 
To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to