I was thinking maybe:
# On a Fedora system with the default iscsi rpms installed:
/etc/init.d/iscsi stop
rm -fr /var/lib/iscsi
When I start it again will it recreate directories as needed?
Thanks,
Ben
--
Ben Greear <gre...@candelatech.com>
Candela Technologies Inc http://www.candelatech.com
Then it's safe to rm -fr the /var/lib/iscsi dir? I want to get
rid of all of the interface config and node config as well.
Something else I just hit: If I try to stop iscsi twice (without running
it in between), iscsiadm hangs trying to log out the second time..probably
because it can't connect to the iscsi daemons. Any clean fix for
this, or maybe just script it to look at the process listing and
don't call iscsiadm if no daemons are running?
Not really.
> I was thinking maybe:
>
> # On a Fedora system with the default iscsi rpms installed:
> /etc/init.d/iscsi stop
> rm -fr /var/lib/iscsi
>
This is fine.
> When I start it again will it recreate directories as needed?
>
It will.
For stop do you mean
service iscsi stop
Is this fedora? What version or what iscsi-initaitor-utils version?
> it in between), iscsiadm hangs trying to log out the second time..probably
It should not hang. I think it waits for a very long time :) (something
like two or four minutes).
This should be fixed in newer versions of open-iscsi so that we fail
quickly. It is in at F10 iscsi-initiator-utils-6.2.0.871-0.0.fc10 and
F9's iscsi-initiator-utils-6.2.0.871-0.0.fc10.
> because it can't connect to the iscsi daemons. Any clean fix for
> this, or maybe just script it to look at the process listing and
> don't call iscsiadm if no daemons are running?
>
Yeah, that would probably be nice to have too. What was happening before
is that iscsiadm would run and if it could not contact iscsid it would
retry for X seconds. Since iscsiadm needed iscsid for the command, we
modified iscsiadm to either start iscsid or have it fail quickly (assume
that you would have started iscsid so there is no need to every wait)
(the fix depends on the version of iscsi you are running).
Ok. I was testing the initiator on FC8, so it could very well be fixed
already in newer releases. I wasn't waiting a full 2-4 minutes, too
impatient :)
I can work around this in my own code easily enough until we move
to newer OS releases.