Add New Lun / SAN disk on Linux server

How to rescan and add new Luns to server?

Step 1: Get the list of HBA and exisiting disk details.

#ls /sys/class/fc_host

#fdisk -l 2>/dev/null | egrep '^Disk' | egrep -v 'dm-' | wc -l

Step 2: Scan the HBA ports (Need to scan all HBA port)

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

# echo "- - -" > /sys/class/scsi_host/host??/scan
 

Do this above steps for all HBA cards

Step3 : Check the newly added Lun    

# cat /proc/scsi/scsi | egrep -i 'Host:' | wc -l

# fdisk -l 2>/dev/null | egrep '^Disk' | egrep -v 'dm-' | wc -l





Post a Comment

2 Comments

  1. what does mean "- - -" in echo "- - -" > /sys/class/scsi_host/host??/scan


    Please help

    ReplyDelete