Phillip Susi | 2 May 2012 05:16
Favicon

dmraid incompatible with multipath-tools?


A user recently filed this bug report against ubuntu 12.04:

https://bugs.launchpad.net/ubuntu/+source/dmraid/+bug/992975

I believe this is the result of my patch fixing the testing support, and testing being enabled by default. 
With testing enabled, it looks like dmraid is finding the physical disks both on the normal scsi devnode,
and again on the dm devnode created by multipath-tools.

Why does multipath-tools create a dm mapping for each physical disk by default?  It seems like this is likely
to cause other problems as well.  I suppose that configuring dmraid with --disable-testing would resolve
this issue ( and it probably should be disabled by default if it doesn't play well with multipath-tools ),
but I'd like to understand multipath-tools better first and try to find a better solution.

Mark-Willem Jansen | 3 May 2012 23:12
Picon
Favicon
Gravatar

Changing from dm-raid45.ko to dm-raid.ko

Dear md/dm developers,

As I already pointed out on the ataraid-list, I have made a small patch for dmraid, so it will use the dm-raid target in state of the dm-raid45 target to handle raid4 and riad5 setups. This patch is added to this e-mail. To put it in context I use dmraid to detect my fakeraid, which is shared with a Windows OS.

There were some things I could not figure out and would like to ask three questions regarding the arguments passed to the module.

- First a more general question does it look okay to you what I have implemented?

- Second what to do with the offset variable that is given by the metadata on the disk? On the other dmraid related modules the disk information is passed like [dev][offset]. With the dm-raid module it changed to [meta-dev][data-dev]. In the patch I ignore the meta-dev and just pass "- path_to_dev" to the module. This will work as the offset given by the metadata on my disks are equal to zero, the same value that is automatically set by the module. What does one have to do if the metadata on the disk says that the offset is not equal to zero?

- Last I would like to build up the argument string more generally. Like concatenate the argument strings depending on some if statements, like

if(need_sync)
   num_arg += 2;
   arguments = arguments + sprintf("rebuild %d", rebuild_drive.data.i32);
fi

And then pass the final string using

p_fmt(lc, table, "0 %U %s %s %u %s", sectors, dm_type, raid_type, num_arg, arguments).

This will make the code easier to read and quicker to hack/change/code.

Thanks,

Mark-Willem Jansen
P.S.: The patch is a modified version of the one I send to the ataraid-list some weeks ago.
_______________________________________________
Ataraid-list mailing list
Ataraid-list <at> redhat.com
https://www.redhat.com/mailman/listinfo/ataraid-list

Gmane