1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Remove iscsi device

Discussion in 'Web and Network Services' started by eztiger, May 25, 2009.

  1. eztiger

    eztiger New Member

    Messages:
    7
    Likes Received:
    0
    Possibly a simple question -

    I've succesfully configured the iscsi intiator and connected to an iscsi target using iscontrol.

    This has given me a da0 device which has been formatted and mounted etc etc

    Basically - I'm now done with it.

    I can obviously unmount it but the /dev/da0 device will be left hanging around.

    How can I 'shutdown' that iscsi device? iscontrol has no option - I'm assuming this is something camcontrol handles?

    A reboot would be the nasty way of doing this - but I'd obviosuly prefer not to!

    Any hints?

    Thanks!
     
  2. vivek

    vivek New Member

    Messages:
    809
    Likes Received:
    0
    Unload iscsi initiator driver from the kernel itself:
    Code:
    kldunload -v iscsi_initiator.ko
     
  3. eztiger

    eztiger New Member

    Messages:
    7
    Likes Received:
    0
    Sadly I'm using a PAE kernel - so not loadable (or unloadable!) kernel modules. It's hard compiled in.

    sysctl tells me :

    net.iscsi.0.pid: 67376

    and 'lo :

    root 67376 0.0 0.0 3264 916 ?? Is Sat12AM 0:00.04 iscontrol -n target0

    I had expected iscontrol to do it's business and terminate. I guess killing this off might have the desired effect - although I havn't tried it yet.

    Seems messy!

    kev
     
  4. eztiger

    eztiger New Member

    Messages:
    7
    Likes Received:
    0
    To update - yes killing off iscontrol works.

    This is actually mentioned in the man page but I missed it. Sending it a SIGHUP causes it to cleanly remove the device :

    (da0:iscsi0:0:0:0): lost device
    (da0:iscsi0:0:0:0): removing device entry

    Not so elegant but it works :)