- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Free space does not free after rm
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-02-2009 07:03 AM
тАО06-02-2009 07:03 AM
I have a process which runs every 15 mins and this backs up the Oracle Archive redo logs and then removes them from the filesystem using rm command.
The problem is that altghough the files get deleted, the free space on the partition does not free up. This is happening because there is still some process that is using the files. The only way by which I could free up that space is by shutdown and restart of the Oracle database.
Unfortunately shutting down and restart of the database is not a good option for me.
Is there any other way how I can force to free the space after the rm command without actually killing the process using it (which in this case is an Oracle database)?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-02-2009 07:21 AM
тАО06-02-2009 07:21 AM
Re: Free space does not free after rm
if process 8838 has an open file handle on the file /tmp/shmuelbagel.dat and that file contains 55 Mb, rm will not free the space until the process with the file handle is closed.
fuser -cu /tmp
Will show all open file handles and process id owners on the /tmp filesysem
fuer -cuk /tmp
will kill them all. If you are lucky you won't crash your box.
Use -cuk with care.
Better to identify and kill the processes one at a time.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-02-2009 07:23 AM
тАО06-02-2009 07:23 AM
Re: Free space does not free after rm
If your archive logs keep getting bigger to no end, it is not right and your dba should deal with the issue. Or if another process is holding them open for whatever reason other than what they are intended to be used for, they need to stop doing that. Otherwise you will never see that freed up space and the file you deleted will actually be corrupt, if you take the backup while it was open.
UNIX because I majored in cryptology...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-02-2009 07:23 AM
тАО06-02-2009 07:23 AM
Re: Free space does not free after rm
I think if you do an lsof of the fs, you could get the process and when you identify them, you could perhaps kill them. Some oracle process can be kill without problem, but for other oracle process, you should shutdown the database.
let identify them first.
Hope it helps
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-02-2009 08:20 AM
тАО06-02-2009 08:20 AM
SolutionWhilst all the advice so far provided is reasonably accurate, I would add that Oracle *only* keeps archive log files opening whislt it is writing to them, so there should never be more than one archive log file open at any one time. SO if you are seeing this problem for more than one file per iteration of your process, then there is some other sort of problem...
Your script (I'm assuming its a script now), should always leave the latest archive log file in place and only delete the rest, and for belt and braces you should run fuser on the file before doing a backup or rm to confirm the file is not open (backing up an archive log whilst Oracle has it open will result in a corrupt backup that your DBA can't restore from.
Maybe you could share your script with us - might make it easier to pin down the problem.
As an alternative you should talk to your DBA about using RMAN to handle this process - it knows which logs to backup and which to leave, and it can delete the files also - it also makes it easier for DBAs to track where archive logs have gone.
HTH
Duncan
I am an HPE Employee
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-02-2009 10:22 PM
тАО06-02-2009 10:22 PM
Re: Free space does not free after rm
Thanks to everyone for your replies. Duncan, your point is very valid for me because I am deleting all the files without actually taking care if any file is yet open.
I will be enhancing my script to delete all the files except the last one. I will see if this solves my problem.
Thanks again
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-02-2009 10:38 PM
тАО06-02-2009 10:38 PM
Re: Free space does not free after rm
Remember to compile your list of files to be deleted *when the script is first called*, rather than after the backup has run - this is cos if the backup runs for long enough a few more archive logs could get created whilst you are running it - if they're not in the backup, you shouldn't delete them.
HTH
Duncan
I am an HPE Employee