[Pkg-sysvinit-devel] Advanced Startup/Shutdown with Multilayered Block Devices and Related Issues

Goswin von Brederlow goswin-v-b at web.de
Wed Jun 30 15:00:32 UTC 2010


Daniel Pittman <daniel at rimspace.net> writes:

> Petter Reinholdtsen <pere at hungry.com> writes:
>> [Goswin von Brederlow]
>>
>>> There is one big problem with an event based startup. Specifically for
>>> raid1/4/5/6 devices. Those you can use just fine with missing devices but
>>> the boot should really wait for all device to be present.
>>
>> This problem is not specific for event based startup.  It also exist with
>> the current sequence based boot system.  There are heaps of setups that fail
>> to boot because the required are missing when the init.d script using them
>> are running during boot.  The only known solution today is to add a long
>> delay during boot to try to increase the chance of having all devices
>> available when they are needed. :(
>>
>>> The big question is how long do you wait?
>
> Please, for the love of everything sane, ask a low priority debconf question
> with a default of five minutes[1] — and display a note in the initramfs about
> what you are waiting for, and how long.

For most people that is about 4 minutes and 30 seconds too long.

And don't forget that this needs to be multiple times. Usualy once in
the initramfs and once in the real system. But if devices are really
multilayered you can end up having to do this for every layer.

The multipath waits for both its paths. Then the raid waits for all its
devices. Then the drbd waits for both its other hosts to boot. That is
15 minutes already in case of a bad error.

> (Actually, the countdown from the DRBD init script, including the prompt to
>  override the configured wait time, would be absolutely wonderful to have
>  here, since it gives excellent feedback, a good UI to bypass things, and is
>  generally quite informative.)

Which I think is a verry good compromise. As long as you have a keyboard
to press ctrl-c. :)

One small problem though. This requires that you know beforehand what
devices to expect at all. For event based mdadm startup you afaik need
no config at all. It will detect any device ment for the local host and
assemble it. So even if all devices for md0 did show up and md0 was
started successfully you still don't know if the devices for md1 are all
still coming. You don't know if there is supposed to be a md1.

>>> How do you detect that a device is actually broken/missing and its event
>>> will never come? You can't even check if there are any pending events
>>> (udev-settle) because the device might be slow to start (e.g. a disk on a
>>> SATA port multiplier or SCSI with delayed spin up or external enclosures)
>>> and no event has yet been initialized for it.
>>
>> Yeah.  With the current Linux kernel, I am not aware of any way to
>> answer these questions. :(
>
> You can't answer them, ever, for some busses: there is no possible way to
> determine that you have completed enumeration of a USB bus.  ATAoE, and iSCSI
> present similar problems.  It just can't be done.
>
> So, eventually you have to accept that you either wait, or give up, for as
> long as the owner of the machine will accept.
>
> (Especially if what you are waiting for is, oh, the second machine in your
>  DRBD pair to boot.  Not that I have an agenda or anything. ;)
>
>         Daniel
>
> Footnotes: 
> [1]  Long enough for most things to boot, short enough that an admin who can't
>      read will not go entirely crazy waiting.

Which might have physical rather than mental reasons.

MfG
        Goswin



More information about the Pkg-sysvinit-devel mailing list