Bug 704206

Summary: [RFE] Regrouped WWID
Product: Red Hat Enterprise Linux 6 Reporter: Frederic Hornain <fhornain>
Component: device-mapper-multipathAssignee: LVM and device-mapper development team <lvm-team>
Status: CLOSED NOTABUG QA Contact: Red Hat Kernel QE team <kernel-qe>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.3CC: agk, bmarzins, dwysocha, heinzm, mbroz, prajnoha, prockai, zkabelac
Target Milestone: rcKeywords: FutureFeature
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-05-12 14:53:42 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Frederic Hornain 2011-05-12 12:57:30 UTC
Description of RFE:

So, Imagine we have a server, with two fiber cards using multipath, connected to a LUN from the SAN.
The SAN is replicated of course, to the other datacenter. The replicated LUN is offline or readonly, and only activated if the first SAN fails.
Normal setup for all larger companies.

Imagine now that it is mandatory to swap between datacenters very regularly, including SAN.
This means the active LUN must be removed from the server, the new (replica) LUN discovered, and we have to do various rescan operations.
It's actually quite messy, applications must be stopped and filesystems unmounted, so the simplest and quickest action is to do a reboot.

So my question is, if it exists what options do I have to make this process more predictable and safe?
I know we can use software raid or LVM mirroring instead of the SAN mirroring, but for many reasons this isn't an option here.
We must use SAN mirroring.

I was wondering if it's possible to use device mapper multipath somehow, to get Linux to understand that the two LUNs are to be treated as one.
So, four paths (two of which always "broken") to one disk, instead of two paths to two disks.
Or, is there any other way to combine the two LUNs somehow (like with LVM or software raid, except without mirroring them).

For info z/os handles this with no downtime (only some "pause").
If Linux could somehow cope with the regular SAN swap gracefully, I think it might help raise the profile of Linux here.

So the idea will be to be able via the configuration to regroup the two wwid in one and let the system believe that one is a normal wwid.

Let me know if it exists other option or this enhancement is feasible. 

Thanks for your help and your time.

BR
Frederic

Comment 2 Ben Marzinski 2011-05-12 14:53:42 UTC
Well, there's a difference between doable and supported. device-mapper-multipath allows you to set a getuid_callout in /etc/multipath.conf. You could theoretically set this to anything that you like.  So you probably could merge your devices into one device.  The path checker and path priority functions are
DSOs, so if you need to make your own one of these so that you can have multipath setup the devices properly, that's more work, but again, it should be doable.

It's quite likely that the default path checkers will work fine.  You will probably need to make your own path_priority DSO, so that you can force the
difference LUNs into different path groups.

If the replicated LUN is read-only, instead of offline, you will likely have a problem of device-mapper creating a read-only map.

Again, I want to emphasize that this is not what device-mapper-multipath is for.  Once you mess with the getuid_callout so that you're lumping different LUNs together,  you need to be very sure that you won't ever link the wrong devices together.  Even still, I can't be certain that this will work correctly with your SAN mirroring setup, although I can't think of any problems off the top of my head.

A vastly better solution would be to get storage hardware that could present you will one LUN that was on top of the mirrored devices.