3

I have a Ubuntu 12.04.5 LTS (GNU/Linux 3.11.0-26-generic x86_64) file server that has been in service for about 5 years. This is server only no desktop GUI.

The root is mounted on a 300 GB IDE drive but the partition was only set to 30 GB.

Last week I got a disk full warning so I rebooted in ubuntu live cd and resized the partition to 100 GB.

After reboot the df showed 33% used (as expected).

Today, 3 days later df shows 99% used.

derek@purplepenguin:~$ df -h
Filesystem                Size  Used Avail Use% Mounted on
/dev/sda1                  96G   90G  1,4G  99% /
udev                      2,0G  4,0K  2,0G   1% /dev
tmpfs                     395M  588K  395M   1% /run
none                      5,0M     0  5,0M   0% /run/lock
none                      2,0G  272K  2,0G   1% /run/shm
/dev/md0                  1,8T  1,5T  238G  87% /data

I cannot find any big files on the drive.

derek@purplepenguin:~$ sudo du -h --max-depth=1 --exclude=/proc --exclude=/mnt --exclude=/media --exclude=/data / | sort -hr

4,5G    /
2,1G    /usr
936M    /var
724M    /opt
465M    /lib
162M    /etc
59M     /boot
35M     /home
28M     /root
9,0M    /sbin
8,9M    /bin
4,3M    /tftpboot
3,4M    /lib32
1,2M    /run
28K     /tmp
16K     /lost+found
8,0K    /srv
4,0K    /selinux
4,0K    /lib64
4,0K    /dev
0       /sys

Help please.

Ok, found the problem. (thanks for the help)

I have mapped several network "shares" under /media I use rsync to backup the server files to these shares. It seems that when the network share is offline my rsync creates the backups in the /media folder and fills up my root drive.

5
  • Did you also check the --exclude=d directories, the / directory, and any hidden (starting with .) directories under /?
    – FedKad
    Jun 21, 2020 at 13:24
  • The following command will list the largest files: sudo du -am / | sort -nr | head -n 20
    – FedKad
    Jun 21, 2020 at 13:37
  • use baobab (Disk Usage Analyzer) to check what is eating up your space.
    – pLumo
    Jun 21, 2020 at 13:56
  • @pLumo : The OP mentioned that this is a headless server.
    – FedKad
    Jun 21, 2020 at 13:58
  • oh, didn't read that, thanks for the heads up. A similar program for Command Line: ncdu, see askubuntu.com/a/305071/631600
    – pLumo
    Jun 21, 2020 at 14:12

1 Answer 1

1

Note: Your Ubuntu version is out of support. So, you won't be able to install any new software from the official Ubuntu repositories. You have to use whatever command is already present in your system.


There may be hidden files or directories (their names starting with .) on your file system hierarchy that take too much disk space.

To search for the largest 20 directories or files starting from the root (/) directory, you can use the following command:

 sudo du -am / 2>/dev/null | sort -nr | head -n 20

Adjust the parameter 20 according to your needs.

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .