Hi Peter, [...] (multipath setup)
>
> Now, my fear is that on other (hardware) setups this order may be
> different (e.g. disk1 and disk3 could be the ones that are accessible),
> and clearly, if a storage controller has a defect this may also affect
> which paths are accessible (could then be disk2 and disk3).
>
I do have a multipath setup for some of my servers as well (although hardware
different from yours) and I think you should be aware that disk ids will likely
change from reboot to reboot, and not only on different hardware or defects.
> Is there a "flexible" way to ensure that "the next readable" disk is
> being taken for partitioning? (i.e. "disk2" should mean "next
> _accessible_ disk", or so)
>
I think the most promising way would be a hook that modifies the contents of the
"disklist" variable. By default, its contents is determined by reading
/proc/partitions in FAI's disk-info script. If you add a hook
partition.DEFAULT.source that changes $disklist in an appropriate way I guess
you should readily get some reliable results.
Maybe the following code helps to get started, although I'm using it in a
totally different context:
san="`multipath -ll | grep ready | awk '{ print $3 }' | sed 's#^#/dev/#' | tr
'\n' ' '`"
Hope this helps,
Michael
pgpLaVZMFjWjq.pgp
Description: PGP signature
