I'm fairly new at this, please pardon my ignorance. I have a backup drive on a NAS that I need to disconnect from iSCSI in order to increase it's size. I've gone into Disk Management, made sure the drive is offline as well as ensuring the data buffered is not committed to the disconnect. When I try to disconnect in iSCSI it throws the "The session cannot be logged out since a device on that session is currently being used."
2 Answers
as explained on this forum (and it was also my case), even when disk was offline, task manager (Windows 10) was monitoring disk performance, so closing Task Manager helped :)
Other times if I can't find the cause, it helped to disconnect the client (initiator) computer totally from network (wired and wifi just in case), and wait a moment, and then somewhere around clicking disconnect I saw the status "Reconnecting..." so disconnect succeeded.
This helps you avoid stopping the iSCSI target service on the server, because that would also disconnect other clients (initiators) - but should also help anyway :)
In terms of other guesses, this one from March 16, 2018 did not receive an answer as of December 2021 https://social.technet.microsoft.com/Forums/azure/en-US/0691e6ce-0ecc-4b3a-85b8-27b0f1fe795c/iscsi-initiator-session-logout?forum=winserverfiles

- 141
- 3
-
This is what worked for me! I had already completely offlined the disk in "disk management", I had already stopped the "Windows Backup" service. And it still wouln't let me remove it. But then I closed the "Task Manager" and I can now disconnect. I also tried it without stopping the "Windows Backup" service and it still works, as long as "Task Manager is not running. – user643011 Aug 24 '22 at 03:18
Figured out there was a really obscure process using the drive.
Microsoft Shadow Backup

- 57
- 1
- 2
-
Thank you!! Worked for me like a charm. Stopping the "Windows Backup" service allowed me to cleanly Disconnect the iSCSI target. Without stopping the Windows Backup service, it did not work even the iSCSI drive was taken offline. – user2887134 Jan 23 '19 at 23:44
-
1Did not work. Device is offline and Windows Backup service stopped and still won't disconnect. – user643011 Apr 29 '20 at 13:44