Reducing / file system utilization in linux server is very rare part.
or we can say, / file system is full, how to do housekeeping?
Situation:
First check under / directory which are the file systems are not mounted, collect it & run the below command
For Ex: Below listed are not mounted, so we need to check which one is huge size.
admin lib middleware net lib64 srv misc media mnt
[root@testserver]# du -sk /admin /lib /middleware /net /lib64 /srv /misc /media /mnt | sort -n
4 /srv
16 /mnt
20 /middleware
31852 /lib64
920388 /lib
So lets see what's under /lib
[root@testserver ]# du -sk /lib/* | sort -n
109096 /lib/firmware
793332 /lib/modules
looks modules is huge size, lets check that one also
du -sk /lib/modules/* | sort -n
105840 /lib/modules/2.6.32-431.20.3.el6.x86_64
107040 /lib/modules/2.6.39-400.215.3.el6***.x86_64
109152 /lib/modules/2.6.32-504.23.4.el6.x86_64
116676 /lib/modules/2.6.32-696.1.1.el6.x86_64
176888 /lib/modules/3.8.13-68.3.3.el6***.x86_64
177732 /lib/modules/3.8.13-118.17.5.el6***.x86_64
Now Check the current kernal, which running on the server
[root@testserver firmware]# uname -a
Linux testserver 3.8.13-118.17.5.el6***.x86_64 #2 SMP Wed Apr 12 09:16:08 PDT 2017 x86_64 x86_64 x86_64 GNU/Linux
Check, what are the packages are related to 2.6 (old) kernel
#rpm -qf /lib/modules/2.6.*
kernel-2.6.32-431.20.3.el6.x86_64
kernel-2.6.32-504.23.4.el6.x86_64
kernel-2.6.32-696.1.1.el6.x86_64
kernel-uek-2.6.39-400.215.3.el6***.x86_64
We can see some old kernel is still available. So remove that one
#yum remove kernel-2.6.32-431.20.3.el6.x86_64
We can get some space if not sufficient then remove other (unused) older kernal.
Hope it helps.
or we can say, / file system is full, how to do housekeeping?
Situation:
We have separate mount of /boot /usr /tmp /home /var /opt file system but still / file system utilization is almost full.
Solution:First check under / directory which are the file systems are not mounted, collect it & run the below command
For Ex: Below listed are not mounted, so we need to check which one is huge size.
admin lib middleware net lib64 srv misc media mnt
[root@testserver]# du -sk /admin /lib /middleware /net /lib64 /srv /misc /media /mnt | sort -n
4 /srv
16 /mnt
20 /middleware
31852 /lib64
920388 /lib
So lets see what's under /lib
[root@testserver ]# du -sk /lib/* | sort -n
109096 /lib/firmware
793332 /lib/modules
looks modules is huge size, lets check that one also
du -sk /lib/modules/* | sort -n
105840 /lib/modules/2.6.32-431.20.3.el6.x86_64
107040 /lib/modules/2.6.39-400.215.3.el6***.x86_64
109152 /lib/modules/2.6.32-504.23.4.el6.x86_64
116676 /lib/modules/2.6.32-696.1.1.el6.x86_64
176888 /lib/modules/3.8.13-68.3.3.el6***.x86_64
177732 /lib/modules/3.8.13-118.17.5.el6***.x86_64
Now Check the current kernal, which running on the server
[root@testserver firmware]# uname -a
Linux testserver 3.8.13-118.17.5.el6***.x86_64 #2 SMP Wed Apr 12 09:16:08 PDT 2017 x86_64 x86_64 x86_64 GNU/Linux
Check, what are the packages are related to 2.6 (old) kernel
#rpm -qf /lib/modules/2.6.*
kernel-2.6.32-431.20.3.el6.x86_64
kernel-2.6.32-504.23.4.el6.x86_64
kernel-2.6.32-696.1.1.el6.x86_64
kernel-uek-2.6.39-400.215.3.el6***.x86_64
We can see some old kernel is still available. So remove that one
#yum remove kernel-2.6.32-431.20.3.el6.x86_64
We can get some space if not sufficient then remove other (unused) older kernal.
Hope it helps.
No comments:
Post a Comment