Remounting /var File System
Hi All ,
The Actual space used for /var file system is 1.1 GB but in the df -h output it is showing 10Gb used space. So, I have planned to remount the /var file system.
Is anything will go serious If we remount the /var file system in multiuser mode.(runlevel 3). The /var file system is RAID 1.
df -h output
=========
Filesystem sizeused avail capacity Mounted on
/dev/md/dsk/d20 14G10G4.3G71%/var
du -skh /var output
===============
1.1G/var
Please confirm.
Regards,
R. Rajesh Kannan.
[568 byte] By [
grkrajesha] at [2007-11-27 1:06:43]

# 1
It is likely that you have tried to remove files that are still open. (Log files are a common candidate for this). If you try to do that, you don't remove the files at all. They're still there on disk, and 'df' correctly shows that they take up space.
However you've removed the name of the file, so 'du' can no longer find the files to count them. So it doesn't appear in 'du' output.
Closing the file (perhaps by having the program that has them open exit) will return the space. That will be necessary before you can unmount the filesystem anyway, so the actual unmount may not be necessary.
--
Darren
# 2
Hi Darren ,I have restarted the syslogd service, the file system space reduced. Is there any way to find the open file.Regards,R. Rajesh Kannan.
# 3
'lsof' can be run with flags to find open files that no longer have directory names. You'd have to get a copy of 'lsof' first.
You can also do 'find /proc -type f -nlinks 0 -ls'. You should be able to see the file size in the output, and the filename will contain the PID of the process with it open.
--
Darren
# 7
Hi Darren,
The /var file system occupies only 2 GB, but it is showing usage of 5 GB in df -h output.I have restarted the syslog service, the file usage is reduced to 4 GB.
So, I think remounting the /var file system is good suggestion.
You thoughts is highly appreciable how to resolve this issue.
Regards,
R. Rajesh Kannan.
# 8
Hi Darren ,
I have tried the below steps in my test machine on run level 3, but the /var file system has been corrupted. So, we have restarted the server single user mode and after executing file system check we are able to mount /var file system.
fuser -ck /var
umount -f /var
mount -f /var
But i unable to mount the var due to corruption.
This is for your information.
Regards,
R. Rajesh Kannan.