Operating System - HP-UX
1833052 Members
2329 Online
110049 Solutions
New Discussion

Whick disk(s) in a vg does a file use space on

 
SOLVED
Go to solution
George Neill
Trusted Contributor

Whick disk(s) in a vg does a file use space on

Am trying to do some performance cross checking. We have a vg made up of 7 devices. How can I identify which device(s) on which a given file actually uses space? I though of trying to map the inode for the file to and extent but am not sure.

Thanks,
6 REPLIES 6
spex
Honored Contributor

Re: Whick disk(s) in a vg does a file use space on

Hi George,

# bdf

To tie the LV to its constituent PV(s):

# lvdisplay -v |more

PCS
Hein van den Heuvel
Honored Contributor

Re: Whick disk(s) in a vg does a file use space on

Not sure, but I think you need ncheck_vxfs to dive into that if need be. See its man page. ls -i to get you the inode to start with

You would still need the potentially tedious LV - PV mapping for each PE in use.

You may also want to check:
http://docs.hp.com/en/B3929-90011/ch02.html

How about the pratical approach? copy the file to /dev/null and use same to 'see' where the IOs are going?

'getext' and 'fsdb_vxfs' are other commands in this space, but doesn't give want you need.


hth,
Hein van den Heuvel
HvdH Performance Consulting

George Neill
Trusted Contributor

Re: Whick disk(s) in a vg does a file use space on

That gives me lv where the file is and that is the only lv in the vg so it is spread across all devices in the vg. The lv is not stipped or distributed.
Rick Garland
Honored Contributor

Re: Whick disk(s) in a vg does a file use space on

If you do 'pvdisplay -v /dev/dsk/cXtYdZ'
this will list what VG/LV are on that physical volume. Will also provide a number of LE being used for each VG/LV

Pipe your pvdisplay command to more as the output you want is toward the top.
TwoProc
Honored Contributor
Solution

Re: Whick disk(s) in a vg does a file use space on

If these disks are striped - don't bother. Assuming that the disks are not striped - you have a chance. If you have Online JFS and if you can do this, reorg the disk space before trying the suggestion below - you'd have a better chance of your file being on a single drive.
.....

If you can do it - An ugly suggestion:

If you can edit the file manually - add some text to it, like "ICANFINDTHEDISK" at the end of the file.

Then, after determining which disks are in the VG - just do a

grep "ICANFINDTHEDISK" /dev/dsk/xxxx | strings -A

The problem next becomes: the file can easily exist across multiple disks.

Lastly, if you can't add a string to the file that you'd like, do a "strings -A" command on the file, and see if there is a string in there that is already highly identifible. If you're lucky - You may find that it only shows up on one disk in the vg.
We are the people our parents warned us about --Jimmy Buffett
George Neill
Trusted Contributor

Re: Whick disk(s) in a vg does a file use space on

Thanks to all. I think we have what we needed.