Share your knowledge at the LQ Wiki.
Go Back > Forums > Enterprise Linux Forums > Linux - Enterprise
User Name
Linux - Enterprise This forum is for all items relating to using Linux in the Enterprise.


  Search this Thread
Old 07-29-2005, 03:25 PM   #1
LQ Newbie
Registered: Sep 2003
Posts: 7

Rep: Reputation: 0
Slow recognition of free space on deleted filesystems

Hi everyone,
I have noticed this happening twice in the last few days:
I will cd into a filesystem (/ora1 or /data_c01) and run an rm -rf * &
A few minutes later my job will show as done and the jobs command shows no active background jobs, but when I do a df -h I will still see the filesystem as having data in it. If I cd to the directory and run an ls. I see no data, even with a ls -a.

About 5 minutes later a df -h will show the filesystem as being empty? Why the delay?


Rob Thompson
Old 07-30-2005, 07:24 PM   #2
Senior Member
Registered: Jul 2004
Distribution: Ubuntu 7.04
Posts: 1,991

Rep: Reputation: 76
The delay is bacause df reports the actual amount of space on the disk, but the delete requests are still in the hard disk's buffers.

To maximise performance, the hard-disk buffers only get committed when the disk is on a low load, when they get full, after a certain amount of time, or when they are explicitly synchronised.

You can see the amount of disk space by passing df the --sync option, which will request an immediate commit of the disk buffers and wait for that request to finish.

You can also mount a device with the sync and dirsync options (set in /etc/fstab before mounting), in order to have the device be accessed synchronously (i.e. buffers committed after every read or write). This is slow.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Not enough free space on hard drive with 50g of free space??? auoq SUSE / openSUSE 5 10-13-2004 08:21 PM
Not enough space for root directory on a drive with 50g free space??? auoq Linux - Newbie 1 10-13-2004 12:44 PM
ext2 and ext3 use way more disk space then the other filesystems Necronomicom Linux - General 0 08-15-2004 10:06 PM
Formating free space: WinXP pro and RH9 dualboot with free space on 3rd drive Vermicious Linux - General 2 03-22-2004 05:10 AM
Odd VMware issue. (disk space recognition) ferreter Linux - General 1 08-31-2003 06:45 AM > Forums > Enterprise Linux Forums > Linux - Enterprise

All times are GMT -5. The time now is 02:10 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration