How to use AIX V5.3 fileplace to determine the location on disk of a given file block
This web page is meant to supplement, not replace, other documentation which has been published:
The fileplace
command displays the location of blocks within a file on the logical volume or physical volume(s) which underlie the filesystem in which the file resides. The fileplace command can be used, among many other things, to determine if a file is laid out sequentially on the underlying logical volume or physical volumes.
The fileplace command has two flags which are (as of 12/10/2008) documented neither in the fileplace man page nor in the fileplace
article in the System p and AIX Information Center. There is documentation in the usage message produced by fileplace:
A more complete explanation is:
| -o |
specifies the offset of the first block to be displayed (1st block is at offset 0, 2nd block is at offset 1, 3rd block is at offset 2, etc) |
| -n |
specifies the number of blocks to be displayed |
So, for example, to display the location on the underlying physical volume of the 18th block in file /usr/lib/boot/unix_mp, use:
In the example above, the 18th block of the file (at block offset 17 within the file) resides in the block at offset 1850993 on hdisk0 and at offset 23633 on logical volume hd2.
Alternatively, use:
and examine the last block displayed.
The dd command can be used to confirm that the file block, the logical volume block, and the disk block all contain the same data:
The dd command might perform better if raw devices are used rather than block devices:
The contents of this web page solely reflect the personal views of the authors and do not necessarily represent the views, positions, strategies or opinions of IBM or IBM management. Please use the
Add Comment link at the bottom of the page to provide feedback. Note: Until you sign in (using the link in the upper right corner of this web page), you will not see the
Add Comment link and you can not add a comment. If you do not already have an IBM ID, use the Register Now link on the sign in page to obtain one. Registration is quick and easy.