Video Screencast Help
Symantec to Separate Into Two Focused, Industry-Leading Technology Companies. Learn more.

Relating devices reported by the Solaris sar utility to VxVM disks

Created: 17 Aug 2011 • Updated: 06 Sep 2011 | 4 comments
mikebounds's picture
+4 4 Votes
Login to vote

It is difficult to map the devices shown in Solaris "sar -d" to VM devices as described in http://www.symantec.com/docs/TECH22381

This shows from line:
 
sd24 20 0.2 8 12273 0.0 25.3d

in "sar -d" you have to first look up "sd24" in /etc/path_to_inst to find:

"/pci@1f,0/pci@1/scsi@3,1/sd@a,0" 24 "sd"

Then you have to look up the device above in sym links in /dev/rdsk:

# ls -l /dev/rdsk/*s2|grep "/pci@1f,0/pci@1/scsi@3,1/sd@a,0"

lrwxrwxrwx 1 root root 50 Sep 9 11:49 /dev/rdsk/c1t10d0s2 -> ../../devices/pci@1f,0/pci@1/scsi@3,1/sd@a,0:c,raw 
 
This gives you Solaris disk name which you would then need to use "vxdisk -e list" to show you VM disk and then you could see what volumes are on that disk.  The script I have attached produces output with the following columns to show mapping:
 
Solaris cXtXdXs2 disk
VxVM Disk Media record
Diskgroup
Device tree path
Instance number
 
Example
 
 c1t10d0s2   vmdisk1   dg1   "pci@1f,0/pci@1/scsi@3,1/sd@a,0:c,raw"   sd24
 
Mike

Comments 4 CommentsJump to latest comment

Girish Puppala's picture

Mike,

It is nice script

 

Thank you

 

-Girish

-1
Login to vote
Girish Puppala's picture

Hi Mike,

I do see a small Side affect of this script when we execute it. We see monitoring time out for disk group resources, if we have hundreds of disks.

Want to share, how to get mapping of sdx  to cxtxdx devices in  another way

just need to execute below commands:

# iostat -E | grep Soft | awk '{ print $1}' > /tmp/a; iostat -En | grep Soft|awk '{ print $1 }' > /tmp/b; paste /tmp/a /tmp/b

 

-Girish Puppala

-1
Login to vote
mikebounds's picture

My script only runs one vx command - "vxdisk -qe -o alldgs list" (NOT in a loop), so it doesn't sound right that running one vx command can cause monitoring timeouts - perhaps confirm this by running just "vxdisk -qe -o alldgs list" to see if you get monitor timeouts.

Anyway, thanks for sharing information. I don't have access to a Solaris server right now, so could you post output of the first few lines of

iostat -E | grep Soft
ostat -En | grep Soft

To see what these provide - seems like it may be an easier method than correlating:

sar -d
ls /etc/path_to_inst
ls /dev/rdsk

 

as in technote http://www.symantec.com/docs/TECH22381 referenced above.

Mike

UK Symantec Consultant in VCS, GCO, SF, VVR, VxAT on Solaris, AIX, HP-ux, Linux & Windows

If this post has answered your question then please click on "Mark as solution" link below

-1
Login to vote
Girish Puppala's picture

Hi Mike,

You are right.vxdisk command may not cause issues. However I tried your script on server and I got an Incident for monitoring time out. It is ok as the timeout happened only once. No issues

Here is the output requested..

Server $ iostat -E| grep Soft | head
sd0      Soft Errors: 0 Hard Errors: 0 Transport Errors: 0
sd1      Soft Errors: 0 Hard Errors: 0 Transport Errors: 0
sd29     Soft Errors: 0 Hard Errors: 0 Transport Errors: 2516
sd63     Soft Errors: 0 Hard Errors: 44 Transport Errors: 0
sd62     Soft Errors: 0 Hard Errors: 61 Transport Errors: 0
sd67     Soft Errors: 0 Hard Errors: 0 Transport Errors: 0
sd68     Soft Errors: 0 Hard Errors: 0 Transport Errors: 0
sd69     Soft Errors: 0 Hard Errors: 20 Transport Errors: 0
sd70     Soft Errors: 0 Hard Errors: 266 Transport Errors: 0
sd81     Soft Errors: 0 Hard Errors: 152 Transport Errors: 0
Server $ iostat -En| grep Soft | head
c1t0d0          Soft Errors: 0 Hard Errors: 0 Transport Errors: 0
c1t1d0          Soft Errors: 0 Hard Errors: 0 Transport Errors: 0
c0t0d0          Soft Errors: 0 Hard Errors: 0 Transport Errors: 2516
c3t16d67        Soft Errors: 0 Hard Errors: 44 Transport Errors: 0
c3t16d68        Soft Errors: 0 Hard Errors: 61 Transport Errors: 0
c4t17d67        Soft Errors: 0 Hard Errors: 0 Transport Errors: 0
c4t17d68        Soft Errors: 0 Hard Errors: 0 Transport Errors: 0
c3t16d70        Soft Errors: 0 Hard Errors: 20 Transport Errors: 0
c3t16d71        Soft Errors: 0 Hard Errors: 266 Transport Errors: 0
c3t16d72        Soft Errors: 0 Hard Errors: 152 Transport Errors: 0

 

-Girish Puppala

 

-1
Login to vote