How to check if a restart of open-iscsi was ok

5,484

You can grep for the process, if it is running it will display otherwise it won't show

command: $ ps -ef | grep iscsi

Share:
5,484

Related videos on Youtube

user3185936
Author by

user3185936

Updated on September 18, 2022

Comments

  • user3185936
    user3185936 over 1 year

    I am working on a bash script to connect a iscsi initiator to a target. After I have edited the iscsid.conf in the initiator I have to restart the open-iscsi with the command:

    service open-iscsi restart
    

    Is it a possible way to check if the restart was ok, if it was it will try to connect to target with:

    iscsiadm -m discovery -t st -p 10.05.02.10
    
    • Avinash Raj
      Avinash Raj about 10 years
      You can check the status of the above service by running sudo service open-iscsi status.If there is an option.