LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Ubuntu (https://www.linuxquestions.org/questions/ubuntu-63/)
-   -   system partition persists to report being full on ubuntu 18.04 (https://www.linuxquestions.org/questions/ubuntu-63/system-partition-persists-to-report-being-full-on-ubuntu-18-04-a-4175646323/)

Habib Davy 01-16-2019 06:34 AM

system partition persists to report being full on ubuntu 18.04
 
Hello everyone ! I hope you are well.

I am currently experiencing a problem on ubuntu 18.04, concerning my system partition which began to report being full two days after I installed matlab (the trial version). Since then, I can not use my browser anymore, I can not visit more than one partition of my hard drive (I receive a message that tells me that I do not have enough space), my system has in general extremely slowed down.

I have uninstalled Matlab, but no change. I even went so far as to uninstall other software, but I did not notice any changes.
I am about to reinstall my operating system, but first, I would like to know if there is another alternative to this.

Thank you in advance !

berndbausch 01-16-2019 07:07 AM

Start by running the df command and reporting the result.
If the partition is really full, there are tools to identify files or directories that occupy a lot of space.

BW-userx 01-16-2019 07:29 AM

check /tmp and what he said.

Beefybison 01-16-2019 10:41 AM

Yeah I would use df first
Code:

df -h
You could also go to the / directory and run
Code:

sudo du -h --max-depth=1
From there you can move to the directories taking up the most space and run ls to see which files are taking up the most space.
Code:

ls -lS
Rinse and repeat.

Habib Davy 01-17-2019 01:10 AM

Thank you for your answers !

But I did not have time to apply them because since my last post, this problem has gotten worse and I could not have access to my system anymore. When I want to access it by normal start, it appears sequences of sequence of line which stop at a given moment and I just have to shutdown my computer and to restart it.

I tried to go through the "Ubuntu, with Linux 4.15.0-43-generic (recovery mode)" option, in "Advanced options for ubuntu" of "GNU GRUB". Coming to the "Recovery Menu", I chose the "clean Try to make free space" option and the result looked like:
---
Trying to find packages you don't need (apt-get autoremove), please review carefully.
Reading package lists...Error!
E: Write error - write(28: No space left on device)
E: IO Error saving source cache
E: The package lists or status fille could not be parsed or opened.
Finished, please press ENTER
---

After that, when I take the "resume Resume normal boot" option, I end up with a flashing screen which last, until I shutdown my computer.

ondoho 01-17-2019 01:54 AM

you need to boot "Live", i.e. from a USB stick, so you can access your hard drive "from the outside".

you then mount your internal hard drive and can essentially try the same commands as recommended previously, just including the path to the mounted hard drive.

with pictures:
Code:

sudo su -
for now it's easiest to just be root.

Code:

fdisk -l
find your internal hard drive, and the partition that is full.
assuming it's /dev/sda2:
Code:

cd
mkdir mnt
mount /dev/sda2 mnt
cd mnt

now repeat the commands from post #4 (without the sudo; remember, we already are root).

agillator 01-17-2019 11:46 PM

One other thing to check: check the trash, not just the one that may show up on your desktop. There are often hidden trash directories (usually named something like .Trash*) especially on directories mounted through the mount command. The files in these directories do not show up but do take up space. If you delete the files or the entire directories the files will finally actually be deleted, not just marked for deletion. It the trash directory is needed again later it will automatically be recreated (empty).

Habib Davy 01-19-2019 07:04 AM

Hi, hope you're doing well !

Thank you @ondoho ! I did as you said and here is what i got :


Code:


root@ubuntu:~/mnt# df -h
Filesystem      Size  Used Avail Use% Mounted on
udev            1.9G    0  1.9G  0% /dev
tmpfs          386M  1.8M  384M  1% /run
/dev/sdb1        15G  1.9G  13G  13% /cdrom
/dev/loop0      1.8G  1.8G    0 100% /rofs
/cow            1.9G  355M  1.6G  19% /
tmpfs          1.9G    0  1.9G  0% /dev/shm
tmpfs          5.0M  8.0K  5.0M  1% /run/lock
tmpfs          1.9G    0  1.9G  0% /sys/fs/cgroup
tmpfs          1.9G    0  1.9G  0% /tmp
tmpfs          386M  68K  386M  1% /run/user/999
/dev/loop1      87M  87M    0 100% /snap/core/4917
/dev/loop2      35M  35M    0 100% /snap/gtk-common-themes/319
/dev/loop3      141M  141M    0 100% /snap/gnome-3-26-1604/70
/dev/loop4      2.4M  2.4M    0 100% /snap/gnome-calculator/180
/dev/loop5      13M  13M    0 100% /snap/gnome-characters/103
/dev/loop6      15M  15M    0 100% /snap/gnome-logs/37
/dev/loop7      3.8M  3.8M    0 100% /snap/gnome-system-monitor/51
/dev/sda8        47G  47G    0 100% /root/mnt
/dev/sda5      201G  146G  55G  73% /media/ubuntu/Software
/dev/sda1      131G  89G  43G  68% /media/ubuntu/F44498B2449878D6
tmpfs          386M    0  386M  0% /run/user/0



Code:


root@ubuntu:~/mnt# du -h --max-depth=1
88K        ./run
52K        ./snap
136M        ./boot
26G        ./var
4.0K        ./lib64
14G        ./usr
4.0K        ./proc
4.0K        ./sys
4.0K        ./cdrom
16K        ./lost+found
4.0K        ./home
8.0K        ./u01
13M        ./bin
16K        ./dev
12K        ./mnt
875M        ./lib
24K        ./tmp
16K        ./media
2.4G        ./root
8.0K        ./srv
37M        ./etc
5.8M        ./lib32
12M        ./sbin
3.6G        ./opt
47G        .




Code:


root@ubuntu:~/mnt# ls -ls
total 1052380
    12 drwxrwxrwx  2 root root      12288 Jan 13 05:18 bin
      4 drwxrwxrwx  3 root root      4096 Jan 13 05:20 boot
      4 drwxrwxrwx  2 root root      4096 Nov  9  2016 cdrom
  3668 -rw-rw-rw-  1 root root    3756032 Aug  4  2017 core
      4 drwxr-xr-x  5 root root      4096 Jul 19  2016 dev
      0 -rw-------  1 root root          0 Jan 16 10:46 enp7s0.pppoe
    12 drwxrwxrwx 169 root root      12288 Jan 15 18:54 etc
      4 drwxrwxr-x  2 root root      4096 Nov  9  2016 home
      0 lrwxrwxrwx  1 root root        33 Dec 22 09:25 initrd.img -> boot/initrd.img-4.15.0-43-generic
      0 lrwxrwxrwx  1 root root        33 Dec 22 09:25 initrd.img.old -> boot/initrd.img-4.13.0-46-generic
      4 drwxrwxrwx  23 root root      4096 Jul 13  2018 lib
      4 drwxrwxrwx  2 root root      4096 Jul 25 19:48 lib32
      4 drwxrwxrwx  2 root root      4096 Jul 13  2018 lib64
    16 drwxrwxrwx  2 root root      16384 Nov  9  2016 lost+found
      4 drwxrwxrwx  5 root root      4096 Oct 29  2017 media
      4 drwxrwxrwx  4 root root      4096 Jan  5  2018 mnt
      0 -rw-------  1 root root          0 Jan 16 10:45 namehelp.txt
      4 drwxrwxrwx  8 root root      4096 Jan 16 10:57 opt
      4 drwxr-xr-x  2 root root      4096 Apr 12  2016 proc
      4 drwxrwxrwx  20 root root      4096 Dec 21 16:15 root
      4 drwxr-xr-x  12 root root      4096 Jul 19  2016 run
    12 drwxrwxrwx  2 root root      12288 Jan 13 05:18 sbin
      4 drwxrwxrwx  7 root root      4096 Jan 15 18:51 snap
      4 drwxr-xr-x  3 root root      4096 May 11  2018 srv
1048580 -rw-rw-rw-  1 root root 1073741824 Jul 18  2018 swapfile
      4 drwxr-xr-x  2 root root      4096 Feb  5  2016 sys
      4 drwxrwxrwt  7 root root      4096 Jan 18 06:37 tmp
      4 drwxrwxrwx  3 root root      4096 Feb  1  2017 u01
      4 drwxrwxrwx  12 root root      4096 Jul 25 19:48 usr
      4 drwxr-xr-x  15 root root      4096 Apr 29  2018 var
      0 lrwxrwxrwx  1 root root        30 Dec 22 09:25 vmlinuz -> boot/vmlinuz-4.15.0-43-generic
      0 lrwxrwxrwx  1 root root        30 Dec 22 09:25 vmlinuz.old -> boot/vmlinuz-4.13.0-46-generic
      0 -rw-------  1 root root          0 Jan 16 10:47 vmnet1.pppoe
      0 -rw-------  1 root root          0 Jan 16 10:47 vmnet8.pppoe
      0 -rw-------  1 root root          0 Jan 16 10:47 wlp6s0.pppoe


Habib Davy 01-19-2019 10:39 PM

While examining the result above, i saw that the folder "var" was occupying around 26GB.
And in those 26Gb, 24GB came from the "log" folder that include the directory named "cups" with a single file inside it named "error_log" of size 22GB.

Code:

root@ubuntu:~/mnt# cd ./var
root@ubuntu:~/mnt/var# du -h --max-depth=1
64K        ./snap
6.0M        ./crash
4.0K        ./local
52K        ./spool
4.0K        ./metrics
9.1M        ./backups
312M        ./cache
24G        ./log
4.0K        ./mail
1.5G        ./lib
32K        ./tmp
4.0K        ./opt
50M        ./www
26G        .
root@ubuntu:~/mnt/var# cd log
root@ubuntu:~/mnt/var/log# du -h --max-depth=1
356K        ./apt
3.6M        ./dist-upgrade
8.0K        ./hp
22G        ./cups
1.6M        ./installer
1.6G        ./journal
76K        ./unattended-upgrades
4.0K        ./openvpn
8.0K        ./dbconfig-common
4.0K        ./gdm3
144K        ./lightdm
8.0K        ./mysql
12K        ./fsck
120K        ./apache2
4.0K        ./tor
4.0K        ./speech-dispatcher
180K        ./vmware
24G        .
root@ubuntu:~/mnt/var/log# cd cups
root@ubuntu:~/mnt/var/log/cups# du -h --max-depth=1
22G        .
root@ubuntu:~/mnt/var/log/cups# ls
error_log

So, i have overwritten "error_log" file, in the following way:

Code:

root@ubuntu:~/mnt/var/log/cups# rm --force error_log
root@ubuntu:~/mnt/var/log/cups# du -h --max-depth=1
4.0K        .
root@ubuntu:~/mnt/var/log/cups# cd ..
root@ubuntu:~/mnt/var/log# du -h --max-depth=1
356K        ./apt
3.6M        ./dist-upgrade
8.0K        ./hp
4.0K        ./cups
1.6M        ./installer
1.6G        ./journal
76K        ./unattended-upgrades
4.0K        ./openvpn
8.0K        ./dbconfig-common
4.0K        ./gdm3
144K        ./lightdm
8.0K        ./mysql
12K        ./fsck
120K        ./apache2
4.0K        ./tor
4.0K        ./speech-dispatcher
180K        ./vmware
1.6G        .
root@ubuntu:~/mnt/var/log#

But before overwriting "error_log", i went into it and saw that it was a continuous succession of the same syntaxes. it actually looks like :

Code:

...
W [16/Jan/2019:00:51:01 +0600] Notifier for subscription 2167 (dbus://) went away, retrying!
E [16/Jan/2019:00:51:01 +0600] File \"/usr/lib/cups/notifier/dbus\" has insecure permissions (0100777/uid=0/gid=0).
W [16/Jan/2019:00:51:01 +0600] Notifier for subscription 2167 (dbus://) went away, retrying!
E [16/Jan/2019:00:51:01 +0600] File \"/usr/lib/cups/notifier/dbus\" has insecure permissions (0100777/uid=0/gid=0).
W [16/Jan/2019:00:51:01 +0600] Notifier for subscription 2167 (dbus://) went away, retrying!
E [16/Jan/2019:00:51:01 +0600] File \"/usr/lib/cups/notifier/dbus\" has insecure permissions (0100777/uid=0/gid=0).
W [16/Jan/2019:00:51:01 +0600] Notifier for subscription 2167 (dbus://) went away, retrying!
E [16/Jan/2019:00:51:01 +0600] File \"/usr/lib/cups/notifier/dbus\" has insecure permissions (0100777/uid=0/gid=0).
...

It appears that the growing of this file was continuing and so should be prevent, and i found how to do so after further googelling. Only one line was necessary:

Code:

chmod 755 /usr/lib/cups/notifier
Thanks to all of you for your support !

ondoho 01-20-2019 06:13 AM

well done!
thank you for sharing the solution in full detail.
now please mark your thread SOLVED.

Habib Davy 01-21-2019 09:51 PM

Welcome and Thanks for the remembrance !


All times are GMT -5. The time now is 08:50 AM.