Friday, June 28, 2013

How to recover a file system RHEL4 machinef

I have a RHEL4 machine. The free space in /home petition is 
used 100%. If I run the #df command it display like this. 

[root@localhost ~]# df -h 
Filesystem Size Used Avail Use% Mounted on 
/dev/sda2 29G 449M 27G 2% / 
/dev/sda1 494M 16M 453M 4% /boot 
none 1011M 0 1011M 0% /dev/shm 
/dev/sda6 77G 73G 249M 100% /home 
/dev/sda3 25G 5.9G 17G 26% /usr 

But I am not using 100%. How I can recover the /home petition. 

I have also run the #e2fsck command. The file system is not recover. 
Please explain me how to recover it. 
Usually /home partition maps user account folder. 
Boot your machine in single user mode 
cd to /home dir check that which user has occupied how much disk space using 
*du -ksh * * command. 

Remove the unnecessary files & folders in their respective folders. 

Also you can use find command as well *sudo find <Dir_name> -size +2M 
-print -exec du -ksh * \;* 
/dev/sda6 77G 73G 249M 100% /home 

There is no discrepancy between 77GB and 73GB. Your file system is not broken. 

Unix systems rely on a reasonable amount of free space blocks as an alternative to defragmentation. Generally, 5% of blocks are reserved for this purpose, although root user can use more (normally as work space for compressing files to release more space). 

What this du line is telling you is that, of 77GB, 73GB is used. That's 94.8%. Effectively, that is 100% of user-available space. The free space available to users is 249MB, which is 0.03%. You really just have a full disk in Unix terms. 

, find which user has hogged it all, and nail him. 

Best to monitor disk usage under "normal" conditions, so you can see this situation coming earlier next time.
By default 5 percent of every partition reserved for root 

see man page of "tune2fs" and 

use "-m" option 

-m reserved-blocks-percentage 
Set the percentage of reserved filesystem blocks.


Post a Comment

Design by BABU | Dedicated to grandfather | welcome to BABU-UNIX-FORUM