Operating System - HP-UX
1753746 Members
5038 Online
108799 Solutions
New Discussion юеВ

Given a device file name, howto find its mount point

 
SOLVED
Go to solution
Fay_1
Contributor

Given a device file name, howto find its mount point

Given a device file name: /dev/rdisk/c69t6d6, how to find its mount point.

df -k shows a list of mount points that are assoicated with the logical volumn but is there some other command that can assoicate the mount point with the physical disk?
9 REPLIES 9
Sanjay_6
Honored Contributor

Re: Given a device file name, howto find its mount point

Hi Fay,

You cannot find the mount point for the device file if you don't have that information in your /etc/fstab file. On old hfs filesystems i think it used to store the last mount point name.

Hope this helps.

Regds
Sanjay_6
Honored Contributor

Re: Given a device file name, howto find its mount point

Hi Fay,

If your filesystem is a hfs filesystem, this link can help you,

http://us-support.external.hp.com/cki/bin/doc.pl/sid=5bd1717810a02403ad/screen=ckiDisplayDocument?docId=200000047992588

Hope this helps.

Regds
Thierry Poels_1
Honored Contributor

Re: Given a device file name, howto find its mount point

Hi,

you could grep /dev/dsk/c69t6d6 /etc/fstab or /etc/mnttab.
But there is no fixed relation between disk & mount point, you can mount /dev/dsk/c69t6d6 on /aaa, unmount it, and remount it on /bbb.

regards,
Thierry.
All unix flavours are exactly the same . . . . . . . . . . for end users anyway.
harry d brown jr
Honored Contributor

Re: Given a device file name, howto find its mount point

pvdisplay -v /dev/dsk/c69t6d6 | more

will show you what VG is using it if any, and any LV's within that VG.

live free or die
harry
Live Free or Die
Bill McNAMARA_1
Honored Contributor
Solution

Re: Given a device file name, howto find its mount point

Type
# mount -p

Later,
Bill
It works for me (tm)
Bill McNAMARA_1
Honored Contributor

Re: Given a device file name, howto find its mount point

accidental submit, wasn't finished.

From mount -p you get the volume group and lvol:

/dev/vg00/lvol7 /usr vxfs delaylog,nodatainlog 0 0

So /usr/ is in vg00

pereal:root> strings /etc/lvmtab
/dev/vg00
/dev/dsk/c3t15d0
/dev/dsk/c1t15d0

Or the way you want.

Have /dev/dsk/c3t15d0
strings /etc/lvmtab
oh its in vg00

mount -p | grep vg00

for all the file systems

lvdisplay -v all the lvols to find out exactly where the are.

Later,
Bill
It works for me (tm)
Santosh Nair_1
Honored Contributor

Re: Given a device file name, howto find its mount point

Unless you're using the whole disk for one filesystem and not using LVM, then a disk is usually associated with several mount points. I think you'd have to write a little script which would parse the output from mount -p and correlate that with the output from pvdisplay -v . Hope this helps.

-Santosh
Life is what's happening while you're busy making other plans
T G Manikandan
Honored Contributor

Re: Given a device file name, howto find its mount point

Hello,
fsck of the logical device file name should give the mount point.
#fsck /dev/rdsk/cxdx..


Roger Baptiste
Honored Contributor

Re: Given a device file name, howto find its mount point

<>

If this is a HP-UX box and you are using LVM on the system, do

#/usr/sbin/pvdisplay /dev/dsk/cxtydz

<>

In non-LVM setup, it is straightforward,
you do any of the: (all apply to HP-UX)
#df -k
#bdf
#mount
#cat /etc/fstab

IF it is LVM setup, then remember that disks
are grouped together in a structure called Volumegroup and then LV's are carved from it.
So, one physical disk can have more than one logical structure sitting on it. The command
to check that would be pvdisplay.

HTH
raj
Take it easy.