I'm wondering why every time I deleted files (using the rm command) on my Linux server, the used disk space for the files seemed not to be freed up? I mean the free disk space status stayed the same after I deleted the files.
Am I missing something or is there any command I should run to force the system to recalculate the free disk space?
Thanks in advance!
You might have a corrupted file system
How do I check and fix that then?
thedavid
12-07-2002, 02:02 PM
Originally posted by rcs
use the utility fsck
The easiest way I've been able to describe to linux newbies on how to do this is to use this command:
shutdown now -F
the -F forces a fsck on reboot.
If this is a managed server, your provider should be able to assist you in this as well.
-David
What's the exact and safe command for fsck?
Do I need to stop all services on the server before running fsck?
It just makes me nervous cause I got this warning message:
Parallelizing fsck version 1.23 (15-Aug-2001)
e2fsck 1.23, 15-Aug-2001 for EXT2 FS 0.5b, 95/08/09
/dev/hda2 is mounted.
WARNING!!! Running e2fsck on a mounted filesystem may cause SEVERE filesystem damage.
Do you really want to continue (y/n)? no
thats good, cuase you should run fsck in singel user mode when the filesystem is unmounted. I suggest you read the manual (or hire a proffesional).
I just ran the command "shutdown -rF now" and it seemed to fix the problem. Thanks everyone!