How safely partition disks in a multipath environment? (setup-storage)

Peter Bittner peter.bittner at thalesgroup.com
Fri Sep 10 11:34:24 CEST 2010


Hi Michael,

thanks for the hints.

> 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.

You're right. I struggled severely with the setup of my three nodes, the
disk order was random at every single boot time! Took me a whole day to
get all nodes installed and running with such a behaviour.  :-(

> > 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.

How can I install a hook for a specific profile which is executed before
setup-storage is executed? Unfortunately, I didn't find any hint about
when exactly hooks are executed (and how to control this) in the FAI
Guide.

I have created a hook in
var/lib/fai/config/hooks/disklist.MULTIPATH.source (an excutable Bash
script which displays the content of $disklist and some other stuff
only, for the moment), but this hook is not executed before
setup-storage. Classes are defined at the point when setup-storage is
executed, so it should be okay to use a class name other than DEFAULT.

Is there a specific naming convention which I got wrong?

Peter


More information about the linux-fai mailing list