1753851 Members
7643 Online
108807 Solutions
New Discussion юеВ

/usr file system issue

 
SOLVED
Go to solution
vthiru
Advisor

/usr file system issue

Hi Admins,

In one of our HP-UX 11.11 server, the /usr file system is at 97%. We found one file of size 550MB and we deleted that file. But even after deleting the file, the file system didn't get reduced. Still it is at 97%. Please let me know is there a way to find why the file system didn't get reduced.

Thanks in Advance.

Thiru
11 REPLIES 11
Avinash20
Honored Contributor

Re: /usr file system issue

This could be due to unlinked files which might has not got deleted.

could you compare the output of

# bdf
# du -sk /usr

Compare the avail section in bdf and the above output
"Light travels faster than sound. That's why some people appear bright until you hear them speak."
vthiru
Advisor

Re: /usr file system issue

Thanks Avinash, but there are lot of file system like below:

/usr
/usr/local/fsa
/usr/local/fsb
/usr/local/fsc
/usr/local/fsd
/usr/fse

So the output doesn't help really.

servera / > bdf /usr
duFilesystem kbytes used avail %used Mounted on
/dev/vg00/lvol1 2138112 2040726 91331 96% /usr


servera / > du -ks /usr
9543016 /usr

Any help will be appreciated.

Thanks
Thiru
Avinash20
Honored Contributor
Solution

Re: /usr file system issue

du -xk /usr

Check the last value
"Light travels faster than sound. That's why some people appear bright until you hear them speak."
Avinash20
Honored Contributor

Re: /usr file system issue

There may be remarkable differences in the bdf(1) and du(1) outputs, because bdf(1) looks at file system statistics, while du(1) looks at the files it finds in the directories.

Under certain circumstances, files that actually exist in a file system, might not be visible. There are two reasons for that, which are also the reason why du(1) wouldn't count their sizes when calculating the disk usage:

Files that have already been deleted, but are still opened by running processes
You can find such files with
crashinfo -unlinked

It will print their inodes and sizes, and also the processes that still have this file open, e.g.

PID PPID COMMAND INODE DEVICE SIZE(bytes)
3844 1 swagentd 6725 /dev/vg00/lvol6 133



These files will still occupy space in the file system, but they will not be visible in the directory listings because their directory entries have already been deleted. The files themselves will only be deleted after all processes that have the file open either close the file, or terminate.

If that doesn't happen on its own, you might need to kill the appropriate processes, to free the disk space.

"Light travels faster than sound. That's why some people appear bright until you hear them speak."
vthiru
Advisor

Re: /usr file system issue

Thanks again Avinash, please find the du -xk /usr

1473748 /usr


but i am not able to find crashinfo in my server. Please let me know from where can i get crashinfo.

Thanks,
Thiru
Avinash20
Honored Contributor

Re: /usr file system issue

you need to get the crashinfo script from HP.
They will provide you the script on request.
"Light travels faster than sound. That's why some people appear bright until you hear them speak."
Dennis Handly
Acclaimed Contributor

Re: /usr file system issue

>We found one file of size 550MB and we deleted that file.

Do you remember the filename?
You may need to run lsof to see who has it open.
Avinash20
Honored Contributor

Re: /usr file system issue

servera / > bdf /usr
duFilesystem kbytes used avail %used Mounted on
/dev/vg00/lvol1 2138112 2040726 91331 96% /usr

Used: 1993 MB

du -xk /usr
1473748 /usr

Actual Used: 1439 MB

So the difference is around 500MB.
## You could find the unlinked file via

# crashinfo -unlinked

You could obtain the script from HP Solution Center
"Light travels faster than sound. That's why some people appear bright until you hear them speak."
vthiru
Advisor

Re: /usr file system issue

Thanks Avinash/Dennis. There is no crashinfo and lsof installed in the server. But i could see a process that is running and i suspect that it could hold the file. Let me work with the application team and find out whether they will be able to stop and start the process once and see if that helps.

Keeps you people posted.

Thanks again,
Thiru