Finding used space on CentOS

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
1
down vote

favorite












I have a couple of servers that are approaching capacity, however I can't seem to find where the space is being consumed? When I run:



[root@server /]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VolGroup-lv_root
40G 38G 76M 100% /
tmpfs 929M 0 929M 0% /dev/shm
/dev/sda1 485M 32M 428M 7% /boot


I can see that the / mount is filling up, so I then run:



[root@server /]# sudo ls | xargs du -hs
5.8M bin
22M boot
192K dev
25M etc
36K home
122M lib
19M lib64
16K lost+found
4.0K media
4.0K mnt
4.0K opt
0 proc
124K root
14M sbin
0 selinux
4.0K srv
0 sys
54M tmp
749M usr
61M var


and can't see any real directories that are using heaps of space. The biggest one is /usr at 749M.



Can someone please suggest how I can find out where all this space is being chewed up? Thanks.










share|improve this question





















  • Do you use encrypted homes?
    – Broco
    2 hours ago














up vote
1
down vote

favorite












I have a couple of servers that are approaching capacity, however I can't seem to find where the space is being consumed? When I run:



[root@server /]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VolGroup-lv_root
40G 38G 76M 100% /
tmpfs 929M 0 929M 0% /dev/shm
/dev/sda1 485M 32M 428M 7% /boot


I can see that the / mount is filling up, so I then run:



[root@server /]# sudo ls | xargs du -hs
5.8M bin
22M boot
192K dev
25M etc
36K home
122M lib
19M lib64
16K lost+found
4.0K media
4.0K mnt
4.0K opt
0 proc
124K root
14M sbin
0 selinux
4.0K srv
0 sys
54M tmp
749M usr
61M var


and can't see any real directories that are using heaps of space. The biggest one is /usr at 749M.



Can someone please suggest how I can find out where all this space is being chewed up? Thanks.










share|improve this question





















  • Do you use encrypted homes?
    – Broco
    2 hours ago












up vote
1
down vote

favorite









up vote
1
down vote

favorite











I have a couple of servers that are approaching capacity, however I can't seem to find where the space is being consumed? When I run:



[root@server /]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VolGroup-lv_root
40G 38G 76M 100% /
tmpfs 929M 0 929M 0% /dev/shm
/dev/sda1 485M 32M 428M 7% /boot


I can see that the / mount is filling up, so I then run:



[root@server /]# sudo ls | xargs du -hs
5.8M bin
22M boot
192K dev
25M etc
36K home
122M lib
19M lib64
16K lost+found
4.0K media
4.0K mnt
4.0K opt
0 proc
124K root
14M sbin
0 selinux
4.0K srv
0 sys
54M tmp
749M usr
61M var


and can't see any real directories that are using heaps of space. The biggest one is /usr at 749M.



Can someone please suggest how I can find out where all this space is being chewed up? Thanks.










share|improve this question













I have a couple of servers that are approaching capacity, however I can't seem to find where the space is being consumed? When I run:



[root@server /]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VolGroup-lv_root
40G 38G 76M 100% /
tmpfs 929M 0 929M 0% /dev/shm
/dev/sda1 485M 32M 428M 7% /boot


I can see that the / mount is filling up, so I then run:



[root@server /]# sudo ls | xargs du -hs
5.8M bin
22M boot
192K dev
25M etc
36K home
122M lib
19M lib64
16K lost+found
4.0K media
4.0K mnt
4.0K opt
0 proc
124K root
14M sbin
0 selinux
4.0K srv
0 sys
54M tmp
749M usr
61M var


and can't see any real directories that are using heaps of space. The biggest one is /usr at 749M.



Can someone please suggest how I can find out where all this space is being chewed up? Thanks.







linux centos






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked 2 hours ago









cpjones44

5016




5016











  • Do you use encrypted homes?
    – Broco
    2 hours ago
















  • Do you use encrypted homes?
    – Broco
    2 hours ago















Do you use encrypted homes?
– Broco
2 hours ago




Do you use encrypted homes?
– Broco
2 hours ago










1 Answer
1






active

oldest

votes

















up vote
2
down vote



accepted










Often times when something like this happens, it is due to some process keeping filehandles open on deleted (unlinked) files. If this is the case, you can find them by using lsof, for example:



$ sudo lsof +L1
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NLINK NODE NAME
tuned 869 root 7u REG 202,1 4096 0 4194380 /tmp/ffiGemRJt (deleted)
$


If you find deleted files are consuming much of your space, then it will probably be necessary to restart the offending process that is keeping the filehandles open.






share|improve this answer




















  • Thanks. That was it. ngninx on the servers was chewing up the space. Restarted the services and it's all good.
    – cpjones44
    1 hour ago










Your Answer







StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "2"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f934579%2ffinding-used-space-on-centos%23new-answer', 'question_page');

);

Post as a guest






























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
2
down vote



accepted










Often times when something like this happens, it is due to some process keeping filehandles open on deleted (unlinked) files. If this is the case, you can find them by using lsof, for example:



$ sudo lsof +L1
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NLINK NODE NAME
tuned 869 root 7u REG 202,1 4096 0 4194380 /tmp/ffiGemRJt (deleted)
$


If you find deleted files are consuming much of your space, then it will probably be necessary to restart the offending process that is keeping the filehandles open.






share|improve this answer




















  • Thanks. That was it. ngninx on the servers was chewing up the space. Restarted the services and it's all good.
    – cpjones44
    1 hour ago














up vote
2
down vote



accepted










Often times when something like this happens, it is due to some process keeping filehandles open on deleted (unlinked) files. If this is the case, you can find them by using lsof, for example:



$ sudo lsof +L1
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NLINK NODE NAME
tuned 869 root 7u REG 202,1 4096 0 4194380 /tmp/ffiGemRJt (deleted)
$


If you find deleted files are consuming much of your space, then it will probably be necessary to restart the offending process that is keeping the filehandles open.






share|improve this answer




















  • Thanks. That was it. ngninx on the servers was chewing up the space. Restarted the services and it's all good.
    – cpjones44
    1 hour ago












up vote
2
down vote



accepted







up vote
2
down vote



accepted






Often times when something like this happens, it is due to some process keeping filehandles open on deleted (unlinked) files. If this is the case, you can find them by using lsof, for example:



$ sudo lsof +L1
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NLINK NODE NAME
tuned 869 root 7u REG 202,1 4096 0 4194380 /tmp/ffiGemRJt (deleted)
$


If you find deleted files are consuming much of your space, then it will probably be necessary to restart the offending process that is keeping the filehandles open.






share|improve this answer












Often times when something like this happens, it is due to some process keeping filehandles open on deleted (unlinked) files. If this is the case, you can find them by using lsof, for example:



$ sudo lsof +L1
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NLINK NODE NAME
tuned 869 root 7u REG 202,1 4096 0 4194380 /tmp/ffiGemRJt (deleted)
$


If you find deleted files are consuming much of your space, then it will probably be necessary to restart the offending process that is keeping the filehandles open.







share|improve this answer












share|improve this answer



share|improve this answer










answered 2 hours ago









guzzijason

722114




722114











  • Thanks. That was it. ngninx on the servers was chewing up the space. Restarted the services and it's all good.
    – cpjones44
    1 hour ago
















  • Thanks. That was it. ngninx on the servers was chewing up the space. Restarted the services and it's all good.
    – cpjones44
    1 hour ago















Thanks. That was it. ngninx on the servers was chewing up the space. Restarted the services and it's all good.
– cpjones44
1 hour ago




Thanks. That was it. ngninx on the servers was chewing up the space. Restarted the services and it's all good.
– cpjones44
1 hour ago

















 

draft saved


draft discarded















































 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f934579%2ffinding-used-space-on-centos%23new-answer', 'question_page');

);

Post as a guest













































































Comments

Popular posts from this blog

Long meetings (6-7 hours a day): Being “babysat” by supervisor

Is the Concept of Multiple Fantasy Races Scientifically Flawed? [closed]

Confectionery