Understanding multipath and mountpoints

disklvmmultipath-storagepartitionrhel

I was just introduced to multipathing in our production environment and had never heard of the concept prior. After some digging I think I'm starting to get a handle on how the concept works in theory but I'm having some trouble extrapolating that to what I'm seeing on the box I'm working on.

From multipath -ll I get output like:

mpath0 (36000d3100088060000000000000000b9) dm-0 COMPELNT,Compellent Vol
size=60G features='1 queue_if_no_path' hwhandler='0' wp=rw
`-+- policy='round-robin 0' prio=1 status=active
  |- 0:0:0:0 sda 8:0   active ready running
  |- 0:0:1:0 sdd 8:48  active ready running
  |- 1:0:0:0 sdi 8:128 active ready running
  `- 1:0:1:0 sdl 8:176 active ready running

From fdisk -l I know that those are all 60GB disks, with the same partition setup:

Disk /dev/sda: 64.4 GB, 64424509440 bytes
255 heads, 63 sectors/track, 7832 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          13      104391   83  Linux
/dev/sda2              14        7832    62806117+  8e  Linux LVM

What is confusing to me though is how the partitions are actually mounted on the server:

$ df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
                       30G   26G  3.8G  87% /
/dev/mapper/mpath0p1   99M   49M   46M  52% /boot
tmpfs                  16G  232M   16G   2% /dev/shm
/dev/mapper/mpath2p1  493G  226G  242G  49% /u02

Just considering /boot for now: It is mounted to mpath0p1, I can see that much. But how does this correspond to the physical disk/LVM behind the multipath?

Best Answer

Your multipath'ed device is just an abstraction of multiple paths to one disk. So the corresponding relationship you are asking about is that the mpathN device is the same as the underlying device at the far end of whatever fabric you have.

As you saw, you can view the partition table on the mpath device and it's constituent members and see the same layout.

Some folks see a similarity between the concepts of multipath and RAID1. They are not related, but I've found it a useful comparison. The underlying devices of a multipath device are not duplicate copies as in RAID1. They are just parallel attachments to the same, typically remote, disk/LUN.

Regarding your question about how the partitions are mounted, they are mounted as they could be without multipath (assuming devices aren't hardcoded in fstab and lvm.conf). So you have mpath0p1 mounted at /boot. In your case -- if these devices were not managed by multipathd -- this is the same as mounting /dev/sda1 at /boot (and in your example, sdi1, sdd1, or sdl1 could be substituted for sda1). The difference is that if your fiber (or whatever) connection that presents sda1 is disconnected, your disk will still be accessible, using the multipath driver, via sdd, sdi and sdl.

In this case, you have the first partition of the remote disk mpath0 mounted at /boot, the first partition of disk mpath2 at /u02. The second partition in your fdisk output of sda is marked as an LVM physical partition. Presumably this contains the volume group VolGroup00 and in turn the logical volume LogVol00, which is mounted at /

Related Question