Sewell, Cassandra D (Cassandra)
2003-Apr-03 16:01 UTC
'df' command says partition is full, when it isn't (can't create files, etc)
I am working with ext3 w/ the 2.4.20 kernel. I recently had a case where my root partition indicated that is was 100% full. I was unable to create new files, etc on the system. However, when I issued the 'du' command, the system indicated that only 2G of the 5G drive was in usage. I did a dump of the FS and I see were there is an indication of no free blocks. I decided to reboot the system, and the root partition is now indicating only 43% full, as expected. I then again did a dump of the FS and see where the free inode count is significantly different between the two (in addition to the first having no free blocks). I am now able to create files, etc on the system with no problem. The only thing done between the two instances was a system reboot. Has anyone seen this problem or have any speculation as to what may be going on here. There were not reboots or crashes of the system prior to this occurrence, and the dump indicates a clean fs in both cases Thanks, Cassandra
Sanjeev \"Ghane\" Gupta
2003-Apr-04 03:14 UTC
Re: 'df' command says partition is full, when it isn't (can't create files, etc)
On Friday, April 04, 2003 12:01 AM [GMT+0800=SGT], Sewell, Cassandra D (Cassandra) <csewell@avaya.com> wrote:> I am working with ext3 w/ the 2.4.20 kernel. I recently had a > case where my root partition indicated that is was 100% full. > I was unable to create new files, etc on the system. However, > when I issued the 'du' command, the system indicated that only > 2G of the 5G drive was in usage. > > I did a dump of the FS and I see were there is an indication of > no free blocks. I decided to reboot the system, and the root > partition is now indicating only 43% full, as expected.This used to ve standard Unix behaviour, I am not aware if ext2/3 have modified this. Files are deleted when both the link count and use count are zero. If you create a 100MB file, then open and hold it open in a C program, while deleteing it from the shell in another program, the file dis-appears from the directory, but space is not freed, and the C program can go on reading it. Terminating the C program will reduce use count to zero, and disk space is reclaimed. -- Sanjeev Gupta
Sewell, Cassandra D (Cassandra)
2003-Apr-04 14:58 UTC
RE: 'df' command says partition is full, when it isn't (can't create files, etc)
Then are we saying this is possibly a problem in Linux in general, and has never been fixed. The strange thing about it is that we had no applications running, and the space was not freed-up/reclaimed until a system reboot was done (re-reading of the info from the drive). We have used other journaled fs's and not seen this problem. We are currently considering going to EXT3 for production level machines, and this is considered a critical problem because it incorrectly blocks us from new file creation. My assumption right now is that the local copy of the disk information somehow was corrupted, and the info on drive was fine. Evidently the df command uses the local copy and the du gets the info directly off disk. Is that a correct assumption? I'm trying to get a handle on what the problem may be, so that I can resolve it. So any help that you or others can offer in helping me to resolve would be a big plus. Thanks, Cassandra -----Original Message----- From: Sanjeev "Ghane" Gupta [mailto:ghane@dotxtra.com] Sent: Thursday, April 03, 2003 8:14 PM To: Sewell, Cassandra D (Cassandra); ext3-users@redhat.com Subject: Re: 'df' command says partition is full, when it isn't (can't create files, etc) On Friday, April 04, 2003 12:01 AM [GMT+0800=SGT], Sewell, Cassandra D (Cassandra) <csewell@avaya.com> wrote:> I am working with ext3 w/ the 2.4.20 kernel. I recently had a > case where my root partition indicated that is was 100% full. > I was unable to create new files, etc on the system. However, > when I issued the 'du' command, the system indicated that only > 2G of the 5G drive was in usage. > > I did a dump of the FS and I see were there is an indication of > no free blocks. I decided to reboot the system, and the root > partition is now indicating only 43% full, as expected.This used to ve standard Unix behaviour, I am not aware if ext2/3 have modified this. Files are deleted when both the link count and use count are zero. If you create a 100MB file, then open and hold it open in a C program, while deleteing it from the shell in another program, the file dis-appears from the directory, but space is not freed, and the C program can go on reading it. Terminating the C program will reduce use count to zero, and disk space is reclaimed. -- Sanjeev Gupta