2

I don't know if I'm missing something but when I'm mounting additional iSCSI volumes to a said server to add additional storage to a server I'm not seeing a way to mount the volume after running a discovery command.

The reasoning I want to be able to do this is that we're running an application that would require downtime everytime we add additional iSCSI volumes to this server.

So the big question is, in CentOS 6.x x64 is there a way using the current iSCSI initiator to add/remove iSCSI luns without cycling the service or is there even a third party commercial iSCSI initator that I could leverage to get this functionality?

Eric Fouarge
  • 73
  • 1
  • 5

1 Answers1

1

In general, there is a --rescan option to iscsiadm from the Open-iSCSI initiator. Typically, it is wrapped into some kind of script framework to make life easier.

With Centos, iscsi-rescan should do exactly that for you. Other systems might have a rediscover or rescan parameter to the iscsi startup script (/etc/init.d/open-iscsi or similar). The invocation does not cycle the service and does not do any disruptions to your currently connected LUNs but simply discovers new ones and logs in. Mounting should be straightforward once the login is successful.

the-wabbit
  • 40,319
  • 13
  • 105
  • 169
  • 1
    I feel like I'm reading this right, but all I need to run is this command: iscsiadm -m session --rescan – Eric Fouarge Feb 14 '12 at 22:03
  • 1
    There are many ways to do it - you could use either the `session` or the `node` mode with newer versions of iscsiadm - both should work. Also, we used to have `iscsiadm -m discovery -t sendtargets -p "$ISCSI_SERVER" && iscsiadm -m node -L all` in the olden days, where --rescan was not working for us all that well - you should be able to use it with recent versions as well. Also, `echo "- - -" > /sys/class/scsi_host/hostX/scan` should work. Aside from all that, if your distribution provides abstraction scripts, use these. `iscsi-rescan` is part of the `iscsi-initiator-utils` package – the-wabbit Feb 14 '12 at 23:11