%tape - - - type=S ha=0 id=3 lun=0 bus=0 ht=slha
%disk - - - type=S ha=0 id=0 lun=0 bus=0 ht=slha
%Sdsk - - - cyls=1022 hds=138 secs=63 fts=stdb
Is there a way to determine the model of my SCSI disk without
resorting to a reboot or, heaven forbid, opening the case!?
hwconfig just gives the above.
By the way, I really want to do this to find out how many pins the
S3C875 SCSI (Ultra, single channel, 8bit 20MB/s, 16bit 40MB/s,
single ended or differential) has so we can purchase new disk (without
opening the case to see what we need since this machine is live).
Attached is a perl script I wrote many years ago that gets disk information
for SCSI disks on an OpenServer system, and creates groff input.
USE AT YOUR OWN RISK! It's never broken anything on any of our systems,
but the script was written in 1997, and hasn't been tested on all current
versions of OpenServer.
You will have to comment out the lines with csspath and bigtmp.pl as
they're not on your systems, and aren't necessary.
Bill
--
INTERNET: bi...@Celestial.COM Bill Campbell; Celestial Software LLC
UUCP: camco!bill PO Box 820; 6641 E. Mercer Way
FAX: (206) 232-9186 Mercer Island, WA 98040-0820; (206) 236-1676
URL: http://www.celestial.com/
The very powerful and the very stupid have one thing in common.
Instead of altering their views to fit the facts, they alter the facts
to fit their views ... which can be very uncomfortable if you happen to
be one of the facts that needs altering.
-- Doctor Who, "Face of Evil"
Have a look at Technical Article #104990 it has uses scsiQuery
to list the type of SCSI disk.
Tom
--
========================================================================
Tom Melvin t...@tkrh.demon.co.uk http://www.tkrh.demon.co.uk
Veterinary Solutions Ltd
========================================================================
If you have cdrecord (/usr/local/bin/cdrecord or /usr/lib/edge/cdrecord)
run it with LIBSCG_SCAN_ALL set in the environemnt, and with the
-scanbus option:
LIBSCG_SCAN_ALL= /path/to/cdrecord -scanbus.
--
JP
/usr/lib/edge/bin/edge.tape -t /dev/rhd00
which might provide even more useful information.
On this system, it reports:
edge.tape -t /dev/rhd00
Product ID: ST373307LW
Vendor: SEAGATE
Revision: 0002
Interface: SCSI
SCSI Compliance: 3
Description: Direct Access
Media Present: 1
Removable Medium: 0
ECC Enabled: 0
NGroup Writing: 0
Partition Support: 1
Current Partition: 0
Number of Partitions: 1
Part. 0, Total: 71687372 K
Loaded Medium: DASD
Write Protected: -1
Setmark Support: 0
Speed: 10033 RPM
---
Tom
---
D. Thomas Podnar - President t...@microlite.com
Microlite Corporation 724-375-6711 Voice
2315 Mill Street 724-375-6908 Fax
Aliquippa PA 15001-2228 888-257-3343 Tollfree Sales
+---------------------------------------------------------+
|Makers of BackupEDGE 2.0 - Backup and Disaster Recovery |
|Software for Unix and Linux Systems - Now With Encryption|
|Supports: Tape Drives, Libraries, CD/DVD Optical Media |
|http://www.microlite.com ftp://ftp.microlite.com|
+---------------------------------------------------------+
> On Fri, Mar 19, 2004, da...@i-55.com wrote:
> >In Linux and other Unix systems I can figure out the model of a SCSI
> >disk by viewing dmesg. In SCO I only see things like:
> >
> >%tape - - - type=S ha=0 id=3 lun=0 bus=0 ht=slha
> >%disk - - - type=S ha=0 id=0 lun=0 bus=0 ht=slha
> >%Sdsk - - - cyls=1022 hds=138 secs=63 fts=stdb
> >
> >Is there a way to determine the model of my SCSI disk without
> >resorting to a reboot or, heaven forbid, opening the case!?
>
> Attached is a perl script I wrote many years ago that gets disk information
> for SCSI disks on an OpenServer system, and creates groff input.
>
> USE AT YOUR OWN RISK! It's never broken anything on any of our systems,
> but the script was written in 1997, and hasn't been tested on all current
> versions of OpenServer.
This script uses badtrk(ADM) to dump the SCSI disk vendor and product:
> $cmd = "/etc/badtrk -e -f $sa_dev 2>&1";
> print $cmd;
> open(BADTRK, "echo \"q\n\n\" | $cmd |");
> while(<BADTRK>) {
> chop;
> print if (/^(scsi version|vendor|product)/);
> }
> close(BADTRK);
You probably copied the `badtrk` invokation from /usr/lib/mkdev/hd. The
"-e" option gives badtrk permission to destroy your disk (you're telling
it that this is a disk that's being newly initalized, so it's OK to
change the size of its alias block table -- which destroys existing
divisions). Fortunately, you aren't telling it to scan for bad blocks,
so it won't have any _reason_ to grow the table. Still, you should
remove that flag.
For the original poster: just run `badtrk -f /dev/rhd0a`, quit out of it
immediately. Run it against the active partition of whatever drive you
want to examine (/dev/rhd2a, /dev/rdsk/8sa, etc.) This displays drive
information like:
scsi version = 2
vendor = QUANTUM
product = XP34550W
OpenServer 5.0.7 adds a third printcfg line for SCSI disks:
%disk - - - type=S ha=0 id=0 lun=0 bus=0 ht=ad160 unit=0
%Sdsk - - - cyls=4462 hds=255 secs=63 unit=0 fts=stdb
%Sdsk-0 - - - Vnd=SEAGATE Prd=ST336752LW Rev=0004
>Bela<
That was the easiest solution. Thanks to you and everyone else.