Operating System - HP-UX
1833777 Members
1935 Online
110063 Solutions
New Discussion

Re: How to Calculate Total of Free and Used Hard Disk on Mirror System

 
zap_2
Advisor

How to Calculate Total of Free and Used Hard Disk on Mirror System

Hi, unix gurus
I am a newbie in hpux environment, if I run bdf on my system, it appears like following:
#bdf /u02
Filesystem kbytes used avail %used Mounted on
/dev/vg01/lvol2 35831808 10567464 25067040 30% /u02
This lv if I see with sam, it looks like this

LV VG Type Use TotMB Mir Mount
lvol2 vg01 LVM VxFS 34992 1 /u02
This lv using two h/w pathes:
0/0/8/0/0.8.0.255.0.0.0
1/0/8/0/0.8.0.255.1.0.0 34992

Why does it appear only 34992 MB in bdf?
Why doesn't it appear 2x 34992 MB in bdf?
Any explanation will be appreciated.



6 REPLIES 6
Patrick Wallek
Honored Contributor

Re: How to Calculate Total of Free and Used Hard Disk on Mirror System

Even if the LV is mirrored, you still only have 34992 MB available. Yes, the LV is technically using 2 x 34992 MB because of the mirror, but that is transparent to you. YOU can only store 34992MB worth of data in the LV so that is what bdf reports.

Does that make sense?
Rajeev Tyagi
Valued Contributor

Re: How to Calculate Total of Free and Used Hard Disk on Mirror System

Zap,

With mirroring you are having two or more copy of same data. So with a logical volume mirrored and size 34992MB even though you are using 34992MB space from two disks but actual usable size will be only 34992MB. So both lvdisplay and bdf command will report actual usable size.

If you want to see size used on each disk for /u02 volume do

#lvdisplay -v /dev/vg01/lvol2

And look for these information.

Mirror copies 1
LV Size (Mbytes) 140
Current LE 35
--- Distribution of logical volume ---
PV Name LE on PV PE on PV
/dev/dsk/c?t?d? 35 35
/dev/dsk/c?t?d? 35 35

Here you can notice that Mirror Copies are 1 that means it is mirrored. Size is 140MB and each LE size is 4MB(140/35). So you are using 140MB space on each disk.

zap_2
Advisor

Re: How to Calculate Total of Free and Used Hard Disk on Mirror System

How to find out which disk haven't used to certain VG?
Mobeen_1
Esteemed Contributor

Re: How to Calculate Total of Free and Used Hard Disk on Mirror System

Zap,
Don't exactly understand what your last question was.....but if you want to find out or see disks that are free...may be

#lspv

rgds
Mobeen
Henk Geurts
Esteemed Contributor

Re: How to Calculate Total of Free and Used Hard Disk on Mirror System

hi zap.
to see which disks are used by VG 's
you can use
# strings /etc/lvmtab

(do not use the more command on /etc/lvmtab as it is a binairy file)

regards.
Henk

Peter Godron
Honored Contributor

Re: How to Calculate Total of Free and Used Hard Disk on Mirror System

zap,
answering your follow-up question.
I assume you are looking for extra space on your machine.
If you look in sam ->Disks and File Systems ->Disk Devices it will show unused disks.

Regards