Home » Questions » Computers [ Ask a new question ]

Solaris says my partition is using 100+ GB, but the partition looks empty. Where is the space being used?

Solaris says my partition is using 100+ GB, but the partition looks empty. Where is the space being used?

I'm telnetting into a Solaris 5.9 box that's supposed to store our oracle database. I deleted the old version of the database, tried to move in the new version (the entire database is 90GB) but I kept getting "disk is full" errors. I ran

Asked by: Guest | Views: 416
Total answers/comments: 1
Guest [Entry]

"+1 for @UnixGeek answer: deleting a file does not free up disk space until the process(es) with the file open are gone.

The ""standard"" tool to list open files is lsof -- I still don't think it's included with Solaris (it's been several years since I was a Solaris admin, or even used it), but is available from sunfreeware.

A quick google finds the Solaris utility pfiles can do something similar (but I haven't used it).

Also, fuser on the file name, but you need to check it before you delete the file(s). fuser is also useful for finding what has a port open, when a process tell's you it's already in use.

I will plug A Sysadmin's Unixersal Translator (ROSETTA STONE),
a very useful guide for anyone using multiple Unices and translating between them.

Bonus trick for recovering deleted files in /proc-based systems which are still open by a process:

cat /proc/<pid>/fd/<fd-of-delete-file> > recovered.data

I have used this in Linux, where ls -l /proc/<pid>/fd shows the initial file name (and [deleted]) in the output."