Testing from iscsitarget trunk with the update for revision 470 (released Fri Apr 6 21:58:31 2012 UTC)
http://iscsitarget.svn.sourceforge.net/viewvc/iscsitarget?revision=478&view=revision It appears they have addressed this issue with the fix noted above. Obviously, this isn't included in the iscsitarget and iscsitarget-dkms packages in Ubuntu Precise currently. The issue notes there is a problem with kernel versions 3.2+ without the 478 fix in place. Testing so far seems to indicate this is fixed with that update. Testing: creating a sparse image: dd if=/dev/zero of=/fs.iscsi.disk bs=1M count=512 then creating target: root@ubuntu-precise-beta2:~# ietadm --op new --tid=1 --params=Name=mytarget root@ubuntu-precise-beta2:~# ietadm --op new --tid=1 --lun=0 --params=Path=/fs.iscsi.disk shows available: root@ubuntu-precise-beta2:~# cat /proc/net/iet/session tid:1 name:mytarget root@ubuntu-precise-beta2:~# cat /proc/net/iet/volume tid:1 name:mytarget lun:0 state:0 iotype:fileio iomode:wt blocks:1048576 blocksize:512 path:/fs.iscsi.disk login by client is successful: root@ubuntu-precise-beta2:~# iscsiadm -m node -T mytarget -p 172.16.2.133:3260 --login Logging in to [iface: default, target: mytarget, portal: 172.16.2.133,3260] Login to [iface: default, target: mytarget, portal: 172.16.2.133,3260]: successful and active session: root@ubuntu-precise-beta2:~# cat /proc/net/iet/session tid:1 name:mytarget sid:281474997486080 initiator:iqn.1993-08.org.debian:01:8f33344622fb cid:0 ip:172.16.2.133 state:active hd:none dd:none properly refuses to delete in use target: root@ubuntu-precise-beta2:~# ietadm --op delete --tid=1 Device or resource busy. a successful logout: root@ubuntu-precise-beta2:~# iscsiadm -m session --logout Logging out of session [sid: 1, target: mytarget, portal: 172.16.2.133,3260] Logout of [sid: 1, target: mytarget, portal: 172.16.2.133,3260]: successful shows no active sessions: root@ubuntu-precise-beta2:~# cat /proc/net/iet/session tid:1 name:mytarget root@ubuntu-precise-beta2:~# cat /proc/net/iet/volume tid:1 name:mytarget lun:0 state:0 iotype:fileio iomode:wt blocks:1048576 blocksize:512 path:/fs.iscsi.disk successfully lets you delete target as device is not in use: root@ubuntu-precise-beta2:~# ietadm --op delete --tid=1 no longer shows active target or sessions: root@ubuntu-precise-beta2:~# cat /proc/net/iet/volume root@ubuntu-precise-beta2:~# cat /proc/net/iet/session -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/967984 Title: iSCSI target administration utility (ietadm) not detecting inactive sessions To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/iscsitarget/+bug/967984/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs