The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Special Forums > Hardware > Filesystems, Disks and Memory
.
google unix.com



Filesystems, Disks and Memory Discuss NAS, SAN, RAID, Robotic Libraries, backup devices, RAM, DRAM, SCSI, IDE, EIDE topics here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Moving files with space, in for loop saabir Shell Programming and Scripting 6 02-04-2009 01:30 PM
Multiple Files Renaming with space nazri76 UNIX for Dummies Questions & Answers 13 10-04-2008 01:04 PM
Space problem in files vibhor_agarwali UNIX for Dummies Questions & Answers 6 05-22-2007 03:43 AM
Dvd files concatenate error: Not enough space maag SUN Solaris 3 05-06-2006 11: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 04:20 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 01-08-2008
apra143 apra143 is offline
Registered User
  
 

Join Date: Jan 2008
Posts: 37
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.
  #2 (permalink)  
Old 01-08-2008
Perderabo's Avatar
Perderabo Perderabo is offline Forum Staff  
Unix Daemon
  
 

Join Date: Aug 2001
Location: Ashburn, Virginia
Posts: 9,120
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
  #3 (permalink)  
Old 01-08-2008
apra143 apra143 is offline
Registered User
  
 

Join Date: Jan 2008
Posts: 37
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.
  #4 (permalink)  
Old 01-08-2008
Perderabo's Avatar
Perderabo Perderabo is offline Forum Staff  
Unix Daemon
  
 

Join Date: Aug 2001
Location: Ashburn, Virginia
Posts: 9,120
No, I can't explain why the .gz file was missing.
  #5 (permalink)  
Old 01-08-2008
frank_rizzo frank_rizzo is offline Forum Advisor  
Resident BOFH
  
 

Join Date: Dec 2007
Posts: 427
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.
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 07:32 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0