Operating System - HP-UX
1833452 Members
3246 Online
110052 Solutions
New Discussion

Re: BDF output wrong . . .

 
piyush mathiya
Trusted Contributor

BDF output wrong . . .

Dear Gurus,
When I removed some files to reduce space, files has removed but bdf shows wrong output. still it is showing older information, but when i tried to use du -sk command, it is giving updated information. Please help me as I require space to add new files.
OS : B.11.11
Model: Superdome
Regards,
Piyush Mathiya
13 REPLIES 13
Dennis Handly
Acclaimed Contributor

Re: BDF output wrong . . .

You can't remove a file until the kernel is good and ready. I.e. if the file is open, the disk space doesn't get freed until it is closed.

You can use lsof or fuser to try to find who is using that file.

>as I require space to add new files.

You can't get that space until you kill that process or reboot.
Kapil Jha
Honored Contributor

Re: BDF output wrong . . .

now what u need to do is do
lsof |more
check the big files u have removed and see if these are open , if they are you will have to restart the process which has this file open.
U can go to directory which has big sapce gradually by using du -sk *|sort -n
If u do not have lsof the remember the biggest file u removed check which process uses this file and restart that process(if u can without hurthin system) will give u some space.
BR,
Kapil
I am in this small bowl, I wane see the real world......
piyush mathiya
Trusted Contributor

Re: BDF output wrong . . .

We havn't lsof command on my server,
and files has already removed,
How can I check with fuser command?
piyush mathiya
Trusted Contributor

Re: BDF output wrong . . .

I also want to know that is it any problem with inod table or something else, or can we use any sync command to syncronize the information.

Regards,
Piyush Mathiya
piyush mathiya
Trusted Contributor

Re: BDF output wrong . . .

It will help to diagnose.
# pwd
/upwrtx19

# du -sk *
0 lost+found
37297424 oradata
#
#
# bdf .
Filesystem kbytes used avail %used Mounted on
/dev/vguprtx06/lvol4
62783488 45690336 16959680 73% /upwrtx19
#
Dennis Handly
Acclaimed Contributor

Re: BDF output wrong . . .

>We haven't lsof command on my server
>and files has already removed,

Then you need to download a copy. lsof doesn't care.

>How can I check with fuser command?

Not if removed.

>I also want to know that is it any problem with inode table or something else,

No, this is exactly how things work.

37297424 oradata
62783488 45690336 16959680 73% /upwrtx19

Yes, your 45-37 Gb must have been those file?
Kapil Jha
Honored Contributor

Re: BDF output wrong . . .

# bdf .
Filesystem kbytes used avail %used Mounted on
/dev/vguprtx06/lvol4
62783488 45690336 16959680 73% /upwrtx19
#

45690336 + 16959680 = 62650016

U do not have any problem with open files.Its OK.Since user+availabel equals to available space.
BR,
Kapil
I am in this small bowl, I wane see the real world......
piyush mathiya
Trusted Contributor

Re: BDF output wrong . . .

But kapil have you checked du -sk * command output, it shows there are only one directory called oradata, and it's space is less then used space in bdf output.

john korterman
Honored Contributor

Re: BDF output wrong . . .

Hi Piyush,

there is a good descrption of your problem in the man page for the unlink system call: "man 2 unlink"
Follow Dennis' advice; if I remember correctly, you should then be able to execute this:
# lsof /upwrtx19 | grep deleted
which should reveal the PIDs of the processes holding the deleted files open.

regards,
John K.
it would be nice if you always got a second chance
Jeeshan
Honored Contributor

Re: BDF output wrong . . .

Hi piyush

Sometimes it observed that, when we delete some files from the file system, it will still shows the same size of the file system. This may be holding of that files or linked file is still hold by another instances.

For example, if you delete a log file and if it is tailed by a user. That file wont be deleted.Sometimes a process or thread can do this things.

you ma check your process details , who are holding what

#ps -ef|grep
a warrior never quits
piyush mathiya
Trusted Contributor

Re: BDF output wrong . . .

Thanks for the responce,

# lsof /upwrtx19 | grep deleted
Not giving any records,
# unlink /upwrtx19
unlink: No such file or directory
How can we use unlink

I have read manual but I didn't get any example.
Please help me
Dennis Handly
Acclaimed Contributor

Re: BDF output wrong . . .

>How can we use unlink?
>I have read manual but I didn't get any example.

You don't use unlink(2) directly, that's what rm(1) does. Basically unlink(2) describes the problem you have.
Rasheed Tamton
Honored Contributor

Re: BDF output wrong . . .

Hi Piyush,

If you know the filenames, may be you can try to grep those and see whether some of them are still opened, even if, those are removed from the dir.

lsof /upwrtx19 | grep filename (s)

if you can find any PIDs with those, just kill it.

If lsof, in anywany, does not help, if it is possible, to unmount /upwrtx19 , just unmount the filesystem and re-mount it back and check.


Regards,
Rasheed Tamton.