Bug 470710 - [NetApp 5.5 bug] iscsiadm rescan doesn't support lun delete(unmap) updation functionality.
[NetApp 5.5 bug] iscsiadm rescan doesn't support lun delete(unmap) updation f...
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: kernel (Show other bugs)
All Linux
high Severity high
: rc
: 5.5
Assigned To: Mike Christie
Red Hat Kernel QE team
: OtherQA
Depends On:
Blocks: 533192 533941
  Show dependency treegraph
Reported: 2008-11-09 02:27 EST by nandkumar mane
Modified: 2010-01-27 12:19 EST (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2010-01-27 12:19:02 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description nandkumar mane 2008-11-09 02:27:02 EST
Description of problem:
iscsiadm's -R option does rescan for addition of luns on host. If you unmap one of the mapped lun, iscsiadm rescan doesn't have intelligence to sense unmapped lun and remove its corresponding device entry.

Version-Release number of selected component (if applicable):

How reproducible:
Very reproducible

Steps to Reproduce:
1.I am assuming you have properly configured iscsi setup on which 3-4 luns are mapped from controller to host.
2.unmap one of the lun from controller.
3.Now run iscsiadm -m session -R
4.iscsiadm doesn't sense unmapped lun.
Actual results:
After doing rescan, unmapped device entry doesn't get deleted from host.

Expected results:
Device entry for unmapped luns should be removed from host.

Additional info:
After looking into code I found that iscsiadm rescan is only implemented for lun addition functionality. device deletion is not yet implemented.
Comment 1 Mike Christie 2008-11-10 13:37:34 EST
iscsiadm uses the kernel interface for rescanning which does not remove devices. It only adds them as you saw. I am changing the component to reflect that we need to modify the kernel.

We can shoot for RHEL 5.4. I am not sure if I will be able to complete it at this time though. Closer to RHEL 5.4 time I will know for sure. If you guys have the resources you can add it upstream and I can port it for you. That would speed things up.
Comment 2 RHEL Product and Program Management 2009-02-16 10:14:17 EST
Updating PM score.
Comment 3 Mike Christie 2009-02-25 22:26:18 EST
Conditional NAK: UPSTREAM

I do not think I have time for this because of offload and fcoe, but we might be able to get it done. If we get it upstream then the port should not be too hard. The more difficult issue may be to backport refcounting and state machine fixes that would probably be needed since we will probably be remove devices that are accessed by someone and so the scsi device refcuont would be greater than 0.
Comment 4 nandkumar mane 2009-05-23 17:42:39 EDT
Mike, I've started working on this patch.

One question : Will we have rescan-scsi-bus.sh script included in RHEL5.4 sg3 utils package?
Comment 5 Mike Christie 2009-05-26 11:27:57 EDT
(In reply to comment #4)
> One question : Will we have rescan-scsi-bus.sh script included in RHEL5.4 sg3
> utils package?  

I am adding Rob Evers who is working on that.

I guess if we are adding it, then we could just use that for rescanning.
Comment 7 RHEL Product and Program Management 2009-10-27 18:30:49 EDT
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
Comment 8 Andrius Benokraitis 2009-12-01 16:52:44 EST
Looking back at the comments, who has the ball here?
Comment 9 Mike Christie 2009-12-03 01:01:22 EST
I think we could probably just kill this for RHEL 5. For RHEL 5, maybe we should just have users us the rescan bus script. What do others think?
Comment 10 Andrius Benokraitis 2009-12-14 11:23:37 EST
NetApp - what do you think re: Comment #9?
Comment 11 nandkumar mane 2009-12-14 23:36:54 EST
I second your opinion. In fact We are asking customers to use rescan bus script to do addition/deletion of lun on RHEL5.4 host.
Comment 12 Andrius Benokraitis 2010-01-27 12:19:02 EST
Closing based on comments.

Note You need to log in before you can comment on or make changes to this bug.