cancel
Showing results for 
Search instead for 
Did you mean: 

confusion more

Arun_K
Level 6

 

Linux:
 
Can the operating system see the drives.
 
cat /proc/scsi/scsi
 
What does the output of /usr/openv/volmgr/bin/scan show.
 
Martin
 
 
I was googling some doubts and i found one note.
 
What is the difference between the two?
 
I guess both command detects devices at OS level?
1 ACCEPTED SOLUTION

Accepted Solutions

mph999
Level 6
Employee Accredited

Why don't you run the commands and find out ?

However, as you have made an effort to find the answer, I will assist.

cat /proc/scsi/scsi shows what the Linux os can see (devices)

scan does NOT detect devices at the os level.

It sends a scsi command to any device already detected by the operating system.  This is not the same as detecting the devices at the os level.  For the scan comand to work, the os must have already discovered the devices.

So, scan will show the devices detected, but is does not detect them itself.

Martin

View solution in original post

6 REPLIES 6

mph999
Level 6
Employee Accredited

Why don't you run the commands and find out ?

However, as you have made an effort to find the answer, I will assist.

cat /proc/scsi/scsi shows what the Linux os can see (devices)

scan does NOT detect devices at the os level.

It sends a scsi command to any device already detected by the operating system.  This is not the same as detecting the devices at the os level.  For the scan comand to work, the os must have already discovered the devices.

So, scan will show the devices detected, but is does not detect them itself.

Martin

Arun_K
Level 6

 

bin]$ sudo ./scan
************************************************************
*********************** SDT_TAPE    ************************
*********************** SDT_CHANGER ************************
************************************************************
[ bin]$ cat /proc/scsi/scsi
[]$ uname -an
Linux  2.6.18-274.3.1.el5 #1 SMP Fri Aug 26 18:49:02 EDT 2011 x86_64 x86_64 x86_64 GNU/Linux
 
I have run the command and getting the above.
 

Arun_K
Level 6

 

cat /proc/scsi/scsi shows what the Linux os can see (devices)

scan does NOT detect devices at the os level.

It sends a scsi command to any device already detected by the operating system.  This is not the same as detecting the devices at the os level.  For the scan comand to work, the os must have already discovered the devices.

So, scan will show the devices detected, but is does not detect them itself.

 

What it means that  it sends a scsi command to any device?

Does it check the physical connectivity?

mph999
Level 6
Employee Accredited

scsi commands are commands sent to 'scsi' devices that make them do things.

This is a command that sends a scsi command, using the -d option is sends a 'scsi inquiry' command that makes a scsi device respond with information about itself.

 

scsi_command -d /dev/rmt/0cbn
 
The result is ...

Inquiry data: removable dev type 1h HP      DAT72X6         B604

 
Making a library run an inventory is a scsi command, making a drive eject is a scsi command.  The os commands mt -f rew / fsf / offl /stat are all (different) scsi comands that control a tape drive.
 
All commands in robtest are scsi commands ...
 
s s 
s p 
m sx dy 
 
It just happens that scan sends a scsi inquiry command, thus making any device that recieves it respond back with details about itself.
 
Does it check physical connectivity - no how can it ?
 
If the device responds, then yes, it confirms that there is connectivity, but  if the command fails it does not mean there is not 'physical' connectivity, it could be many different faults that cause the issue, firmware, driver, os issue, hardware issue, or even a broken cable (which would be physical) but the command alone cannot pin it down to a particulat exact fault, it just shows it does or does not work.
 
Off to bed now ...
 
Martin

Arun_K
Level 6

Can i say scan command is what netbackup can see via the Operating System.?

Marianne
Level 6
Partner    VIP    Accredited Certified

100% correct.

The commands that you ran above was done on a machine where no devices are attached.

scan just showed headings and no devices.
cat /proc/scsi/scsi showed no output.

If you do the same on a system where devices are attached, you will see different output.