Jump to content

Where is the storage used? (Linux)

Go to solution Solved by Ssoele,

Could you provide a copy of your /etc/fstab file so we can see the partitions and mounts you have? 

 

Could you try running the following and coping this here also :)

 

du -h / | sort -nr | grep '[0-9]G'

 

du -Pshx /* | sort -rh

 

Possibly a deleted file that is still accessed by a process. Does lsof show anything large?

Are there any hidden files and directories under / ?

Any files under a mount?

 

 

Found the problem, before I mounted /home to vda4, it used to be part of vda3, I moved the files over, but I forgot to delete the original files.

On one of my VPS's (CentOS 6) I have the problem that the / partition is getting kind a full, so I decided to check where the bulk of the data was stored, but I could not find it.

Can someone help me out here?

 

 

 

These are the partitions that I have mounted.

$ df -hFilesystem            Size  Used Avail Use% Mounted on/dev/vda3              23G   20G  2.0G  91% /tmpfs                 1.9G     0  1.9G   0% /dev/shm/dev/vda1             485M   53M  407M  12% /boot/dev/vda4             124G   20G   98G  17% /home

But I can't figure out where the 20GB on vda3 is coming from.

$du -sh /*12K     /aquota.group12K     /aquota.user7.6M    /bin43M     /boot4.0K    /cgroup208K    /dev28M     /etc20G     /home186M    /lib25M     /lib6416K     /lost+found4.0K    /media0       /misc4.0K    /mnt0       /net4.0K    /optdu: cannot access `/proc/10559/task/10559/fd/4': No such file or directorydu: cannot access `/proc/10559/task/10559/fdinfo/4': No such file or directorydu: cannot access `/proc/10559/fd/4': No such file or directorydu: cannot access `/proc/10559/fdinfo/4': No such file or directory0       /proc51M     /root14M     /sbin4.0K    /selinux4.0K    /srv0       /sys1.3M    /tmp2.1G    /usr1.4G    /var

As you can see, it does not add up to 20GB (excluding /home because that one is mounted to vda4).

Link to comment
Share on other sites

Link to post
Share on other sites

Use ncdu. It makes this 10x easier. Doesn't come installed by default (on Debian anyway), so install it :)

 

Looks like it's all on your home directory anyway.

Link to comment
Share on other sites

Link to post
Share on other sites

Use ncdu. It makes this 10x easier. Doesn't come installed by default (on Debian anyway), so install it :)

 

Looks like it's all on your home directory anyway.

 

I am less concerned with the speed of the commands, as they are barely used. Let's focus on where the storage is going.

Link to comment
Share on other sites

Link to post
Share on other sites

I am less concerned with the speed of the commands, as they are barely used. Let's focus on where the storage is going.

 

Well sorry then. I'd ask you to read your own output, and the second half of my last comment. Clearly, there's 20G right next to /home ...

Link to comment
Share on other sites

Link to post
Share on other sites

Well sorry then. I'd ask you to read your own output, and the second half of my last comment. Clearly, there's 20G right next to /home ...

 

But /home is mounted to vda4, so it does not explain why there is 20GB used on vda3.

Link to comment
Share on other sites

Link to post
Share on other sites

Explanations that I can think of:

  • There is a file/files on / totalling 20GB
  • du fucked up
Link to comment
Share on other sites

Link to post
Share on other sites

On one of my VPS's (CentOS 6) I have the problem that the / partition is getting kind a full, so I decided to check where the bulk of the data was stored, but I could not find it.

Can someone help me out here?

 

 

 

These are the partitions that I have mounted.

$ df -hFilesystem            Size  Used Avail Use% Mounted on/dev/vda3              23G   20G  2.0G  91% /tmpfs                 1.9G     0  1.9G   0% /dev/shm/dev/vda1             485M   53M  407M  12% /boot/dev/vda4             124G   20G   98G  17% /home

But I can't figure out where the 20GB on vda3 is coming from.

$du -sh /*12K     /aquota.group12K     /aquota.user7.6M    /bin43M     /boot4.0K    /cgroup208K    /dev28M     /etc20G     /home186M    /lib25M     /lib6416K     /lost+found4.0K    /media0       /misc4.0K    /mnt0       /net4.0K    /optdu: cannot access `/proc/10559/task/10559/fd/4': No such file or directorydu: cannot access `/proc/10559/task/10559/fdinfo/4': No such file or directorydu: cannot access `/proc/10559/fd/4': No such file or directorydu: cannot access `/proc/10559/fdinfo/4': No such file or directory0       /proc51M     /root14M     /sbin4.0K    /selinux4.0K    /srv0       /sys1.3M    /tmp2.1G    /usr1.4G    /var

As you can see, it does not add up to 20GB (excluding /home because that one is mounted to vda4).

 

 

Could you provide a copy of your /etc/fstab file so we can see the partitions and mounts you have? 

 

Could you try running the following and coping this here also :)

 

du -h / | sort -nr | grep '[0-9]G'

 

du -Pshx /* | sort -rh

Link to comment
Share on other sites

Link to post
Share on other sites

Possibly a deleted file that is still accessed by a process. Does lsof show anything large?

Are there any hidden files and directories under / ?

Any files under a mount?

Link to comment
Share on other sites

Link to post
Share on other sites

Could you provide a copy of your /etc/fstab file so we can see the partitions and mounts you have? 

 

Could you try running the following and coping this here also :)

 

du -h / | sort -nr | grep '[0-9]G'

 

du -Pshx /* | sort -rh

 

Possibly a deleted file that is still accessed by a process. Does lsof show anything large?

Are there any hidden files and directories under / ?

Any files under a mount?

 

 

Found the problem, before I mounted /home to vda4, it used to be part of vda3, I moved the files over, but I forgot to delete the original files.

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×