The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Special Forums > Filesystems, Disks and Memory
Google UNIX.COM


Filesystems, Disks and Memory Questions involving NAS, SAN, RAID, Robotic Libraries, backups, etc go here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Multiple Files Renaming with space nazri76 UNIX for Dummies Questions & Answers 13 10-04-2008 09:04 AM
Space problem in files vibhor_agarwali UNIX for Dummies Questions & Answers 6 05-21-2007 11:43 PM
Dvd files concatenate error: Not enough space maag SUN Solaris 3 05-06-2006 07:39 PM
when I try to run rm on multiple files I have problem to delete files with space umen UNIX for Dummies Questions & Answers 1 09-20-2005 12:20 AM
Moving files with space, in for loop saabir Shell Programming and Scripting 4 05-10-2004 07:17 AM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 01-07-2008
Registered User
 

Join Date: Jan 2008
Posts: 9
mv files still in use - space not freed

Had a issue recently where DB admins did:

mv listener.log listener.log.old
gzip listener.log.old

Where file listener.log is continually being written to by an oracle process.

Anyway, according to the DB admins they successfully created the
listener.log.old.gz
file (i.e. all went okay).

Then they started complaining that space had not been freed on the filesystem.

I logged in and couldn't see the file listener.log.old.gz anywhere. The "listener.log", which was 2GB originally, was indeed smaller when I checked, so it was moved.

"du -ks /opt/sw/oracle" showed 4GB in use.

Whereas "df -k" showed 6GB in use on the "/opt/sw/oracle" mountpoint.

Apparently it's something to do with inodes referring to the original file while it's still in use ... but not sure, which is why I am posting to find out why?

Anyway, to fix the issue, stopping and restarting the process using the file will free up the space.
Reply With Quote
Forum Sponsor
  #2  
Old 01-07-2008
Perderabo's Avatar
Unix Daemon
 

Join Date: Aug 2001
Location: Washington DC Area
Posts: 8,653
mv listener.log listener.log.old
name change doesn't matter, the file is already open. Process still writes to what is now listener.log.old

gzip listener.log.old
(listener.log.old.gz is created and listener.log.old is removed)
you removed the name, not the file. Another name change which doesn't matter.

A file will no link to a directory will be removed upon the last close.

What would probably work:
cp listener.log listener.log.old
cp /dev/null listener.log
gzip listener.log.old
Reply With Quote
  #3  
Old 01-08-2008
Registered User
 

Join Date: Jan 2008
Posts: 9
Quote:
Originally Posted by Perderabo View Post
A file will no link to a directory will be removed upon the last close.
Is that why I could not see the listener.log.old.gz file when I logged in to check?
If it is removed, then why isn't the space freed?

Thanks for the info btw.
Reply With Quote
  #4  
Old 01-08-2008
Perderabo's Avatar
Unix Daemon
 

Join Date: Aug 2001
Location: Washington DC Area
Posts: 8,653
No, I can't explain why the .gz file was missing.
Reply With Quote
  #5  
Old 01-08-2008
Registered User
 

Join Date: Dec 2007
Posts: 256
fuser will show open files that have been deleted on a given file system. Until that process is stopped the space will not be freed. Before messing with files make sure no process has it open with fuser.
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 12:25 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0