What does the echo "1" to the issue_lip file do? - SCAN SCSI in Linux

Question 1:  What will happen if we issue the below command ?

# echo "1" > /sys/class/fc_host/host/issue_lip

Answer : 

    This operation performs a Loop Initialization Protocol (LIP) and then scans the interconnect and causes the SCSI layer to be updated to reflect the devices currently on the bus. A LIP is, essentially, a bus reset,  and will cause device addition and removal. This procedure is necessary to configure a new SCSI target on a Fibre Channel interconnect. Bear in mind that issue_lip is an asynchronous operation.

    The command may complete before the entire scan has completed. You must monitor /var/log/messages to determine when it is done. The lpfc and qla2xxx drivers support issue_lip

Question2 : 

What will happen if we issue the below command ? what does "- - -" mean in the command?

# echo "- - -" > /sys/class/scsi_host/host0/scan


It means that you are echoing a wildcard value of "channel target and lun", and the operating system will rescan the device path.


Post a Comment

Blogger Tips and TricksLatest Tips And TricksBlogger Tricks