Mailing List Archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [tlug] Finding Device Assignment



On Friday 17 January 2003 01:29, Charles Muller wrote:
> I just installed an external SCSI hard drive, and would like to assign it
> some mounting specifications in FSTAB, but I don't know how the Linux
> system identified it when I installed it (such as /dev/sda5, etc.). This is
> on RH 8.0, and I can normally get this information with the RH Hardware
> Browser applet, but this applet is broken at the moment (I'm still waiting
> for my answer from RHN support as to how to fix it). Is there somewhere
> else that this information might be accessible without the RH Browser?

Chuck,

From the command line:

For SCSI devices, you can 'cat /proc/scsi/scsi' which gives output like this:

  virtual0:/home/marc > cat /proc/scsi/scsi
  Attached devices:
  Host: scsi0 Channel: 00 Id: 00 Lun: 00
    Vendor: Quantum  Model: XP32150          Rev: L912
    Type:   Direct-Access                    ANSI SCSI revision: 02
  Host: scsi0 Channel: 00 Id: 03 Lun: 00
    Vendor: PLEXTOR  Model: CD-R   PX-W1210S Rev: 1.00
    Type:   CD-ROM                           ANSI SCSI revision: 02

The harddrive listed above will be /dev/sda.  The CD-ROM will be /dev/sg1 
(second generic SCSI device).  If there were another HD following the CD-ROM, 
it would be /dev/sdb as the sd* refer only to hard disks.  The sg* device 
listings follow _all_ SCSI devices so in our example, if there were another 
HD that followed the CD-ROM then a scanner, making a total of 4 SCSI devices, 
the scanner would be /dev/sg3.  The hard drives also take up an sg* address 
(first hard drive listed above is /dev/sg0) but are not typicaly accessed 
using that device listing.  Historicaly, there also used to be links in /dev 
named sga, sgb, sgc, etc pointing to sg0, sg1, sg2, and so on.

'dmesg' output can also give you some information on scsi devices.

More detailed information can be given about what devices are on an individual 
controller.  This output is from catting /proc/scsi/BusLogic/0 (the first 
Buslogic controller.  Not all drivers provide such verbose statistics:


virtual0:/home/marc > cat /proc/scsi/BusLogic/0
***** BusLogic SCSI Driver Version 2.1.15 of 17 August 1998 *****
Copyright 1995-1998 by Leonard N. Zubkoff <lnz@example.com>
Configuring BusLogic Model BT-930 PCI Ultra SCSI Host Adapter
  Firmware Version: 5.02, I/O Address: 0xD800, IRQ Channel: 9/Level
  PCI Bus: 1, Device: 9, Address: 0xFF8FF000, Host Adapter SCSI ID: 7
  Parity Checking: Enabled, Extended Translation: Enabled
  Synchronous Negotiation: UFSFFFF#, Wide Negotiation: Disabled
  Disconnect/Reconnect: Enabled, Tagged Queuing: Enabled
  Driver Queue Depth: 255, Scatter/Gather Limit: 128 segments
  Tagged Queue Depth: Automatic, Untagged Queue Depth: 3
  Error Recovery Strategy: Default, SCSI Bus Reset: Enabled
  SCSI Bus Termination: Enabled, SCAM: Disabled
*** BusLogic BT-930 Initialized Successfully ***

Target 0: Queue Depth 28, Synchronous at 10.0 MB/sec, offset 15
Target 3: Queue Depth 3, Synchronous at 10.0 MB/sec, offset 15

Current Driver Queue Depth:     255
Currently Allocated CCBs:       35


                           DATA TRANSFER STATISTICS

Target  Tagged Queuing  Queue Depth  Active  Attempted  Completed
======  ==============  ===========  ======  =========  =========
   0        Active           28         0          225        225
   3    Not Supported         3         0        14279      14279

Target  Read Commands  Write Commands   Total Bytes Read    Total Bytes 
Written
======  =============  ==============  ===================  
===================
   0             72            146                 675840              3620864
   3          13923              0              602550272                    0

Target  Command    0-1KB      1-2KB      2-4KB      4-8KB     8-16KB
======  =======  =========  =========  =========  =========  =========
   0     Read            0         36          0         14          4
   0     Write           0          0          0         56         22
   3     Read            0          0       3490         19        435
   3     Write           0          0          0          0          0

Target  Command   16-32KB    32-64KB   64-128KB   128-256KB   256KB+
======  =======  =========  =========  =========  =========  =========
   0     Read            4         14          0          0          0
   0     Write          16         31         21          0          0
   3     Read         1018        840       8121          0          0
   3     Write           0          0          0          0          0


                           ERROR RECOVERY STATISTICS

          Command Aborts      Bus Device Resets   Host Adapter Resets
Target  Requested Completed  Requested Completed  Requested Completed
  ID    \\\\ Attempted ////  \\\\ Attempted ////  \\\\ Attempted ////
======   ===== ===== =====    ===== ===== =====    ===== ===== =====
   0         0     0     0        0     0     0        0     0     0
   3         0     0     0        0     0     0        0     0     0

External Host Adapter Resets: 0
Host Adapter Internal Errors: 0

-- 
Marc Christensen
http://www.mecworks.com
http://www.mecworks.com/~marc/resume


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links