Operating System - HP-UX
1751768 Members
4684 Online
108781 Solutions
New Discussion юеВ

Re: Probelm in File system

 
arun khatwani
Frequent Advisor

Probelm in File system

There is one SAP FS:/sapmnt/NWD of 2GB which is showing 100% utilized,

/dev/vgnwd_s1/lv_sapmnt
2097152 2097152 0 100% /sapmnt/NWD


but when run du -sk its showing only 1.3Gb of space in use.

[mlasscom:/sapmnt/NWD]# du -sk *|sort -nr|head -10
1292189 exe
139796 global
91 profile
0 lost+found
0 df

700 MB is not showing in use.
kindly suggest some solution as its very urgent.
8 REPLIES 8
avizen9
Esteemed Contributor

Re: Probelm in File system

Hello Arun,

Please check /sapmnt also may mounted any other shares.

what is bdf -l output.

Bill Hassell
Honored Contributor

Re: Probelm in File system

Unix has the concept of a sparse file and these are often used with databases. The file is created a record in position one and another in position 10 million. There is no data recorded between those two records so very little space is occupied. bdf reports what the filesystem directory knows about the file -- it could eventually be filled with 10 million records. But du counts the actual records that contain data. If you copy the file, the destination will have 10 milllion records. Unix tools like cp or tar will fill in the missing records.

So the correct value is with bdf. The du command reports actual space but can change at any time based on the database activity.


Bill Hassell, sysadmin
Suraj K Sankari
Honored Contributor

Re: Probelm in File system

Hi,

Did you check with LSOF ?

Suraj
Ganesan R
Honored Contributor

Re: Probelm in File system

Hi,

Try this to find out open files.

#lsof +aL1 |grep /sapmnt/NWD
or
#lsof +aL1 /sapmnt/NWD

Note down the PID's which is having open files on th filesystem and kill those process.
Best wishes,

Ganesh.
Jeeshan
Honored Contributor

Re: Probelm in File system

check with lsof. Sometimes it happens when the deleted files have been holded by a running process.
a warrior never quits
Dennis Handly
Acclaimed Contributor

Re: Probelm in File system

>Bill: Unix has the concept of a sparse file and these are often used with databases.

This appears to be an answer to a different question. Sparse files have nothing to do with the bdf vs du conflicts. Sparse files are related to the ll(1) output not adding up to the du or bdf values.
Taifur
Respected Contributor

Re: Probelm in File system

Hi ARun,

>>>dev/vgnwd_s1/lv_sapmnt
2097152 2097152 0 100% /sapmnt/NWD


du shows the number of currently allocated blocks.

bdf shows the free disk space available.

The difference is because bdf cannot see the blocks "occupied" by a still active process.

bdf will see the change until the process terminates

RGds//
Taifur
Dennis Handly
Acclaimed Contributor

Re: Probelm in File system

>Taifur: du shows the number of currently allocated blocks.
>The difference is because bdf cannot see the blocks "occupied" by a still active process.

You have this reversed. du(1) shows only allocated space in files linked into a directory.
bdf(1) sees the free space and can infer everything else is allocated.