1827892 Members
1682 Online
109969 Solutions
New Discussion

logical volume usage

 
Kurtkarl
Frequent Advisor

logical volume usage

hi,

How would I know how much space being used on my logical volume aside using lvdisplay? I need similar info. as I run "bdf" command which it tells how much was allocated, how much spaced was used and the space available for certain LV. But some of our LV are not mounted and only lvdisplay can give me some information on those unmounted LV. But lvdisplay does'nt say how much is currently being used by this LV.

Thanks in advance
jose
Just starting to learn thru this forum
4 REPLIES 4
Rick Garland
Honored Contributor

Re: logical volume usage

This script will detail the info you are looking for. It is a perl script and works best with perl 5 and above.

Another option is to use Xvg.
Anthony deRito
Respected Contributor

Re: logical volume usage

Joey, if the logical volumes you have in question are being used by applications using the raw device file for the logical volume, you are going to have a hard pressed time trying to figure out to what extent the logical volume is consumed. For example, our Oracle databases are using raw device files and the only way I know if I have a problem with capacity of a logical volume is my DBA calls me and tells me that Oracle is freaking out over space! Oracle has some tools that monitor table spaces and sends out notifications of this problem.

Tony
Antoanetta Naghiu
Esteemed Contributor

Re: logical volume usage

LVM and FS are separated. As it was said, you can have logical volumes used as raw partition and as well you can have file systems that resides in physical partitions (not under LVM structure).
If you are strictlly intrest to get info about logical volume, you have to use lvm commands (lvdisplay) or SAM. To get it as you wish you can create your own script using LVM commands or see the above post for the script provided.
Bill Hassell
Honored Contributor

Re: logical volume usage

bdf only works with mounted filesystems since it is reporting on directories and files. An unmounted filesystem might be a swap or dump area (no files, just raw data) or as mentioned, an Oracle raw database. Oracle manages this space without any help from HP-UX so only Oracle tools can determine how 'full' the logical volume might be. Typically, databases reserve a chunk of space (raw or filesystem) and don't typically add additional space.

Volumes that are used in a raw mode should be carefully documented so as not to accidently trash binary data. SAM (and LVM commands) have no way to know that these areas of the disk contain useful inofrmation. I typically add a comment in /etc/fstab for any lvol that is used for raw.


Bill Hassell, sysadmin