Operating System - HP-UX
1838134 Members
4448 Online
110124 Solutions
New Discussion

Re: Finding logical volumes for a mountpoint

 
mark yeo
Advisor

Finding logical volumes for a mountpoint




# lvcreate -L 1000 -n lvol20 /dev/vg01
# newfs -F vxfs /dev/vg01/rlvol20
# mount /dev/vg01/lvol20 /mymountpoint


the above is not added to the fstab file. assuming that now the system is reboot, how can one supposed to find the logical volume of this mymountpoint?
7 REPLIES 7
bhavin asokan
Honored Contributor

Re: Finding logical volumes for a mountpoint

hi,

use like this

#lvcreate -L 1000 -n lvmymountpoint /dev/vg01
# newfs -F vxfs /dev/vg01/rlvmymountpoint
# mount /dev/vg01/lvmymountpoint /mymountpoint


regds,

Sridhar Bhaskarla
Honored Contributor

Re: Finding logical volumes for a mountpoint

Hi Mark,

If it is hfs, an 'fsck' on it would have shown the 'last mounted on' information. But it's not possible with vxfs. You will have to use trail and error methods such as mounting it on a test directory, look at the contents etc.,.

What I normally do is not to issue 'mount' command that way. After newfs, I would add the entry in /etc/fstab and confirm it by simply running the command "mount /mymountpoint". That way I am sure that it is going to pickup after reboot.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Ranjith_5
Honored Contributor

Re: Finding logical volumes for a mountpoint

Hi mark,


1.) By manually mounting the LV and seeing the data.

2.) You can find out the last created LV by finding the last created LV device file name by ls -alR /dev/vg*


Regards,
Syam
Slawomir Gora
Honored Contributor

Re: Finding logical volumes for a mountpoint

Hi,

try to search root history file for mount command.
twang
Honored Contributor

Re: Finding logical volumes for a mountpoint

you're right, so you need to edit the file /etc/fstab, for example,
/dev/vg01/lvol20 /mymountpoint vxfs rw,suid,nolargefiles,delaylog,datainlog 0 2
Ian Foster_2
Frequent Advisor

Re: Finding logical volumes for a mountpoint

Also if you want a quick way to update fstab with the currently mounted file systems (if you have a few to add), try :

# mount -p > /etc/fstab

Good practice to make a copy of your original fstab first of course, in case it all goes horribly wrong.
KapilRaj
Honored Contributor

Re: Finding logical volumes for a mountpoint

may be mark used to work on aix. aix's odm remembers the last mount point... though not in filesystems

Kaps
Nothing is impossible