Re: command-line equivalents of SAM functionality

From: Doug O'Leary (dkoleary_at_olearycomputers.com)
Date: 02/26/04


Date: Thu, 26 Feb 2004 15:50:24 GMT

In article <slrnc3reca.q77.mwg@fluffy.isd.dp.ua>, Wladimir Mutel wrote:
> Hi,
>
> I want to get disk device informations on my system (HP-UX 11.11).
> I run SAM, choose 'Disks and file systems' -> 'Disk Devices', and see
> their hardware paths, device names, and sizes. Now I would like to
> request the same information from the command line, and to use it in
> script. What commands should I use ? We have some disks not included
> into volume groups. And pvdisplay does not help in their case. What
> should I use instead ?
>

man ioscan(1m) for most of the information that you're looking for:

# ioscan -funC disk | more
Class I H/W Path Driver S/W State H/W Type Description
======================================================================
disk 4 0/0/1/0.6.0 sdisk CLAIMED DEVICE HP DVD-ROM 305
                          /dev/dsk/c0t6d0 /dev/rdsk/c0t6d0
disk 0 0/0/1/1.0.0 sdisk CLAIMED DEVICE FUJITSU MAJ3182MC
                          /dev/dsk/c1t0d0 /dev/rdsk/c1t0d0
disk 1 0/0/1/1.2.0 sdisk CLAIMED DEVICE FUJITSU MAJ3182MC
                          /dev/dsk/c1t2d0 /dev/rdsk/c1t2d0
disk 2 0/0/2/0.0.0 sdisk CLAIMED DEVICE FUJITSU MAJ3182MC
                          /dev/dsk/c2t0d0 /dev/rdsk/c2t0d0

You can then use diskinfo to get some more information:

# diskinfo /dev/rdsk/c1t0d0
SCSI describe of /dev/rdsk/c1t0d0:
             vendor: FUJITSU
         product id: MAJ3182MC
               type: direct access
               size: 17783240 Kbytes
   bytes per sector: 512

What I normally do is assume that disks are the same size. My normal
environment is large disk farms (EMC/Hitachi) where the physical disks
are carved up into same size luns so the assumption is completely out of
whack for me. If the same is true for you, use pvdisplay to get the
size for a disk that is in a volume group, then use that size for any/all
same disk models.

HTH;

Doug

-- 
--------
Senior UNIX Admin
O'Leary Computer Enterprises
dkoleary@olearycomputers.com (w) 630-904-6098 (c) 630-248-2749
resume:  http://www.olearycomputers.com/resume.html


Relevant Pages

  • [HPADM] SUMMARY VG on EMC SAN
    ... disk 42 0/12/0/0.103.3.239.0.0.2 sdisk CLAIMED DEVICE DGC CX ... pvcreate all the disks ...
    (HP-UX-Admin)
  • [HPADM] new VG on EMC SAN
    ... disk 42 0/12/0/0.103.3.239.0.0.2 sdisk CLAIMED DEVICE DGC CX ...
    (HP-UX-Admin)
  • Re: missing one disk in /dev/rdsk and /dev/dsk
    ... You mean the disk is active or defect? ... The output of the ioscan command won't show the device paths. ... disk 0 0/0/1/1.2.0 sdisk CLAIMED DEVICE SEAGATE ... I agree with you that the 'insf -e' command should recreate those paths. ...
    (comp.sys.hp.hpux)
  • [HPADM] RE: how to see phisycal disks
    ... Class I H/W Path Driver S/W State H/W Type Description ... disk 0 8/0.3.0 sdisk CLAIMED DEVICE SEAGATE ST39236LC ... Where S/W State means state of the disk. ...
    (HP-UX-Admin)