Bug 484258

Summary: service iscsi stop: ERROR: Module iscsi_sfnet is in use
Product: Red Hat Enterprise Linux 4 Reporter: Ray Van Dolson <rvandolson>
Component: iscsi-initiator-utilsAssignee: Mike Christie <mchristi>
Status: CLOSED WONTFIX QA Contact: Martin Jenner <mjenner>
Severity: medium Docs Contact:
Priority: low    
Version: 4.7CC: coughlan, iannis, mchristi, rayvd
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-06-20 16:09: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:
Embargoed:

Description Ray Van Dolson 2009-02-05 17:30:07 UTC
Description of problem:
I have a 4TB LUN being exported by STGT on RHEL5 (scsi-target-utils-0.0-5.20080917snap.el5) and being mounted by an initiator on RHEL 4.7.

This LUN is then mapped (from /dev/sdc on the initiator) to a logical volume, set up with ext3 and mounted as /storage.

After several days, I unmounted /storage and ran 'service iscsi stop' and received the following error:

Searching for iscsi-based multipath maps
Found 0 maps
Stopping iscsid: iscsid not running
Removing iscsi driver: ERROR: Module iscsi_sfnet is in use
                                                           [FAILED]

At this point there doesn't seem to be any way to correct stop and reload iSCSI so that the initiator will work properly again without rebooting.

I can reconnect to the target, but get lots of errors relating to a dead device, etc, and the LVM I created appears to be corrupted (although maybe it will be fine if I reboot my initiator machine).

If I try to remove the offending module manually:

# rmmod iscsi_sfnet
ERROR: Module iscsi_sfnet is in use

How can I determine what is making use of iscsi_sfnet?  lsmod doesn't seem to show anything.  I've run lvchange -a n on the logical volume (this gave an error).

I don't think I should need to reboot in this scenario.

Version-Release number of selected component (if applicable):
iscsi-initiator-utils-4.0.3.0-7

How reproducible: 
So far every time.. difficult to test as it's on a production machine.


Steps to Reproduce:
1. Export LUN from STGT on another machine.
2. Connect to LUN via RHEL 4.7 initiator.
3. Create LVM on LUN
4. Create filesystem on LUN
5. Mount
6. Wait
7. Unmount filesystem
8. Attempt to stop iscsi services.
  
Actual results:
Module errors listed above.

Expected results:
iscsi initiator shuts down properly and unloads itself.

Additional info:
Maybe I should have used the iscsi-session-kill command first?

Comment 1 Ray Van Dolson 2009-02-05 17:36:23 UTC
Also have opened SR #1892946 for this.

Comment 2 Ray Van Dolson 2009-02-09 18:33:31 UTC
LVM was hanging onto the device:

  # dmsetup remove FTP1-LogVol00

Allowed me to successfully unload the iscsi modules and get things going again without a reboot.

Please close this NOTABUG.

Comment 4 Jiri Pallich 2012-06-20 16:09:42 UTC
Thank you for submitting this issue for consideration in Red Hat Enterprise Linux. The release for which you requested us to review is now End of Life. 
Please See https://access.redhat.com/support/policy/updates/errata/

If you would like Red Hat to re-consider your feature request for an active release, please re-open the request via appropriate support channels and provide additional supporting details about the importance of this issue.