0

I have a problem with the "computer" space. I get constantly an error message signaling the lack of space. There are several drives on the computer, one with Windows OS on it, with a lot of space, how can I use some of those spaces to increase the size of the root drive?

a view of PC drives

When I run fdisk -l I get:

...

Disk /dev/sda: 465,78 GiB, 500107862016 bytes, 976773168 sectors Disk model: WDC WD5003AZEX-0 Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes Disklabel type: dos Disk identifier: 0xc7f451ff

Device Boot Start End Sectors Size Id Type /dev/sda1 * 2048 206847 204800 100M 7 HPFS/NTFS/exFAT /dev/sda2 206848 976771119 976564272 465,7G 7 HPFS/NTFS/exFAT

Disk /dev/sdb: 223,58 GiB, 240057409536 bytes, 468862128 sectors Disk model: KINGSTON SA400S3 Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: gpt Disk identifier: 3DCD1C10-11BF-4466-96FB-8D321A4445D9

Device Start End Sectors Size Type /dev/sdb1 2048 1050623 1048576 512M EFI System /dev/sdb2 1050624 468860927 467810304 223,1G Linux filesystem

Disk /dev/sdc: 931,53 GiB, 1000204886016 bytes, 1953525168 sectors Disk model: WDC WD10EFRX-68J Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes Disklabel type: dos Disk identifier: 0xbc945852

Device Boot Start End Sectors Size Id Type /dev/sdc1 2048 1953521663 1953519616 931,5G 7 HPFS/NTFS/exFAT

Disk /dev/sdd: 111,81 GiB, 120034123776 bytes, 234441648 sectors Disk model: Samsung SSD 840 Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: dos Disk identifier: 0xa5d35b39

Device Boot Start End Sectors Size Id Type /dev/sdd1 2048 206847 204800 100M 7 HPFS/NTFS/exFAT /dev/sdd2 206848 177102713 176895866 84,4G 7 HPFS/NTFS/exFAT /dev/sdd3 * 177102848 178153471 1050624 513M ef EFI (FAT-12/16/32) /dev/sdd4 178155518 234440703 56285186 26,9G 5 Extended /dev/sdd5 178155520 234440703 56285184 26,9G 83 Linux

...

What can I do?

Here is what I get with df -H:

root@magellan:/home/frogeraie# df -H
Filesystem      Size  Used Avail Use% Mounted on
udev            2,0G     0  2,0G   0% /dev
tmpfs           401M  1,9M  399M   1% /run
/dev/sdd5        29G   27G  512M  99% /
tmpfs           2,1G     0  2,1G   0% /dev/shm
tmpfs           5,3M  4,1k  5,3M   1% /run/lock
tmpfs           2,1G     0  2,1G   0% /sys/fs/cgroup
...
/dev/sdd3       537M  5,5M  532M   2% /boot/efi
tmpfs           401M   54k  401M   1% /run/user/1000

When I get a popup signaling a shortage of space if I ask an examination I get the following circular diagram: enter image description here

@Rinzwind here what gives ls -ltr /var/log/:

    total 4500
drwxr-xr-x  2 root              root              4096 sept.  5  2019 openvpn
drwx------  2 speech-dispatcher root              4096 janv. 19  2020 speech-dispatcher
drwx--x--x  2 root              gdm               4096 nov.  10  2020 gdm3
drwxr-xr-x  2 root              root              4096 janv. 19  2021 dist-upgrade
drwx------  2 root              root              4096 févr.  9  2021 private
-rw-r--r--  1 root              root            104003 févr.  9  2021 bootstrap.log
drwxr-xr-x  3 root              root              4096 févr.  9  2021 hp
drwxrwxr-x  2 root              root              4096 août  23  2021 installer
drwxr-sr-x+ 3 root              systemd-journal   4096 août  23  2021 journal
-rw-r--r--  1 root              root              3381 août  31  2021 alternatives.log.8.gz
-rw-------  1 root              root               757 août  31  2021 ubuntu-advantage.log.4.gz
-rw-r--r--  1 root              root            148467 août  31  2021 dpkg.log.8.gz
-rw-r--r--  1 root              root             32032 sept. 18  2021 faillog
-rw-r-----  1 syslog            adm                606 sept. 18  2021 mail.err.1
-rw-r-----  1 syslog            adm                  0 sept. 19  2021 mail.err
-rw-r--r--  1 root              root              1617 sept. 21  2021 alternatives.log.7.gz
-rw-r--r--  1 root              root             13578 sept. 24  2021 dpkg.log.7.gz
-rw-------  1 root              root              2033 sept. 27  2021 ubuntu-advantage.log.3.gz
-rw-r--r--  1 root              root               512 oct.   7 08:44 alternatives.log.6.gz
-rw-r--r--  1 root              root              2801 oct.   7 08:44 dpkg.log.6.gz
-rw-------  1 root              root               861 oct.  11 15:49 ubuntu-advantage.log.2.gz
-rw-------  1 root              root               664 nov.  16 09:47 ubuntu-advantage.log.1
-rw-------  1 root              root                 0 nov.  16 09:51 ubuntu-advantage-license-check.log
-rw-r--r--  1 root              root              1096 nov.  27 18:13 alternatives.log.5.gz
-rw-r--r--  1 root              root             19955 nov.  27 18:13 dpkg.log.5.gz
-rw-------  1 root              root               519 nov.  30 16:24 ubuntu-advantage-timer.log.5.gz
-rw-------  1 root              root                 0 déc.   1 09:34 ubuntu-advantage.log
-rw-r-----  1 root              adm                328 déc.  16 18:57 apport.log.7.gz
-rw-r-----  1 root              adm                485 déc.  17 12:15 apport.log.6.gz
-rw-r--r--  1 root              root               497 déc.  29 10:11 alternatives.log.4.gz
-rw-r--r--  1 root              root             15501 déc.  29 10:24 dpkg.log.4.gz
-rw-r-----  1 root              adm                592 déc.  29 17:58 apport.log.5.gz
-rw-------  1 root              root               749 déc.  31 17:26 ubuntu-advantage-timer.log.4.gz
-rw-rw-r--  1 root              utmp            292292 janv.  5 14:38 lastlog
-rw-r-----  1 root              adm                553 janv. 14 10:49 apport.log.4.gz
-rw-r-----  1 root              adm                317 janv. 21 09:01 apport.log.3.gz
-rw-r--r--  1 root              root               440 janv. 21 09:05 alternatives.log.3.gz
-rw-r--r--  1 root              root             16203 janv. 28 09:06 dpkg.log.3.gz
-rw-------  1 root              root               855 janv. 31 16:37 ubuntu-advantage-timer.log.3.gz
-rw-r--r--  1 root              root               102 févr.  7 10:26 vbox-setup.log.4
-rw-r--r--  1 root              root               993 févr. 18 16:11 alternatives.log.2.gz
-rw-r--r--  1 root              root               102 févr. 19 07:57 vbox-setup.log.3
-rw-r--r--  1 root              root             11278 févr. 24 17:07 dpkg.log.2.gz
-rw-------  1 root              root               878 févr. 28 15:04 ubuntu-advantage-timer.log.2.gz
-rw-rw----  1 root              utmp                 0 mars   1 08:57 btmp.1
-rw-r-----  1 syslog            adm                480 mars   5 08:12 mail.log.4.gz
-rw-r-----  1 syslog            adm               6493 mars   6 00:00 auth.log.4.gz
-rw-r-----  1 syslog            adm             172044 mars   6 00:00 kern.log.4.gz
-rw-r-----  1 syslog            adm                283 mars  10 08:31 mail.log.3.gz
-rw-r-----  1 syslog            adm               4725 mars  14 09:51 auth.log.3.gz
-rw-r-----  1 syslog            adm             100110 mars  14 09:51 kern.log.3.gz
-rw-r--r--  1 root              root               102 mars  14 09:52 vbox-setup.log.2
-rw-r--r--  1 root              root             11464 mars  17 06:24 fontconfig.log
-rw-r-----  1 syslog            adm                444 mars  19 14:40 mail.log.2.gz
-rw-r-----  1 syslog            adm               5891 mars  20 00:00 auth.log.2.gz
-rw-r-----  1 syslog            adm             101434 mars  20 00:00 kern.log.2.gz
-rw-------  1 root              root             11656 mars  24 08:35 boot.log.7
-rw-r-----  1 syslog            adm              69461 mars  24 08:35 syslog.7.gz
-rw-r-----  1 syslog            adm               1826 mars  24 08:35 mail.log.1
-rw-r--r--  1 root              root               102 mars  24 08:36 vbox-setup.log.1
-rw-r-----  1 syslog            adm              55150 mars  28 08:26 auth.log.1
-rw-r-----  1 syslog            adm             526556 mars  28 08:26 kern.log.1
-rw-------  1 root              root             13248 mars  28 08:26 boot.log.6
-rw-r-----  1 syslog            adm              64689 mars  28 08:26 syslog.6.gz
-rw-r--r--  1 root              adm              19364 mars  28 08:26 dmesg.4.gz
-rw-r-----  1 syslog            adm              56202 mars  29 09:31 syslog.5.gz
-rw-------  1 root              root             13137 mars  29 09:31 boot.log.5
-rw-r--r--  1 root              adm              19382 mars  29 09:31 dmesg.3.gz
-rw-r-----  1 syslog            adm              56812 mars  30 08:24 syslog.4.gz
-rw-------  1 root              root             13161 mars  30 08:24 boot.log.4
-rw-r--r--  1 root              adm              19307 mars  30 08:24 dmesg.2.gz
-rw-r-----  1 root              adm                326 mars  30 19:19 apport.log.2.gz
-rw-r-----  1 syslog            adm              56117 mars  31 09:27 syslog.3.gz
-rw-------  1 root              root             13198 mars  31 09:27 boot.log.3
-rw-r--r--  1 root              adm              19436 mars  31 09:27 dmesg.1.gz
-rw-r--r--  1 root              root             14706 mars  31 11:19 alternatives.log.1
-rw-r--r--  1 root              root            537582 mars  31 11:19 dpkg.log.1
-rw-------  1 root              root              6476 mars  31 18:02 ubuntu-advantage-timer.log.1
-rw-r-----  1 root              adm                470 mars  31 18:13 apport.log.1
-rw-r--r--  1 root              root                 0 avril  1 08:02 alternatives.log
-rw-r-----  1 syslog            adm              80287 avril  1 08:03 syslog.2.gz
-rw-r-----  1 root              adm                  0 avril  1 08:03 apport.log
-rw-------  1 root              root             11801 avril  1 08:03 boot.log.2
-rw-rw----  1 root              utmp                 0 avril  1 08:03 btmp
drwxr-x---  2 root              adm               4096 avril  1 08:03 unattended-upgrades
-rw-r--r--  1 root              adm              78615 avril  1 08:03 dmesg.0
-rw-r--r--  1 root              root               102 avril  1 08:03 vbox-setup.log
-rw-r--r--  1 root              root             37347 avril  1 15:15 Xorg.0.log.old
-rw-r--r--  1 root              root              1518 avril  2 18:13 gpu-manager.log
-rw-------  1 root              root             11534 avril  2 18:13 boot.log.1
drwxr-x---  2 root              adm               4096 avril  2 18:13 apache2
-rw-------  1 root              root                 0 avril  2 18:13 boot.log
drwxr-xr-x  2 root              root              4096 avril  2 18:13 cups
-rw-r-----  1 syslog            adm             382739 avril  2 18:13 syslog.1
drwxr-xr-x  2 root              root              4096 avril  2 18:13 lightdm
drwxr-xr-x  2 root              adm               4096 avril  2 18:13 nginx
-rw-r--r--  1 root              adm              79103 avril  2 18:13 dmesg
-rw-r-----  1 syslog            adm               3787 avril  2 18:41 mail.log
drwxr-xr-x  2 root              root              4096 avril  2 18:41 apt
-rw-------  1 root              root               394 avril  2 18:42 ubuntu-advantage-timer.log
drwx------  2 root              root              4096 avril  2 18:42 letsencrypt
-rw-r--r--  1 root              root             11164 avril  2 18:42 dpkg.log
-rw-rw-r--  1 root              utmp            455808 avril  2 18:42 wtmp
-rw-r--r--  1 root              root             33663 avril  2 18:42 Xorg.0.log
-rw-r-----  1 syslog            adm             542854 avril  2 18:42 kern.log
-rw-r-----  1 syslog            adm             115096 avril  2 18:46 syslog
-rw-r-----  1 syslog            adm              72135 avril  2 18:47 auth.log

as you said there are some massive syslog files, I suppose I can delete them without any consequence for the system?

Thank you for your help!

Thomas Ward
  • 74,764
  • Hello. You appear to have a lot of available space. What is the actual error message? What version of Ubuntu are you running? – David Mar 31 '22 at 13:00
  • When I download an extra application a popup appears signaling the lack of space and asking to empty trash and to inspect the disk. If I do that I get a circular diagram showing that most of the disk space is occupied by the system (linux) code since I have already removed all videos and pictures. I am on Ubuntu 20.04. – Francois Baret Mar 31 '22 at 14:40
  • Does it not say what is full? I do not know what you mean by this. When I download an extra application If you are down loading something it typically goes to the downloads directory. Or are you mixing download with install? Sorry but you are very hard to understand. Hopefully someone else can help you. – David Mar 31 '22 at 14:44
  • Looks like you made your root (/) partition too small for your usage. new users with many partitions sometimes do that. See https://askubuntu.com/questions/126153/how-to-resize-partitions – user535733 Mar 31 '22 at 14:52
  • I would advice to remove all loop devices. I have a hard time finding the important lines. I myself would replace the fdisk data with df -H (and remove loop devices). Shorter info with the same results. – Rinzwind Mar 31 '22 at 16:52
  • @Rinzwind Please be more precise: "remove all /dev/loop* devices from your fdisk listing. Also df -H | grep -v /dev/loop – waltinator Mar 31 '22 at 23:57
  • @waltinator here is what I get: root@magellan:/home/frogeraie# df -H | grep -v /dev/loop Filesystem Size Used Avail Use% Mounted on udev 2,0G 0 2,0G 0% /dev tmpfs 401M 1,9M 399M 1% /run /dev/sdd5 29G 27G 512M 99% / tmpfs 2,1G 0 2,1G 0% /dev/shm tmpfs 5,3M 4,1k 5,3M 1% /run/lock tmpfs 2,1G 0 2,1G 0% /sys/fs/cgroup /dev/sdd3 537M 5,5M 532M 2% /boot/efi tmpfs 401M 58k 401M 1% /run/user/1000 – Francois Baret Apr 01 '22 at 08:12
  • @user535733 I agree my root is too small but I am afraid to make mistakes with gparted can you guide me a little on its use? – Francois Baret Apr 01 '22 at 08:16
  • Your / has personal files? If so I would suggest to move those over to a data partition. You have a disk called "data". Use that (you can mount it. if ntfs see for instance https://askubuntu.com/questions/978746/how-to-mount-ntfs-partition-in-ubuntu-16-04) and you do not need to mess with your partitions. 20Gb for / should be more than enough --if-- you do not use it for personal files. 30 should be overkill. – Rinzwind Apr 01 '22 at 10:34
  • Also a culprit could be /var/log/ If you have a error that is seen every second there will be a log file in there that gets massive. if so check if you can fix the error and empty the log file. Do a sudo ls -ltr /var/log/. The last few lines could hold a large log file. – Rinzwind Apr 01 '22 at 10:38
  • Please [edit] your post to add new information, properly formatted. Information added via comments is hard for you to format, hard for us to read and ignored by future readers (who have better answers). Please click [edit] and add that vital information to your question so all the facts we need are in the question. Please don't use Add Comment, since that's our way to help you improve your question. All facts about your system and problem should go in the Question with [edit]. You may click on any of these [edit] links to [edit] your question. – waltinator Apr 01 '22 at 12:36
  • removing the log files can be done without repercussion. But I suggest mounting the "data" and moving your personal files from the home directory there and add it to your fstab. I use ncdu to find the biggest files. 30GB isn't too bad for a root partition. you can move and increase the partition with gparted, but it's probably not worth it. You don't use lvm where you could have just added a physical partition into your logical partition, that glues the partitions into one big space. But you have traditional MBR style partitions. – sleepyhead Apr 02 '22 at 18:51
  • FYI I will point out that 30GB is 'small' for a root partition that has a GUI. It's very small so log files and such (and data you install) might not fit on a small partition like that. – Thomas Ward Apr 03 '22 at 21:02
  • Does this answer your question? How to resize partitions? – karel Apr 05 '22 at 03:14

1 Answers1

0

This computer looks like a bit of a mess but let’s try to help you.

sda looks like it was once a MBR Windows installation but may be just a data disk now.

sdb looks like it is another Linux installation but not the one you are having the space problem with. It could be Linux data but it doesn’t appear to be mounted.

sdc looks like Windows data

sdd has your Linux installation and another Windows partition. It may be a Windows data partition or could be a Windows system partition.

There are several ways you could simplify this but to just answer the question the following should give you more space for Linux. This assumes you can spare some space from sdd2, a Windows partition.

  1. Backup any data on sdd that you cannot afford to lose
  2. Ideally using Windows disk management, shrink sdd2. It looks like you might be able to shrink it by up to 40GB.
  3. Boot your machine with a live environment that contains GParted. The Ubuntu install media is ideal. Choose Try Ubuntu and then run GParted
  4. There should now be space between sdd2 and sdd3. Using GParted move sdd3 all the way to the left and click apply.
  5. The space should now be between sdd3 and sdd4. Using GParted extend sdd4 all the way to the left into that space and click apply.
  6. You should now be able to move sdd5 all the way to the left and apply
  7. Finally extend sdd5 all the way to the right.

Once these steps are complete reboot into the computer’s Linux installation which should now have extra space for /. Any problems comment below . Good luck

PonJar
  • 1,868