(OLDER) <- More Stuff -> (NEWER) (NEWEST)
Printer Friendly Version



Best of the Newsgroups: identify hard drive sco


What is this stuff?

If this isn't exactly what you wanted, please try our Search (there's a LOT of techy and non-techy stuff here about Linux, Unix, Mac OS X and just computers in general!):



From: Bela Lubkin <belal@sco.com>
Subject: Re: Determine SCSI disk model?
Date: Fri, 19 Mar 2004 19:31:53 GMT
Message-ID: <20040319193153.GM24746@sco.com> 
References: <6f5m50hd7658jdvlammq17ggceh0ijpes0@4ax.com> <mailman.0.1079713272.25459.sco-misc@lists.celestial.com> 

Bill Campbell wrote:

> On Fri, Mar 19, 2004, dap99@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<




Click here to add your comments



Don't miss responses! Subscribe to Comments by RSS or by Email

Click here to add your comments


If you want a picture to show with your comment, go get a Gravatar



/Bofcusm/2447.html copyright 1997-2004 (various authors) All Rights Reserved

Have you tried Searching this site?

Unix/Linux/Mac OS X support by phone, email or on-site: Support Rates

This is a Unix/Linux resource website. It contains technical articles about Unix, Linux and general computing related subjects, opinion, news, help files, how-to's, tutorials and more. We appreciate comments and article submissions.

Publishing your articles here

Jump to Comments



Many of the products and books I review are things I purchased for my own use. Some were given to me specifically for the purpose of reviewing them. I resell or can earn commissions from the sale of some of these items. Links within these pages may be affiliate links that pay me for referring you to them. That's mostly insignificant amounts of money; whenever it is not I have made my relationship plain. I also may own stock in companies mentioned here. If you have any question, please do feel free to contact me.

Specific links that take you to pages that allow you to purchase the item I reviewed are very likely to pay me a commission. Many of the books I review were given to me by the publishers specifically for the purpose of writing a review. These gifts and referral fees do not affect my opinions; I often give bad reviews anyway.

We use Google third-party advertising companies to serve ads when you visit our website. These companies may use information (not including your name, address, email address, or telephone number) about your visits to this and other websites in order to provide advertisements about goods and services of interest to you. If you would like more information about this practice and to know your choices about not having this information used by these companies, click here.



More:
       - OSR5
       - Bofcusm
       - Bela


Unix/Linux Consultants

Skills Tests

Guest Post Here











My Favorites

Change Congress