[CentOS] can't disconnec iSCSI targets, please help

Mon Feb 28 17:26:13 UTC 2011
Marcelo Roccasalva <marcelo-centos at irrigacion.gov.ar>

On Mon, Feb 28, 2011 at 09:44, Rudi Ahlers <Rudi at softdux.com> wrote:
>
> On Mon, Feb 28, 2011 at 12:02 PM, Rudi Ahlers <Rudi at softdux.com> wrote:
> > Hi,
> >
> > I'm trying to disconnect some iSCSI targets, but can't seem to.
> >
> > [root at localhost ~]# iscsiadm -m session
> > tcp: [1] 192.168.2.202:3260,1 iqn.2011.01.22.freenas.nvr:500gb
> > tcp: [3] 192.168.2.200:3260,1 iqn.2011-2.za.co.securehosting:RAID.thin3.vg0.1tba
> > tcp: [4] 192.168.2.202:3260,1 iqn.2011.01.22.freenas.nvr:extent0
> > tcp: [5] 192.168.2.200:3260,1
> > iqn.2011-2.za.co.securehosting:RAID.iscsi0.vg0.500gb
> > I can't delete it either:
> > [root at localhost ~]# iscsiadm -m node --op delete --targetname
> > 192.168.2.202:3260,1 iqn.2011.01.22.freenas.nvr:500gb
> > iscsiadm: no records found!

I think your node names are wrong. I can logout and delete a target
exactly with this two lines:

iscsiadm -m node -T iqn.1992-08.com.netapp:sn.151737287 -p 172.16.1.10 --logout
iscsiadm -m node -T iqn.1992-08.com.netapp:sn.151737287 -p 172.16.1.10 -o delete

note that the parameter to -T is the string starting with iqn up to the space.

Hope this helps

--
Marcelo

"¿No será acaso que ésta vida moderna está teniendo más de moderna que
de vida?" (Mafalda)