Operating System - HP-UX
1834277 Members
2295 Online
110066 Solutions
New Discussion

Re: mount point to disk mapping

 
SOLVED
Go to solution
Chris Baugh
Occasional Advisor

mount point to disk mapping

Apologies if this is a basic question. Is there any way of reporting mount point to disk mappings, or are there any files on the system that will contain the details.

I need to check the mappings on a clients system, so don't have root access.
6 REPLIES 6
melvyn burnard
Honored Contributor

Re: mount point to disk mapping

bdf
My house is the bank's, my money the wife's, But my opinions belong to me, not HP!
AwadheshPandey
Honored Contributor

Re: mount point to disk mapping

bdf will show ur currently mounted file systems, view /etc/fstab file, mount points in this file will mount once u will issue a mount -a command or during a system reboot.
It's kind of fun to do the impossible
Chris Baugh
Occasional Advisor

Re: mount point to disk mapping

Sorry, I haven't been clear with my question.
I know /etc/fstab will display the Volume to Mount point mapping. What I wanted was to go a step further and find the Volume to device file mapping. For example, on our development machine

Mount Point /u10 maps to Volume /dev/vg01/lvol20, which in turn maps to Device File /dev/dsk/c3t15d0
Darrel Louis
Honored Contributor
Solution

Re: mount point to disk mapping

Chris,

With the following command you can see which disks belong to a Volume group:
strings /etc/lvmtab
/dev/vg00
/dev/dsk/c1t6d0
/dev/dsk/c2t6d0

With pvdisplay -v
You can see which lvols are on the disk.

Darrel
Ninad_1
Honored Contributor

Re: mount point to disk mapping

Here have this - this will give you the output mountpoint:volumename:disk1:disk2:..

mount | awk '{print $1,$3}' | while read mountpt volname
do
echo "$mountpt:$volname:\c"
lvdisplay -v $volname | awk '/Distribution of logical volume/,/Logical extents/' | grep '/dev/dsk' | awk 'ORS=":" {print $1}'
echo "\r"
done

Regards,
Ninad
Chris Baugh
Occasional Advisor

Re: mount point to disk mapping

Thanks for all replies, they were exactly what I was after