Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: OT - File System to Disk Mapping

RE: OT - File System to Disk Mapping

From: Deshpande, Kirti <kirti.deshpande_at_verizon.com>
Date: Thu, 23 Aug 2001 08:08:54 -0700
Message-ID: <F001.00375290.20010823075628@fatcity.com>

This becomes rather easy with some naming standards in place. We define Volume Group Name that represents a set of disks in it (d01vg, d02vg..)
The Logical Volume names contain the lower case sid name, a portion of the mount point directory name and a portion of the VG name. These two things in addition to OFA structure makes it easy to figure out what disks are used by what file systems and for what databases.

Here is a small script that does it all (for HP-UX)..

!/usr/bin/ksh
# show_disk_devices.ksh
# Run it with lower case SID name as input SID=$1
OUTFILE=/tmp/${SID}_devices.txt
bdf | grep ${SID}|xargs lvdisplay -v | grep ' /dev' > ${OUTFILE} #

Here is a sample output for database IWHP:

LV Name                     /dev/d02vg/u999iwhpd02lv  <-- will be mounted on
/u999/oradata/IWHP
VG Name                     /dev/d02vg
   /dev/dsk/c3t0d6    209       209
   /dev/dsk/c5t4d0    241       241
LV Name                     /dev/d03vg/u99iwhpd03lv
VG Name                     /dev/d03vg
   /dev/dsk/c5t3d0    90        90
   /dev/dsk/c5t4d0    422       422
LV Name                     /dev/d04vg/u98iwhpd04lv
VG Name                     /dev/d04vg
   /dev/dsk/c3t0d4    18        18
   /dev/dsk/c3t0d5    96        96
   /dev/dsk/c3t0d6    18        18
   /dev/dsk/c4t2d0    17        17
 

HTH,

> -----Original Message-----
> From: Jonathan Lewis [SMTP:jonathan_at_jlcomp.demon.co.uk]
> Sent: Thursday, August 23, 2001 4:01 AM
> To: Multiple recipients of list ORACLE-L
> Subject: Re: OT - File System to Disk Mapping
>
>
> A logical volume is not necessarily associated with
> a single disc as in most cases people tend to
> mirror/stripe a volume group across many disks
> before creating logical volumes in the volume
> group.
>
> However, if you execute
> vgdisplay -v /dev/vg00
>
> then the tail end of the report will show you the
> list of physical volumes (i.e. discs) associated
> with the volume group.
>
> PV Name /dev/dsk/c0t5d0
> PV Status available
> Total PE 2169
> Free PE 1328
> Autoswitch On
>
> You will also get a list of the logical volumes
> in the volume group
>
> LV Name /dev/vg00/lvol3
> LV Status available/syncd
> LV Size (Mbytes) 140
> Current LE 35
> Allocated PE 35
> Used PV 1
>
>
> If you want to track down extreme levels of detail,
> you can issue:
> lvdisplay -v /dev/vg00/lvol3
>
> Amongst other things, this will tell you how much
> of that logical volume is on each physical volume
> of the volume group
>
> --- Distribution of logical volume ---
> PV Name LE on PV PE on PV
> /dev/dsk/c0t5d0 35 35
>
> --- Logical extents ---
> LE PV1 PE1 Status 1
> 00000 /dev/dsk/c0t5d0 00277 current
> 00001 /dev/dsk/c0t5d0 00278 current
> 00002 /dev/dsk/c0t5d0 00279 current
>
>
>
> Jonathan Lewis
>
> Host to The Co-Operative Oracle Users' FAQ
> http://www.jlcomp.demon.co.uk/faq/ind_faq.html
>
> Author of:
> Practical Oracle 8i: Building Efficient Databases
> See http://www.jlcomp.demon.co.uk/book_rev.html
>
> For latest news of public appearances
> See http://www.jlcomp.demon.co.uk
>
> Screen saver or Life saver: http://www.ud.com
> Use spare CPU to assist in cancer research.
>
>
>
>
> -----Original Message-----
> To: Multiple recipients of list ORACLE-L <ORACLE-L_at_fatcity.com>
> Date: 23 August 2001 05:03
>
>
> |Hello all,
> |
> |If I want to know from the unix system point of view, which disk is
> being bombarded by a particular data file, how do I come to know. I
> have used the mount command but that gives me the logical volume, but
> does not give the disk name that it is hitting.
> |
> |This is on hp11. I can come to know from the mount command that
> oracle datafiles are on /dev/vg00/lvol3
> |
> |But I want to know which disk does /dev/vg00/lvol3 hit? whether it
> hits disk c1t2d0 or c2t2d0 ?
> |
> |Any unix guru can tell me what command to see apart from mount which
> I have used?
> |
> |thanks.
> |
> |raja
> |
>
>

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Deshpande, Kirti
  INET: kirti.deshpande_at_verizon.com

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
Received on Thu Aug 23 2001 - 10:08:54 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US