Operating System - HP-UX
1832296 Members
2108 Online
110041 Solutions
New Discussion

SG/ EMS Resource Config Question

 
SOLVED
Go to solution
Ron Cornwell
Trusted Contributor

SG/ EMS Resource Config Question

Is there a way to monitor that a logical volume is mounted? I can currently do this by monitoring that there is free space in the filesystem, but if all space is used it will fail. I want the package to only fail if the logical volume becomes unavailable/ umounted. Thanks in advance. Ron
3 REPLIES 3
James R. Ferguson
Acclaimed Contributor
Solution

Re: SG/ EMS Resource Config Question

Hi Ron:

Given the mountpoint (directory) test whether the inode number is two (2). A mounted filesystem will always have an inode number of two.

# ls -id /myfs

...returns:

2 /myfs #...when mounted

Regards!

...JRF...
Dirk Wiedemann
Respected Contributor

Re: SG/ EMS Resource Config Question

Hello Ron,

I use this trick in a script:
vgdisplay 2>&1|grep "VG Name"|cut -c29-40
It returns you a list of all volume groups your system can access.

hope this helps
Dirk
Ron Cornwell
Trusted Contributor

Re: SG/ EMS Resource Config Question

James - Thanks, I am currently in class and my teacher liked your answer. When I get back home I will definately use this.