Linux and accidentally multipathed disks

August 24, 2007

We have one Dell 2950 that has a PERC 5/? RAID controller, bought as somewhat of an experiment, and Ubuntu 6.06 has an interesting problem with it: the kernel sees both the real disks and the PERC RAID devices (in that order), with the RAID devices being slightly smaller (the PERC controller seems to use a bit of space at the end of the disk, presumably to store its setup information.)

As you might expect, having the same disk visible through two paths gives you some interesting problems. Ironically, old-style Linux setups with hard-coded device names in places like /etc/fstab have the fewest issues, while programs that try to auto-recognize things generally went rather off the rails. There are a fair number of these places in a modern Linux system (not all of which Ubuntu uses):

  • auto-starting software RAID devices
  • auto-starting LVM volumes
  • mounting filesystems by label and enabling swap devices by label

(All of this assumes that you are exporting the disks from the PERC RAID controller as raw disks or at most mirrored disks; I suspect you would get even more fun if you had things in a RAID 5 disk.)

There are similar issues in too-clever installers; if you weren't careful, it was possible to accidentally cause the installer to write partition tables to both a raw disk and the RAID version of the disk. (And if you installed on a hardware RAID 1 disk, you had to adjust GRUB after the install to tell it what disk was BIOS disk 0.)

It has since struck me that a driver that could do this deliberately would make an interesting test case for actual multipath support in programs and systems. Of course, these days you can just construct that with iSCSI, since it is easy enough to export the same disks through multiple network interfaces (or IP aliases).

Written on 24 August 2007.
« The excessive cleverness of some people's reverse DNS
Weekly spam summary on August 25th, 2007 »

Page tools: View Source.
Search:
Login: Password:

Last modified: Fri Aug 24 23:23:14 2007
This dinky wiki is brought to you by the Insane Hackers Guild, Python sub-branch.