Operating System - HP-UX
1834751 Members
3145 Online
110070 Solutions
New Discussion

Re: how to determine origianl mount point for unmounted fs?

 
SOLVED
Go to solution
Mark Henry_1
Frequent Advisor

how to determine origianl mount point for unmounted fs?

Hi all,

Is there any way to tell what the former mount point is for a logical volume which is unmounted and has no entry in fstab?
This would be an unusual case, but for example with serviceguard there is no entry in fstab and if it's unmounted, how to know where it was originally? (assuming your svcguard control files are unavailable).

Cheers,

Mark
10 REPLIES 10
James R. Ferguson
Acclaimed Contributor

Re: how to determine origianl mount point for unmounted fs?

Hi Mark:

Interesting question. I don't think there is any way to determine a "former" mountpoint in the absence of other, manual documentation.

Regards!

...JRF...
A. Clay Stephenson
Acclaimed Contributor

Re: how to determine origianl mount point for unmounted fs?

Hi Mark:

Unless the filesystem was not cleanly unmounted
so that /etc/mnttab still has a entry, you are out out luck. Your best bet is to simply mount the lvol on a dummy mountpoint and see if you recognize the files/directories.



If it ain't broke, I can fix that.
Wodisch
Honored Contributor

Re: how to determine origianl mount point for unmounted fs?

Hello,

if I remember correctly, then the last part of the mount
point is actually stored in the superblock of the filesystem
and will be shown by "fsck". Use the option "-n" to not
risk modifying it...
Well, it is only the rightmost directory, but that you may
"find".
Example
It was:
mount /dev/vgXX/lvolYY /the/mount/point

then it was unmounted and now in the superblock should
be left the right-most part, i.e. "point", which you would
find like here:
find / -type d -name "point" -print

HTH,
Wodisch
James R. Ferguson
Acclaimed Contributor

Re: how to determine origianl mount point for unmounted fs?

Hi Mark:

Another thing you could do is put a wrapper arount the 'mount' command. This need only be a shell script. The script can use the 'logger' command (see man 'logger') to write the arguments passed to it into /var/adm/syslog/syslog.log before passing those arguments along to 'mount'.

Regards!

...JRF...
Sanjay_6
Honored Contributor

Re: how to determine origianl mount point for unmounted fs?

Hi Mark,

whenever a SG package is started and the filesystems for that package are mounted, the entries are made in the package log file. You can find out the mount point of that lv from the package log. The log file is found in
/etc/cmcluster/PKG_name/PKG_name.log

Have a look at this file, if it is still there and it tells you where that lv is mounted. This file is present on all the nodes on which this package gets activated and when activating the package on that node, the log file on that node gets updated.

Hope this helps.

Thanks
Sridhar Bhaskarla
Honored Contributor

Re: how to determine origianl mount point for unmounted fs?

I well remember hfs file systems reporting "last mounted as" if fsck is done on them. If you don't want to mount the file system, you can use 'ncheck' command as well to list the contents of the filesystem and identify accordingly.

-Sri

You may be disappointed if you fail, but you are doomed if you don't try
linuxfan
Honored Contributor
Solution

Re: how to determine origianl mount point for unmounted fs?

Hi Mark,

Don't have a definite answer but i will give it a shot.

1. This is the very reason why i keep commented entries in the /etc/fstab.

2. Package control files ofcourse have the filesystem and the LV information. do you backup these machines?

3. Do a "ncheck -F vxfs /dev/vgname/rlvname"

You won't get the exact mountpoint, but you will atleast get an idea of what are the contents of the filesystem.

4. Do a "du -kx | egrep -v ""etc|opt|usr|var|sbin|dev" | more

If the mountpoints were not deleted, you would atleast know which directories were created for these filesystems.

or Like James suggested, replace the mount/unmount with a wrapper script which writes to the syslog whenever any filesystem is mounted/unmounted.

-Ramesh
They think they know but don't. At least I know I don't know - Socrates
Santosh Nair_1
Honored Contributor

Re: how to determine origianl mount point for unmounted fs?

How about just mounting the filesystem in a temporary mount point and checking the contents...maybe looking at the contents of the filesystem will give you a clue as to where it was mounted.

-Santosh
Life is what's happening while you're busy making other plans
Animesh Chakraborty
Honored Contributor

Re: how to determine origianl mount point for unmounted fs?

Hi,
Do you have any old bdf output ?
I always keep bdf output ,copy of mnttab and all necessary files in my home directory.

bdf >/home/ac/bdf.txt
cp /etc/mnttab /home/ac/mnttab.bak

Best of luck
Animesh
Did you take a backup?
James R. Ferguson
Acclaimed Contributor

Re: how to determine origianl mount point for unmounted fs?

Hi Mark:

Please note that the assignment of points helps identify contributions that solved your problem or answered your question (partially or wholely), thus assisting future readers. At this writing you have nineteen (19) unscored responses out of nineteen (19) replies to your queries.

Your profile indicates that you work for HP, so you should be setting an example.

http://forums.itrc.hp.com/cm/UserProfile/1,11913,CA622360,00.html

The official Forum guidelines can be found here:

http://us-support.external.hp.com/estaff/bin/doc.pl/forward/screen=estaffAssistance/sid=8083275902cd2c5bc8?Page=file0002#forpoints

In addition to this post, you have unscored answers in a post of yours several days ago:

http://forums.itrc.hp.com/cm/QuestionAnswer/1,11866,0x27bbcf38d6bdd5118ff10090279cd0f9,00.html

Please take a few minutes to provide the feedback that helps everyone. Thanks.

...JRF...