Bug#678693: Please add a /usr/share/initramfs-tools/scripts/local-block/ script

Goswin von Brederlow goswin-v-b at web.de
Tue Jun 26 13:09:19 UTC 2012

Ritesh Raj Sarraf <rrs at researchut.com> writes:

> On Tuesday 26 June 2012 02:26 PM, Goswin von Brederlow wrote:
>>>     One of the problems in current initramfs-tools is with devices that take
>>> >     a long time to be detected. My experience with external enclosures was
>>> >     that detecting the drives takes rather long, just like USB takes it
>>> >     time.
>>> >
>>> >
>>> > Yes. The remote SAN devices have timing issues. And we try best to handle that
>>> > situation. I still think that is not the use case you have.
>>> > And if you have issues with a remote SAN device setup, please do report it.
>>> > Â 
>> That is exactly the issue the patch addresses. In your multipath
>> local-top script you have:
>> verbose && log_begin_msg "Loading multipath modules"
>> for module in ${MP_MODULES}; do
>>   if modprobe "$module"; then
>>     verbose && log_success_msg "loaded module ${module}."
>>   else
>>     log_failure_msg "failed to load module ${module}."
>>   fi
>> done
>> verbose && log_end_msg
>> verbose && log_begin_msg "Discovering multipaths"
>> /sbin/multipath -v $VERBOSITY
>> verbose && log_end_msg
>> if [ -x /sbin/kpartx -a -x /sbin/dmsetup ]; then
>>     /sbin/dmsetup ls --target multipath --exec "/sbin/kpartx -a -p -part" >/dev/null
>> fi
>> Where do you handle the situation that a device takes longer to apear?
>> By the time that script runs the remote device might not yet have
>> appeared and then multipath can't setup its part.
>> Note that the problem isn't the multipath devices not appearing on time
>> but the underlying devices you want to multipath taking too long. There
>> is nothing multipath can do to make them appear, their detection is
>> generally asynchronous.
>> As an example we have some external raid enclosures here that take over
>> 3 minutes to boot. So after a power loss the servers always boot without
>> the enclosures and minutes later they show up all of a sudden and only
>> then can configure their multipath. Luckily we boot from local disks so
>> that isn't as big a problem.
>> If we had to boot from multipath then we would need to set
>> rootdelay=200, causing every boot to just wait for 3 minutes, even on
>> warm reboots where that is totaly unnecessary. The initramfs patch I
>> made allows to wait until the devices appear. If that happens in 1s then
>> the boot continues after 1s.
> In initrd, yes, we might not be waiting.
> I did not see any patch in the bug report. Can you share it?

The patch is for initramfs-tools:


More information about the pkg-lvm-maintainers mailing list