1752401 Members
5818 Online
108788 Solutions
New Discussion юеВ

Re: LV Space issue

 
V.P
Frequent Advisor

LV Space issue

Dear Admins,
The bdf output shows that the 44100281 KB space is used. But while calculating the space occupied manually, the space occupied is just 29092611 KB. How to find, where the balance goes to?
HP-UX B.11.23 U ia64

Filesystem kbytes used avail %used Mounted on
/dev/vg02/data1 46080000 44100281 1857825 96% /data1

#pwd
/data1

#du -sk *|sort -nr
26466129 oradata
2093729 TKFL
152104 DONOT_DELETE
152092 aud_05nov10.dmp.gz
126155 aud_05nov10_new.dmp.gz
102402 TKFIL

Total used = 29092611 KB
-------
#lvdisplay /dev/vg02/data1
--- Logical volumes ---
LV Name /dev/vg02/data1
VG Name /dev/vg02
LV Permission read/write
LV Status available/syncd
Mirror copies 0
Consistency Recovery MWC
Schedule parallel
LV Size (Mbytes) 45000
Current LE 11250
Allocated PE 11250
Stripes 0
Stripe Size (Kbytes) 0
Bad block NONE
Allocation strict
IO Timeout (Seconds) default

#vgdisplay vg02
--- Volume groups ---
VG Name /dev/vg02
VG Write Access read/write
VG Status available, exclusive
Max LV 255
Cur LV 5
Open LV 5
Max PV 16
Cur PV 4
Act PV 4
Max PE per PV 12945
VGDA 8
PE Size (Mbytes) 4
Total PE 51772
Alloc PE 48840
Free PE 2932
Total PVG 0
Total Spare PVs 0
Total Spare PVs in use 0

Please find the enclosed details too.

Regards,
V.P
8 REPLIES 8
Shibin_2
Honored Contributor

Re: LV Space issue

Can you provide the output of du -xk /data1 and df -k /data1 ?

Command du doesn't account for removed but open files. But bdf count all these.

Most likely cause:
- files which are deleted, but still in open.
Second potential cause:
- sparse files

There are lot of thread related to this. One sample discussion is here.

http://forums11.itrc.hp.com/service/forums/questionanswer.do?admit=109447626+1290906588056+28353475&threadId=1219717
Regards
Shibin
V.P
Frequent Advisor

Re: LV Space issue

Dear Shibin,
Please find the details.
#du -xk /data1
152104 /data1/DONOT_DELETE
26466129 /data1/oradata/TKFL
26466129 /data1/oradata
2069681 /data1/TKFL/dumps
2093729 /data1/TKFL
102402 /data1/TKFIL/log
102402 /data1/TKFIL
29092617 /data1
#df -k /data1
/data1 (/dev/vg02/data1 ) : 45958106 total allocated Kb
1857825 free allocated Kb
44100281 used allocated Kb
95 % allocation used

Regards,
V.P
Shibin_2
Honored Contributor

Re: LV Space issue

Hello VP

You must have sparse files. Most databses create only a few parts of data files at semi-random file positions, the rest of the file is left undefined. A sparse file is one that has been created with 'holes' or unwritten parts.

If you have lsof installed, you can find out these.

lsof |grep /data1

You may read these threads for your understanding. These are very clearly explaining your situation.

http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=1141730

http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=992662&admit=109447626+1290907752602+28353475
Regards
Shibin
Dennis Handly
Acclaimed Contributor

Re: LV Space issue

>Shibin: You must have sparse files.

Sparse files shouldn't cause this problem, only deleted files. du should be able to compute the size correctly. Sparse files will confuse adding up the each file size, given with the ll(1) command.

>If you have lsof installed, you can find out these.

This is typically used to find the deleted files.
SoorajCleris
Honored Contributor

Re: LV Space issue

Hi,

This is a known behaviour with Unix.
There must be some unlinked files.. the files which didnt return the inode.

du calculate the size by block by block. Please use lsof command check which process need to be exited to get the space back..

Regards,
Sooraj
"UNIX is basically a simple operating system, but you have to be a genius to understand the simplicity" - Dennis Ritchie
Shibin_2
Honored Contributor

Re: LV Space issue

Thanks Dennis for correction.
Regards
Shibin
V.P
Frequent Advisor

Re: LV Space issue

Thanks to all.

Space has been reclaimed after releasing the used sessions.

Regards,
V.P
V.P
Frequent Advisor

Re: LV Space issue

Thanks to all.

Space has been reclaimed after releasing the used sessions.

Regards,
V.P