Two options:

1. use a command from the database edition that provides this sort of
mapping:
vxstorage_stats
Although this command was targeted at the database market, it works on
any file.
The requirements and such are in chapter ~8 of the DBED Administrator's
Guide.  Man page below. Note that, at least in the past, the developers
stuck this and other commands in their own directory, rather than
provide links into /opt/VRTS/bin, so you may have to edit your PATH
variable.

2. use fsdb to get the block map of the file; use that to calculate the
offsets yourself and figure out the corresponding volume locations; use
those to figure out the subdisk locations.

Note that a file can have >1 extent, and an extent can span subdisks, so
a file can very possibly reside on multiple LUNs.

Regards,
Scott


--------------------

vxstorage_stats
NAME

vxstorage_stats - Veritas Storage Foundation for Databases file
statistics utility
SYNOPSIS

For Oracle: /opt/VRTSdbed/bin/vxstorage_stats [-m] [-s]
[-i interval -c count ] -f filename

For DB2:

/opt/VRTSdb2ed/bin/vxstorage_stats [-m] [-s]
[-i interval -c count ] -f filename
AVAILABILITY

This command is part of Veritas Storage Foundation for Databases.

To determine whether Veritas Storage Foundation for Oracle is installed
on a Solaris system, enter:
pkginfo -l VRTSdbed

To determine whether Veritas Storage Foundation for DB2 is installed on
a Solaris system, enter:
pkginfo -l VRTSdb2ed
DESCRIPTION

The vxstorage_stats command prints I/O mapping and statistics about one
or more Veritas File System files. The statistics are recorded only for
VxFS files and VxVM volumes. These statistics show I/O activity.
OPTIONS

The following options are supported:

-m

Displays the I/O stack mapping topology for the specified file.

-s

Displays the file statistics for the specified file.

-c count

Specifies the number of times to print statistics. -i interval is
required to use -c count.

-i interval

Specifies the interval frequency for printing updated I/O statistics. If
the -i interval option is supplied, statistics are prefaced with a time
stamp showing the current local time on the system. If -i interval and
-c count are not specified, the default is one count (that is,
statistics will be printed a single time). Note: I/O topology
information is printed first; subsequent refreshes display statistics
only.

-f filename

Specifies the file to print I/O mapping and statistics for.
NOTES

In vxstorage_stats command output, I/O topology information appears
first followed by summary statistics for each object. Summary statistics
are printed in single line output records, preceded by two header lines.
The output line consists of the following space-separated fields:

            *file name

            *number of read operations

            *number of write operations

            *number of blocks read

            *number of blocks written

            *average time spent on read operations in the interval

            *average time spent on write operations in the interval

The vxstorage_stats command exits with a non-zero status if the
attempted operation fails. A non-zero exit code is returned for the
first condition that prevented execution of the utility.
EXAMPLES

Note that for Oracle, the command is located under /opt/VRTSdbed/bin.
For DB2, it is located under /opt/VRTSdb2ed/bin.

To print the entire I/O mapping:

# /opt/VRTSdbed/bin/vxstorage_stats -m -f /data/system01.dbf

TY NAME NSUB DESCRIPTION SIZE OFFSET PROPERTIES

fi /data/system01.dbf 1 FILE 262146048 1172128 Extents: 6

Sparse Extents:0

v data_vol 2 MIRROR 8388608 0

pl vxvm:mapdg/data_vol-01 1 CONCAT_VOLUME 8388608 0

rd /dev/vx/rdmp/c1t10d0s2 1 PARTITION 8388608 0

sd /dev/rdsk/c1t10d0s2 1 PARTITION 35368272 0

da c1t10d0 0 DISK 35368272 0

pl vxvm:mapdg/data_vol-03 1 CONCAT_VOLUME 8388608 0

rd /dev/vx/rdmp/c1t13d0s2 1 PARTITION 8388608 0

sd /dev/rdsk/c1t13d0s2 1 PARTITION 71127180 0

da c1t13d0 0 DISK 71127180 0

To print the entire I/O mapping and statistics of each I/O stack:

# /opt/VRTSdbed/bin/vxstorage_stats -m -s -f /data/system01.dbf

TY NAME NSUB DESCRIPTION SIZE OFFSET PROPERTIES

fi /data/system01.dbf 1 FILE 262146048 1172128 Extents: 6

Sparce Extents:0

v data_vol 2 MIRROR 8388608 0

pl vxvm:mapdg/data_vol-01 1 CONCAT_VOLUME 8388608 0

rd /dev/vx/rdmp/c1t10d0s2 1 PARTITION 8388608 0

sd /dev/rdsk/c1t10d0s2 1 PARTITION 35368272 0

da c1t10d0 0 DISK 35368272 0

pl vxvm:mapdg/data_vol-03 1 CONCAT_VOLUME 8388608 0

rd /dev/vx/rdmp/c1t13d0s2 1 PARTITION 8388608 0

sd /dev/rdsk/c1t13d0s2 1 PARTITION 71127180 0

da c1t13d0 0 DISK 71127180 0

OPERATIONS FILE BLOCKS(512 byte) AVG TIME(ms)

OBJECT READ WRITE B_READ B_WRITE AVG_RD AVG_WR

/data/system01.dbf 615 19 20752 152 3.53 24.74

/dev/vx/rdsk/mapdg/data_vol 19444 33318 895903 1376825 9.26 16.14

vxvm:mapdg/data_vol-01 19444 33318 895903 1376825 9.24 14.00

/dev/rdsk/c1t10d0s2 19444 33318 895903 1376825 9.24 14.00

c1t10d0 19444 33318 895903 1376825 9.24 14.00

vxvm:mapdg/data_vol-03 0 33318 0 1376825 0.00 14.18

/dev/rdsk/c1t13d0s2 0 33318 0 1376825 0.00 14.18

c1t13d0 0 33318 0 1376825 0.00 14.18

To print statistics two times with a time interval of two seconds:

\$# /opt/VRTSdbed/bin/vxstorage_stats -s -i2 -c2 -f /data/system01.dbf

OPERATIONS FILE BLOCKS(512 byte) AVG TIME(ms)

OBJECT READ WRITE B_READ B_WRITE AVG_RD AVG_WR

/data/system01.dbf 615 19 20752 152 3.53 24.74

/dev/vx/rdsk/mapdg/data_vol 19386 33227 895692 1376438 9.27 16.18

vxvm:mapdg/data_vol-01 19386 33227 895692 1376438 9.26 14.03

/dev/rdsk/c1t10d0s2 19386 33227 895692 1376483 9.26 14.03

c1t10d0 19386 33227 895692 1376483 9.26 14.03

vxvm:mapdg/data_vol-03 0 33227 0 1376483 0.00 14.21

/dev/rdsk/c1t13d0s2 0 33227 0 1376483 0.00 14.21

/c1t13d0 0 33227 0 1376438 0.00 14.21

OPERATIONS FILE BLOCKS(512 byte) AVG TIME(ms)

OBJECT READ WRITE B_READ B_WRITE AVG_RD AVG_WR

/data/system01.dbf 0 0 0 0 0.00 0.00

/dev/vx/rdsk/mapdg/data_vol 0 1 0 2 0.00 0.00

vxvm:mapdg/data_vol-01 0 1 0 2 0.00 0.00

/dev/rdsk/c1t10d0s2 0 1 0 2 0.00 0.00

c1t10d0 0 1 0 2 0.00 0.00

vxvm:mapdg/data_vol-03 0 1 0 2 0.00 0.00

/dev/rdsk/c1t13d0s2 0 1 0 2 0.00 0.00

c1t13d0 0 1 0 2 0.00 0.00
SEE ALSO

Veritas Storage Foundation for Oracle Administrator's Guide Veritas
Storage Foundation for Oracle RAC Installation and Configuration Guide
Veritas Storage Foundation for DB2 Administrator's Guide

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
[EMAIL PROTECTED]
Sent: Tuesday, November 13, 2007 6:17 AM
To: veritas-vx@mailman.eng.auburn.edu
Subject: [Veritas-vx] Where are the files ?

Hello,

we have Sparc/Solaris 10 + VSF 4.1 + hardware array and one concatenated
volume:

drozd:/root# vxprint -htg drozd-whiskey2-dg
DG NAME         NCONFIG      NLOG     MINORS   GROUP-ID
ST NAME         STATE        DM_CNT   SPARE_CNT         APPVOL_CNT
DM NAME         DEVICE       TYPE     PRIVLEN  PUBLEN   STATE
RV NAME         RLINK_CNT    KSTATE   STATE    PRIMARY  DATAVOLS  SRL
RL NAME         RVG          KSTATE   STATE    REM_HOST REM_DG REM_RLNK
CO NAME         CACHEVOL     KSTATE   STATE
VT NAME         NVOLUME      KSTATE   STATE
V  NAME         RVG/VSET/CO  KSTATE   STATE    LENGTH   READPOL PREFPLEX
UTYPE
PL NAME         VOLUME       KSTATE   STATE    LENGTH   LAYOUT NCOL/WID
MODE
SD NAME         PLEX         DISK     DISKOFFS LENGTH   [COL/]OFF DEVICE
MODE
SV NAME         PLEX         VOLNAME  NVOLLAYR LENGTH   [COL/]OFF AM/NM
MODE
SC NAME         PLEX         CACHE    DISKOFFS LENGTH   [COL/]OFF DEVICE
MODE
DC NAME         PARENTVOL    LOGVOL
SP NAME         SNAPVOL      DCO

dg drozd-whiskey2-dg default default  41000    1178628605.60.drozd

dm disk-24      HDS9500-ALUA0_24 auto 2048     41853696 -
dm disk-25      HDS9500-ALUA0_25 auto 2048     41853696 -
dm disk-26      HDS9500-ALUA0_26 auto 2048     41853696 -
dm disk-27      HDS9500-ALUA0_27 auto 2048     41853696 -

v  drozd-whiskey2-vol -      ENABLED  ACTIVE   167413760 SELECT   -
fsgen
pl drozd-whiskey2-vol-01 drozd-whiskey2-vol ENABLED ACTIVE 167413760
CONCAT - RW
sd disk-24-01   drozd-whiskey2-vol-01 disk-24 0 41853696 0
HDS9500-ALUA0_24 ENA
sd disk-25-01   drozd-whiskey2-vol-01 disk-25 0 41853696 41853696
HDS9500-ALUA0_25 ENA
sd disk-26-01   drozd-whiskey2-vol-01 disk-26 0 41853696 83707392
HDS9500-ALUA0_26 ENA
sd disk-27-01   drozd-whiskey2-vol-01 disk-27 0 41852672 125561088
HDS9500-ALUA0_27 ENA

So the volume consists four disks (in fact LUNs) with vxfs on it. There
are many files on the filesystem.
Can I check somehow on which LUN(s) some particular files are placed ?

Regards
przemol


--
http://przemol.blogspot.com/





















----------------------------------------------------------------------
"Kup bilet na najlepsze zawody Freestyle Motocross - DIVERSE Night of
the Jupms!" http://link.interia.pl/f1c5f

_______________________________________________
Veritas-vx maillist  -  Veritas-vx@mailman.eng.auburn.edu
http://mailman.eng.auburn.edu/mailman/listinfo/veritas-vx

_______________________________________________
Veritas-vx maillist  -  Veritas-vx@mailman.eng.auburn.edu
http://mailman.eng.auburn.edu/mailman/listinfo/veritas-vx

Reply via email to