- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- map a unix file to physical device which this file...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-05-2000 08:48 AM
12-05-2000 08:48 AM
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-05-2000 09:04 AM
12-05-2000 09:04 AM
Re: map a unix file to physical device which this file rsides on
Try this :
ioscan -fnkCdisk
disk 7 10/8.10.0 sdisk CLAIMED DEVICE SEAGATE ST39173WC
/dev/dsk/c1t10d0 /dev/rdsk/c1t10d0
Class is disk and driver is sdisk
Or try this :
ll /dev/rdsk/c1t10d0
crw-r----- 1 bin sys 188 0x01a000 Aug 21 1998 /dev/rdsk/c1t10d0
then
lsdev -C disk
Character Block Driver Class
177 28 disc3 disk
188 31 sdisk disk
188 means sdisk driver.
Regards,
Patrice.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-05-2000 09:17 AM
12-05-2000 09:17 AM
Re: map a unix file to physical device which this file rsides on
if I have a unix file name (i.e. /users/shai/test.txt) how do I map it to physical device, considering LVM maybe present or not
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-05-2000 09:41 AM
12-05-2000 09:41 AM
SolutionIf it's not LVM then /etc/mnttab will contain the disk device name associated with the relevant mount point.
If it's LVM then /etc/mnttab will contain the logical volume name as above. lvdisplay -v
You'd have to analyse the filesystem itself to determine which blocks make up the file then work out the disks from the volume extent map.
All in all not an easy task!
Regards,
John
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-05-2000 09:58 AM
12-05-2000 09:58 AM
Re: map a unix file to physical device which this file rsides on
it returns the name of the filesystem. The rest is just a bit awk and lvdisplay....
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-05-2000 01:42 PM
12-05-2000 01:42 PM
Re: map a unix file to physical device which this file rsides on
You could use " bdf . " on your home path:
example:
bdf .
filesystem kbytes used avail
/dev/vg00/lvol4 32768 31992 776
%used Mounted
98% /home
lvdisplay -v /dev/vg00/lvol4 | more
this will show you the physical device from your path of /users/shai
Best Regards,
Eddie
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-06-2000 05:53 AM
12-06-2000 05:53 AM
Re: map a unix file to physical device which this file rsides on
Run man on vgdisplay, pvdisplay, and lvdisplay.
The physical volumes are space that is sliced up into logical volumes. The logical volumes get converted into filesystems. You mount the filesystems to directories. And your file sits in a directory.
I'm sure there's a document that discusses logical volume management somewhere on this site.
Steve ^_^
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-06-2000 06:59 AM
12-06-2000 06:59 AM
Re: map a unix file to physical device which this file rsides on
If you are using LVM there there is no concept of a file on a particular disk. It could be on one disk, or more than one disk. Thats the whole idea behing 'logical' volume manager.
If you dont use LVM then its a little easier, as least you know all of your file must be on 1 disk, not across multiple disks. However, this doesnt help you because I dont know of any command to show you which disk a file is on.
There is one possibility. Use a little script which dd's your file and use sar (which lists i/o by disk - not lvm) and see which disk is being hit hard over time, thats almost certainly the one your file is on. Run it at a quiet time though, or else you may not get good results or impact the performance on other processes.
Something like this;
while true
do
dd if=
done &
This then runs in the background until you do the fg command then CTRL-C to stop it, or kill it. While its running use;
sar -d 1 10000
and watch the disk i/o traffic. The disk your file is on should be listed almost every time interval. Run it for 30 secs or so and you should have identified the disk your file is on. Not perfect but the only way I know of possibly doing it.