on 13:29 Thu 27 Jan, Mike Christie ([email protected]) wrote:
> On 01/27/2011 01:10 AM, Dr. Ed Morbius wrote:
> >I've been configuring a number of CentOS 5.5 hosts against a pair of
> >Dell MD3220i storage arrays.
> >
> >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've managed to delete the node entries, but am stumped with
> >discoverydb:
> >
> > $ sudo iscsiadm -m discoverydb -P1
> > SENDTARGETS:
> > DiscoveryAddress: 10.1.250.218,3260
> > No targets found.
> > iSNS:
> > No targets found.
> > STATIC:
> > No targets found.
> > FIRMWARE:
> > No targets found.
> >
> >Trying the obvious fails:
> >
> > $ sudo iscsiadm -m discoverydb --op=delete
> > iscsiadm: Invalid operation. Operation not supported.
> >
> >Googling has been fruitless so far.
> >
> >Clues?
> >
> >
> >Incidentally, the node deletion recipe (I sort of stumbled into it) that
> >semed to work was:
> >
> > $ sudo iscsiadm -m node --name='record' --value='' --op=delete
> >
> >I didn't find this documented in the open-iscsi README (which is
> >otherwise among the bettre iSCSI docs I've found).
>
> Where did you get the README? Was it in the tarball or in
> /usr/share/docs/iscsi-initiatar-utils-$VERSION/README?
My bad: it *is* in the README, I just didn't see it.
On CentOS 5.5:
/usr/share/doc/iscsi-initiator-utils-6.2.0.871/README
... and also in the online open-iscsi README:
http://www.open-iscsi.org/docs/README
> In the current README, this info should be in the iscsiadm examples
> (it is also in some other parts, but I think the examples is easiest
> to read).
>
> 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
That does delete the IQNs, but not the discovery address itself (see
output above, line under "SENDTARGETS").
My understanding of "the database" is that it's a set of files
maintained under /var/lib/iscsi. Doing a find there I see:
/var/lib/iscsi/send_targets/10.1.250.218,3260/st_config
... as the only text file.
Any harm to just blowing that away? Or in leaving it even if I never
want to talk to that array again (as in: I *really* don't want to talk
to it)?
> 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
Substituting appropriate parameters, that still leaves the
DiscoveryAddress as known:
$ sudo iscsiadm -m node -o delete -T $IQN -p 10.1.250.218:3260
iscsiadm: no records found!
$ sudo iscsiadm -m discoverydb -P1
SENDTARGETS:
DiscoveryAddress: 10.1.250.218,3260
No targets found.
iSNS:
No targets found.
STATIC:
No targets found.
FIRMWARE:
No targets found.
Seeing as I can safely reinstall, I'll blow away the file and see what
happens. If the world should end, please accept my most sincere
apologies.
$ sudo rm -rf /var/lib/iscsi/send_targets/10.1.250.218,3260
$ sudo iscsiadm -m discoverydb -P1
SENDTARGETS:
No targets found.
iSNS:
No targets found.
STATIC:
No targets found.
FIRMWARE:
No targets found.
That's the result I wanted, if not the method....
--
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 post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/open-iscsi?hl=en.