VOlume full

Hello,

I'm using SOlaris 8 and I have a little bug.

I have deleted a big files to free space on a volume (succesfully), but when I'm using the command "df -k", the volume is always displaying 100 % full.

Sun recommends a server reboot.

Did you see an other solution ?

Thanks,

Fabien

It matters what file(s) you deleted. Some files could still be allocated by a process (it still has it opened) so you don't get the space back until the process is done. A reboot would certainly fix that - but I'm surprised SUN recommended that.

You can use lsof to see what files are open by what processes (if it's loaded on your server). Fuser may also show you.

In fact It's not really Sun recommendation , but a Unix Expert here :smiley:

Unfortunately "lsof" is not installed.

My file deleted was a log file from Oracle. Maybe by stopping and restarting Oracle ...

That (starting/stopping Oracle) might work but I'm not a DBA.
Seems you should be talking to your DBA before deleting Oracle files.

The DBA tells me to do it :wink:

Encounter smiliar issue like you. Certain stupid application keeps a log file open to write too. Like VCS. If it gets too big for your filesystem and you delete it. You will realize the space consumed is not returned to the filesystem.

I use cp /dev/null > $Logfile, also face the same issue.

I decided to increase the file system instead.

To all experts, any good solutions here?

Try "fuser" then (if it's installed ;))

Also; izzy - cp /dev/null > $Logfile is not a valid command. The redirect won't work. Sure you don't mean "cat /dev/null > $Logfile"?

I'd agree that stopping whatever service is using the file, then catting/deleting/whatever, the starting again is the best way to go. You could always write a script to do this out-of-hours via cron on a production server.

Cheers
ZB

yeah, u r right abt the typo.
I mean cp /dev/null $logfile

We not have the luxury of stopping our Veritas cluster server service to trim the log file here. only hope those guys can design a better application next version.

Umm...you mean cat /dev/null >$Logfile

I prefer

which does the same thing.