Operating System - HP-UX
1834112 Members
2264 Online
110063 Solutions
New Discussion

how to find logical volume from filesystem mount point

 
SOLVED
Go to solution
Ra Jose
Regular Advisor

how to find logical volume from filesystem mount point

Does anyone knows how to find the logical volume on which the filesystem is mounted.
I am running HP-UX 11iv1 on rp7420 (npar).
I have one filesystem /usr/oracle/ctemp
Apparently, a lvol was mounted on this
/usr/oracle/ctemp mount point. But this was not
added to fstab nor to SG cluster pkg cntl script.
This server got hung sometime back and we had no other option but to reset the box.

Since this filesystem /usr/oracle/ctemp was not in fstab nor in SG cntl script, this was not mounted.

How can I find out which volume group, logical volume this filesystem belongs.?

Thank you all

RaJose
13 REPLIES 13
James R. Ferguson
Acclaimed Contributor

Re: how to find logical volume from filesystem mount point

Hi:

# mount -p

Regards!

...JRF...
DCE
Honored Contributor

Re: how to find logical volume from filesystem mount point

The mount point may not not configured to mount at boot

You can try SAM to show more info on it

highlight the filesystem /usr/oracle/ctemp and display more info on it - it should show you the mount info

SAM does have some use.........
spex
Honored Contributor

Re: how to find logical volume from filesystem mount point

Hello,

Look at the first column of the output from:
$ bdf

PCS
Patrick Wallek
Honored Contributor

Re: how to find logical volume from filesystem mount point

spex -- If the filesystem isn't mounted, bdf isn't going to give you any information.
Hemmetter
Esteemed Contributor
Solution

Re: how to find logical volume from filesystem mount point

Hi RaJose,

the filesystem was there before reboot
and now it is not?

find all lvols that are currently not mounted:
$ mount -p | awk ' {print $1 }' > f.out
$ ls -1 /dev/vg*/lvol* | grep -v -f f.out

now mount one by one somewhere an decide by content if it is the right one.

Otherwise maybe it was a CD/DVD mounted there.

rgds
HGH

Torsten.
Acclaimed Contributor

Re: how to find logical volume from filesystem mount point

If the filesystem was hfs (unlikely, of course), fsck will report "last mounted on":

fsck -n /dev/vg00/lvol1
** /dev/vg00/lvol1 (NO WRITE)
** Last Mounted on /stand
...

otherwise you have to mount the unmounted lvols and check the contents ... or (much better solution) - check your documentation!

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
spex
Honored Contributor

Re: how to find logical volume from filesystem mount point

Patrick: Thanks for pointing that out. I just glanced at the question before answering.

Ra Jose: I like Hemmetter's answer. However, if you don't want to test-mount each lvol, you could restore /etc/mnttab from a backup of vg00, and grep on the desired mountpoint.
James R. Ferguson
Acclaimed Contributor

Re: how to find logical volume from filesystem mount point

Hi (again):

> Does anyone knows how to find the logical volume on which the filesystem is mounted.

Well, if "_IS_" really means "_WAS_" then I too misread this. As Hemmetter notes, the process of elimination might work. As Torsten notes, one would like to think that you have documentation.

Regards!

...JRF...
Ra Jose
Regular Advisor

Re: how to find logical volume from filesystem mount point

Thank you all. Hemmeter's solution worked.
I had to do little tweaking but Hemmeter's approach was right. From the bdf output, I compared with what we have in all of /dev/vg
directories. A process of elimination left me with one which I guessed should be the one I was trying to mount. Luckily, it was.

Thanks again.

RaJose.
James R. Ferguson
Acclaimed Contributor

Re: how to find logical volume from filesystem mount point

Hi RaJose:

Actually you can examine the filesystem for its contents *_without*_ mounting it:

# ncheck /dev/vgNN/lvolX

Regards!

...JRF...
Torsten.
Acclaimed Contributor

Re: how to find logical volume from filesystem mount point

James - to be honest - I never heard of this command. That's why I love this forum - you can learn something new everyday!

Have fun!

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
Ra Jose
Regular Advisor

Re: how to find logical volume from filesystem mount point

Thank you James. Just tried. This is very good tool to check what files/directories are contained in each lvol.

Thank you, unfortunately th thread is closed and I can't even assign points. But take it for me, this is 9 points.

RaJose.
James R. Ferguson
Acclaimed Contributor

Re: how to find logical volume from filesystem mount point

Hi (again):

Well, you _can_ reopen the thread and assign some points :-)

Regards!

...JRF...