[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[dm-devel] Research for possible new feature: Rescanning LUN mappings through multipath-tools

Hi all,

There have been a few requests within my organization to add more comprehensive capabilities to rescan for new LUN mappings, remapped LUNs, and unmapped LUNs when running DM-MP, and I or someone from my group will begin working on this soon.  I wanted to get some opinions from the community before we began work.

Rescan-scsi-bus.sh currently provides some of this functionality, but it does not handle every case.  
- Case 1:  Newly mapped LUNs
Issue a scan on each SCSI host and look for new LUNs, then create new multipath devices for them.
- Case 2:  Remapped LUNs
Get the current WWID, if it is different than what the multipath device previously reported, the LUN was remapped.
A special case that provides special amount of grief is the case where the well-known LUN occupies LUN 0, then the user maps a volume in the same place.  We should be able to detect this by testing the WWID of each LUN 0 that has no sd node.
- Case 3:  Unmapped LUNs
Get the current WWID, depending on the value (scsi_id reports 1 when I try this with NetApp E-Series storage) we should be able to know that the LUN was unmapped.
- Case 4:  Detect LUN capacity changes
Should be easy enough to detect through sysfs, we just should have to reload the multipath device to reflect the change.

My rationale is that this should end up with multipath-tools, because it already stores information about the WWID of the LUN, and a method with which to get the WWID, so we can detect that the LUN has been re-mapped/unmapped.  More specifically, I was wondering if anyone has strong opinions about whether this should all be done in C (as to leverage a lot of the functionality of multipath-tools, including the defined methods to get the WWID), or in a script.  Are there any concerns about including shell scripts with multipath-tools?

Comments are welcome :)


Sean Stewart
APG Linux Failover
316.636.8032 Direct Phone
316.295.0116 Mobile Phone
Sean Stewart netapp comĀ 

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]