Hello all,
I've just wanted to post to this almost 4 years old thread complaining about still present bug. But I was able to pin the trouble-maker before pressing the Post button. I still want to share my problem, solution and suggestion with a future generation of googlers. For the reference I'm using CentOS 7 and iscsi-initiator-utils version 6.2.0.873-21 here. The problem seemed to be the same as for the topic starter 4 years ago. I couldn't get rid of the DiscoveryAddress as shown by the ' iscsiadm -m discoverydb -P1' command: ############################################ [root@rhce2 ~]# iscsiadm -m discoverydb -P1 SENDTARGETS: DiscoveryAddress: 192.168.l.90,3260 iSNS: No targets found. STATIC: No targets found. FIRMWARE: No targets found. [root@rhce2 ~]# iscsiadm -m discoverydb -t st -p 192.168.1.90,3260 -o delete -d 8 iscsiadm: Max file limits 1024 4096 iscsiadm: Looking for config file /var/lib/iscsi/send_targets/192.168.1.90,3260 iscsiadm: Looking for config file /var/lib/iscsi/send_targets/192.168.1.90,3260 config st_config. iscsiadm: Could not stat /var/lib/iscsi/send_targets/192.168.1.90,3260 err 2. iscsiadm: Could not open /var/lib/iscsi/send_targets/192.168.1.90,3260: No such file or directory iscsiadm: Discovery record [192.168.1.90,3260] not found. [root@rhce2 ~]# iscsiadm -m discoverydb -P1 SENDTARGETS: DiscoveryAddress: 192.168.l.90,3260 iSNS: No targets found. STATIC: No targets found. FIRMWARE: No targets found. ############################################ Attentive reader probably noticed that the DiscoveryAddress had the lower-case ‘l’ letter instead of the number ‘1’ in the third octet of the shown IP address. So did I after copy-pasting from the console to the reply box in here. In console the font I use (FreeMono) displays the letter ‘l’ and number ‘1’ almost identically. That was where the devil hid. Usage of the ‘iscsiadm --mode discoverydb -t st -p 192.168.l.90 -o delete’ command solved the problem for me here (note the letter 'l' instead of number '1'). The following command still lets the devil in (though with errors): ############################################ [root@rhce2 ~]# iscsiadm --mode discovery --type sendtargets --portal 192.168.l.90 iscsiadm: Cannot resolve host 192.168.l.90. getaddrinfo error: [Name or service not known] iscsiadm: cannot resolve host name 192.168.l.90 iscsiadm: cannot resolve host name 192.168.l.90 iscsiadm: Could not perform SendTargets discovery: encountered connection failure [root@rhce2 ~]# iscsiadm --mode discovery -P1 SENDTARGETS: DiscoveryAddress: 192.168.l.90,3260 iSNS: No targets found. STATIC: No targets found. FIRMWARE: No targets found. ############################################ For myself I’m looking for the better font right now. And for the developers I suggest to implement input sanitization, that won’t even add incorrect values into the database. Thank you, Oleg On Thursday, January 27, 2011 7:06:44 PM UTC-5, Dr. Ed Morbius wrote: > > on 15:29 Thu 27 Jan, Mike Christie (mich...@cs.wisc.edu <javascript:>) > wrote: > > On 01/27/2011 03:04 PM, Dr. Ed Morbius wrote: > > >on 14:02 Thu 27 Jan, Mike Christie (mich...@cs.wisc.edu <javascript:>) > wrote: > > >>On 01/27/2011 01:29 PM, Mike Christie wrote: > > >>>On 01/27/2011 01:10 AM, Dr. Ed Morbius wrote: > > > >>>>I've got one CentOS box which I'd done target discovery against the > > >>>>wrong storage array. > > >>>> > > >>>>I'd like to clear that array's records in the CentOS box's > discoverdb. > > > >>>I think you want this: > > >>> > > >>>-Delete discovery record. This will also delete the records for the > > >>>targets found through the discovery source. > > >>> > > >>>iscsiadm -m discoverydb -t sendtargets -p 192.168.1.1:3260 -o delete > > >>> > > >>> > > >>>To just remove a portal/node's record you can do > > >>> > > >>>Removing iSCSI portal: > > >>> > > >>>iscsiadm -m node -o delete -T iqn.2005-03.com.max -p 192.168.0.4:3260 > > >>> > > > >>Oh yeah, so the commands I listed above will delete the entire > > >>discovery or node record. > > >> > > >>Did you just want to clear specific values in a record? > > > > > >No. ALL evidence of the array, period. Seems to have happened my way. > > > > You should just use > > iscsiadm -m discoverydb -t sendtargets -p 192.168.1.1:3260 -o delete > > for each discovery record to delete the discovery record and the > > node records created from it. > > > > This: > > iscsiadm -m node --name='record' --value='' --op=delete > > is actually a bug. > > I stabbed around in the dark until the dagger came back bloody and a > body appeared on the floor. That was the iteration of the command which > worked. I'm not going to pretend it's right, and posted my question > here in part to sort out what the Right Way was. > > There's not a lot of information on the database and interactiong with > it, and/or its back-end implementation. I'm not sure if this is > intentional or not, but it makes working with the DB more challenging. > > > You do not need the name and value arguments. To > > delete all the node records you can just do > > iscsiadm -m node -o delete > > I'd tried that. It didn't accomplish what I'd set out to do. > > > That is what is actually getting run when you ran your command. The > > name and value params were getting ignored. > > OK. > > -- > Dr. Ed Morbius > Chief Scientist > Krell Power Systems Unlimited > > -- You received this message because you are subscribed to the Google Groups "open-iscsi" group. To unsubscribe from this group and stop receiving emails from it, send an email to open-iscsi+unsubscr...@googlegroups.com. To post to this group, send email to open-iscsi@googlegroups.com. Visit this group at http://groups.google.com/group/open-iscsi. For more options, visit https://groups.google.com/d/optout.