لینوکس و شبکه

لینوکس و شبکه
طبقه بندی موضوعی
آخرین مطالب
  • ۹۸/۱۲/۱۴
    bond
  • ۹۸/۱۰/۲۰
    GIT
  • ۹۸/۱۰/۱۴
    DISK

DISK

شنبه, ۱۴ دی ۱۳۹۸، ۰۹:۵۲ ق.ظ

Check the number of attached disks

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

verify Using /sys class file

(- - -)

$ echo "- - -" >  /sys/class/scsi_host/host0/scan
#("- - -") of the command act as wildcards meaning rescan everything​​

(c t l)

$ echo "c t l" >  /sys/class/scsi_host/hosth/scan 
# h is the HBA number
# c is the channel on the HBA
# t is the SCSI target ID
# l is the LUN.

#If you don't have the host bus number, you must list all the existing host bus number on your system with the command

$ ls /sys/class/scsi_host
host0 host1 host2

$ echo "- - -" > /sys/class/scsi_host/host0/scan
$ echo "- - -" > /sys/class/scsi_host/host1/scan
$ echo "- - -" > /sys/class/scsi_host/host2/scan

<OR>

# for host in `ls /sys/class/scsi_host/`;do
 echo "- - -" >/sys/class/scsi_host/${host}/scan;
done

 

 

URL

 

 

 

 

  • ۹۸/۱۰/۱۴
  • behrooz mohamadi nsasab

disk