How safely partition disks in a multipath environment? (setup-storage)
Peter Bittner
peter.bittner at thalesgroup.com
Thu Aug 26 11:52:45 CEST 2010
Hi,
we are running an Intel Modular Server with Debian Lenny. The Modular
Server is a beast which provides virtual disks and redundant storage
controllers to access the disks. As a result on Linux you see 2 drives
(e.g. /dev/sda, /dev/sdb) when you have just configured one. This is
because they represent two paths to one and the same disk, however only
one of them can be accessed normally, accessing the other will give you
disk read errors.
Here is some background reading about multipathing on Modular Server:
http://www.linuxquestions.org/questions/blog/bittner-195120/multipath-on-debian-lenny-and-intel-modular-server-mfsys25-3072/
My "problem" with FAI now is that partitioning fails for all disks
(paths, really) that cannot be accessed (which is normal and okay), and
the good point about FAI is that (for reasons I have not figured out
yet) it simply skips any unreadable disk and continues with the next one
available if (and only if) you haven't specifically specified that disk
in your disk_config/<FAICLASS> file.
Example: We set up two virtual disks (getting 4 paths /dev/sda
through /dev/sdd as disk devices), and we use FAI's default partitioning
from file disk_config/FAIBASE. In other words, we don't specify what
setup-storage should do with the second disk (which appears to be disk4
= /dev/sdd on the server).
disk_config disk1 disklabel:msdos
primary / 85%- ext3 rw,noatime,errors=remount-ro
createopts="-b 2048" tuneopts="-c 0 -i 0"
primary swap 200-1000 swap rw
Unfortunately, if we specify the second disk too it must match exactly
the disk which is accessible, otherwise partitioning of that disk will
fail and the FAI installation will be aborted/halted. In our
setup /dev/sda = disk1 and /dev/sdd = disk4 are accessible, so the
following partition configuration will result in failure: (In order to
make partitioning work "disk2" must be replaced by "disk4")
# System disk
disk_config disk1 bootable:1 disklabel:msdos
primary / 0- ext3 rw,noatime,errors=remount-ro
createopts="-b 2048" tuneopts="-c 0 -i 0"
primary swap 512 swap rw
# Database disk
disk_config disk2
primary /var/db 100% ext3 rw,noatime,errors=remount-ro
createopts="-b 2048" tuneopts="-c 0 -i 0"
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).
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)
Thanks in advance for any advice!
Peter
More information about the linux-fai
mailing list