Linux‎ > ‎Hardware‎ > ‎Storage‎ > ‎

~Dynamically Detecting Storage

IF you Have FIBER CHANNEL storage ( SAN)


echo "1" > /sys/class/fc_host/host0/issue_lip

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


IF you have just local storage or if it is a VM


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



To lists how many host you have

ll /sys/class/fc_host/host0 (and hit tab key twice -  if you are using bash shell it displays all objects starting with host* host1 host 2 etc...

Do the same for fc_host

If you have multiple host entries you can put all of this in a file and run it like a script, you should be able to see the new disks

###########################
#!/bin/bash


echo "1" > /sys/class/fc_host/host0/issue_lip
echo "1" > /sys/class/fc_host/host1/issue_lip


echo "- - -" > /sys/class/scsi_host/host0/scan
echo "- - -" > /sys/class/scsi_host/host1/scan
echo "- - -" > /sys/class/scsi_host/host2/scan
echo "- - -" > /sys/class/scsi_host/host3/scan
echo "- - -" > /sys/class/scsi_host/host4/scan
echo "- - -" > /sys/class/scsi_host/host5/scan
echo "- - -" > /sys/class/scsi_host/host6/scan

###########################


If you are using devicemapper multipath to connect to SAN you might have to run the multipath -r  command for the new disks to show up in the /etc/multipath/bindings or /var/lib/multipath/bindings (default) file.





Comments