Operating System - Linux
1753511 Members
5408 Online
108795 Solutions
New Discussion юеВ

Re: How to find SCSI hard disk in the system

 
ashanabey
Advisor

How to find SCSI hard disk in the system

Hi,

how do i find SCSI hard disk installed in the system and scan all devices.

Thx!

Ashan
legend the heart and lend the hand
8 REPLIES 8
Alexander Chuzhoy
Honored Contributor

Re: How to find SCSI hard disk in the system

cat /proc/scsi/scsi
will tell you what scsi devices you have
try also
cdrecord -scanbus
Roberto Polli
Trusted Contributor

Re: How to find SCSI hard disk in the system

search in this forum. This question has been fully ansered.
Peace, R.
Hoefnix
Honored Contributor

Re: How to find SCSI hard disk in the system

Hi,

lsscsi - list all SCSI devices (or hosts) currently on system (from man lsscsi)

HTH,
Peter
Mobeen_1
Esteemed Contributor

Re: How to find SCSI hard disk in the system

Ashan,
List all the devices on your system and then grep for SCSI and then disk

rgds
Mobeen
Vitaly Karasik_1
Honored Contributor

Re: How to find SCSI hard disk in the system

unfortunately, there is no simple answer as in HPUX world.

For example, many Proliant servers use Smart Array RAID adapter and cciss driver uses not-so-standart names: /dev/cciss/cXdY
Steven E. Protter
Exalted Contributor

Re: How to find SCSI hard disk in the system

Almost every controller of every make will display a scsi utility at boot time. This will allow you to seek out and find drives by scsi id.

As noted there is no ioscan for Linux. Too bad.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Colin Topliss
Esteemed Contributor

Re: How to find SCSI hard disk in the system

Hmm.

Although there isn't an ioscan per-se, SuSE Linux has a really neat tool called hwinfo. It will give you a complete breakdown of your system (including SCSI devices). For example, I have a SCSI tape drive on this system:


36: SCSI 103.0: 10601 Tape
[Created at scsi.237]
Unique ID: m9fb.3rUV42LTd0F
Parent ID: bSAa.urRinWvBqX1
Hardware Class: unknown
Model: "Quantum DLT4000"
Vendor: "Quantum"
Device: "DLT4000"
Revision: "D782"
Driver: "aic7xxx"
Device File: /dev/st0
Config Status: cfg=new, avail=yes, need=no, active=unknown
Attached to: #22 (SCSI storage controller)


What more info could you ask for? :-)

It might work under other distributions (I have never tried).

You also have:
sginfo -l
/dev/scd0 /dev/sr0 /dev/nst0
/dev/sg0 [=/dev/scd0 scsi0 ch=0 id=0 lun=0]
/dev/sg1 [scsi1 ch=0 id=2 lun=0]
/dev/sg2 [=/dev/nst0 scsi1 ch=0 id=3 lun=0]

OK, but not quite as informative as hwinfo.

And...
sg_map
/dev/sg0 /dev/scd0
/dev/sg1
/dev/sg2 /dev/st0

And even...
sg_scan
/dev/sg0: scsi0 channel=0 id=0 lun=0 [em] type=5
/dev/sg1: scsi1 channel=0 id=2 lun=0 type=3
/dev/sg2: scsi1 channel=0 id=3 lun=0 type=1

You should be able to find out all you need to with these tools....

Col
Sajeesh O.K
Advisor

Re: How to find SCSI hard disk in the system

cat the files /proc/driver/cciss directory.
The file names are like cciss0,cciss1 etc.

Sajeesh