open-iscsi and init script

Andrzej Zawadzki zawadaa at gmail.com
Tue Sep 25 15:41:45 CEST 2012


   Hi!
   What is a proper way to configure new iscsi dev in PLD?
   For me easiest way is:
   1) add to /etc/init.d/iscsi these lines:
      force-start)
          force_start
          ;;
   2) start: service iscsi force-start
   3) edit initiatorname.iscsi
   4) run:

   iscsiadm -m discovery -t sendtargets -p $MY_SERVER

   iscsiadm --mode node --targetname $MY_TARGET_NAME --portal
   $MY_SERVER:3260 --login
   5) edit nodes (manual->automatic)
   6) service iscsi-devices start
   Works.
   Question: why "force-start" is unavailable?
   Mistake? Typo? Can I add it?
   ps. These tests are useless just after installed rpm:
   use_discoveryd() {
       grep -qrs "discovery.sendtargets.use_discoveryd = Yes"
   /etc/iscsi/send_targets
       if [ $? -eq 0 ] ; then
           return 0
       fi
       grep -qrs "discovery.isns.use_discoveryd = Yes" /etc/iscsi/isns
       if [ $? -eq 0 ] ; then
           return 0
       fi
       return 1
   }
   --
   Andrzej Zawadzki


More information about the pld-devel-en mailing list