running out of disk space on /root directory

Hello,

I have the follwoing partitions:

Dateisystem     1K-Blöcke    Benutzt  Verfügbar Verw% Eingehängt auf
devtmpfs          5983532          8    5983524    1% /dev
tmpfs             5991012        668    5990344    1% /dev/shm
tmpfs             5991012      10488    5980524    1% /run
tmpfs             5991012          0    5991012    0% /sys/fs/cgroup
/dev/sda2        20510716   19569728          0  100% /
/dev/sda3      1900014844 1187900380  615576200   66% /home
tmpfs             1198204         28    1198176    1% /run/user/1000
/dev/sdb1      1953480700  187731216 1765749484   10% /run/media/vasilis/My Passport

as you can see, the root directory is now 100%, but at the same time, I have more than 500 GB available. How does this work? How can I provide more space to the root directory?

Best,
Vasilis

That file system is Btrfs?

BTW, that is the root file system, which is written as /.
/root is something different.

sysfs on /sys type sysfs (rw,relatime)
proc on /proc type proc (rw,relatime)
devtmpfs on /dev type devtmpfs (rw,nosuid,size=5983532k,nr_inodes=1495883,mode=755)
securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
devpts on /dev/pts type devpts (rw,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /run type tmpfs (rw,nosuid,nodev,mode=755)
tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec,mode=755)
cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,xattr,release_agent=/usr/lib/systemd/systemd-cgroups-agent,name=systemd)
pstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime)
cgroup on /sys/fs/cgroup/net_cls,net_prio type cgroup (rw,nosuid,nodev,noexec,relatime,net_cls,net_prio)
cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpu,cpuacct)
cgroup on /sys/fs/cgroup/hugetlb type cgroup (rw,nosuid,nodev,noexec,relatime,hugetlb)
cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpuset)
cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer)
cgroup on /sys/fs/cgroup/pids type cgroup (rw,nosuid,nodev,noexec,relatime,pids)
cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices)
cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio)
cgroup on /sys/fs/cgroup/perf_event type cgroup (rw,nosuid,nodev,noexec,relatime,perf_event)
cgroup on /sys/fs/cgroup/memory type cgroup (rw,nosuid,nodev,noexec,relatime,memory)
/dev/sda2 on / type ext4 (rw,relatime,data=ordered)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=26,pgrp=1,timeout=0,minproto=5,maxproto=5,direct)
debugfs on /sys/kernel/debug type debugfs (rw,relatime)
hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime)
mqueue on /dev/mqueue type mqueue (rw,relatime)
/dev/sda3 on /home type ext4 (rw,relatime,data=ordered)
tmpfs on /run/user/1000 type tmpfs (rw,nosuid,nodev,relatime,size=1198204k,mode=700,uid=1000,gid=100)
fusectl on /sys/fs/fuse/connections type fusectl (rw,relatime)
gvfsd-fuse on /run/user/1000/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,relatime,user_id=1000,group_id=100)
tracefs on /sys/kernel/debug/tracing type tracefs (rw,relatime)
/dev/sdb1 on /run/media/vasilis/My Passport type fuseblk (rw,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096,uhelper=udisks2)

what is all this??? i guess it is not Btrfs.
so, i presume the root file system is where all the essential stuff goes for linux to run? how could i add more space to that?

It is better to not only show output, but also the command you used. Thus we can see what the output in fact is about. The best is to copy/paste: prompt, command, output, next prompt. Then we know who you were, where you were, what you did and what you got. In short, we see what you see and that is what you and we want.

My post yesterday was a bit premature. The df shows that / is 100%. On a 20GB file system, that is not normal.
First try to empty /tmp to get some space to use the system.

Sorry, I have to go for the day, but others will be able to help you to investigatte if some log file in /var/log run out of proportions.

/dev/sda2 on / type ext4 (rw,relatime,data=ordered)

Your root partition uses ext4 on /dev/sda2
Since /home is on /dev/sda3 and I am guessing there is no space left between the two you would have to move partitions to get space to expand the root partition. Show fdisk -l for further help

Shoudn’t we first try to find out why his / is 100% before we start to go into the intricate process of reshuffling partitions?

20GB full is not normal. There must be something there that can be deleted.

Here is output from fdisk -l. I agree with the latest reply that first I would like to find out why this 20 GB which was suggested on the first instance by a Linux installation is not sufficient anymore.

linux-yrfz:/ # fdisk -l                                                                                               
Festplatte /dev/sda: 1.8 TiB, 2000398934016 Bytes, 3907029168 Sektoren                                                
Einheiten: Sektoren von 1 * 512 = 512 Bytes                                                                           
Sektorgröße (logisch/physikalisch): 512 Bytes / 4096 Bytes                                                            
E/A-Größe (minimal/optimal): 4096 Bytes / 4096 Bytes                                                                  
Festplattenbezeichnungstyp: dos                                                                                       
Festplattenbezeichner: 0x0000c0d9                                                                                     
                                                                                                                      
Gerät      Boot   Anfang       Ende   Sektoren Größe Kn Typ                                                           
/dev/sda1           2048    4208639    4206592    2G 82 Linux Swap / Solaris                                          
/dev/sda2  *     4208640   46153727   41945088   20G 83 Linux                                                         
/dev/sda3       46153728 3907028991 3860875264  1.8T 83 Linux                                                         
                                                                                                                      
                                                                                                                      
linux-yrfz:/ #    

I suggested to empty /tmp. Did you do that?

I have deleted some files, I now have 1,3 GB free. I am not able to delete more, as the operation is not allowed.

I had 20Gb / partition and it filled up as well when I had Leap42.2 (formatted in ext4 as well). I deleted from the tmp directory all files/folders older than 30 days with the command (as root)

find /tmp -ctime +30 -exec rm -rf {} +

and then increased the size to 40GB. Now after the update to 42.3 I have 14GB used there. It seems that the /tmp directory fills up even though not as fast as when using btrfs file system.
You should make a backup of you /home directory and then boot from a “Gparted” or “Parted Magic” CD. I used a parted magic CD from 2013 (it was still free then). Then you should shrink your /home partition (take 20GB from the front adjacent to the root partition). It will move all you files in /home backwards and if everything goes OK your files are all OK - no guarantee though that’s why I wrote back up. Then you can increase your root partition by those 20GB. You can just play round until you have got it as you want it - the partitioning is only done after you activate those steps.
Cheers
Uli

Well, after deleting all tmp content, I rebooted and now i am back to an issue i had 1 week ago and that is that i cannot get the graphical environment. And I definitely need this in order to work on the partitioning etc.
I have the drm-kmp-default-4.9.33.k4.4.76_1-3.2.x86_64 installed and use intel graphics card, driver i915.
I have tried to reinstall it, in case i deleted sth useful from /tmp but it says it cannot go on, as it needs 14 MB on the / filesystem and currently it is 100% full!

You can only work on the hard drive partitions when they are NOT mounted. That’s why I said you should boot the computer off a “Gparted” or “Parted Magic” CD. There you can go into the GUI of whatever partitioning CD you use and do your changes in the partitions and then you have at least 20 GB free.

Only deleting the contents of /tmp (when nobody else is loged in) can not make you system break its graphics mode IMHO.

Many have set to delete the contents of /tmp at every boot. That is a very normal way of life.

But of course we are curious how much space you have now on / after that deletion of the contents of /tmp. Please keep us up-to-date of as may facts you have. It is already difficult enough to understand peoples problems divided as we are from each other by space and time.

Ok, so the current situation is this:

  1. i do not have access to graphical environment, only console
  2. /dev/sda2 mounted on / has 100% use
  3. /dev/sda3 mounted on /home has 66% use

Any ideas?

Now, did or did you not remove the contents of /tmp. First you said you did and got 1GB free. Now you say you have 100%. That is inconsistent.

Check for extremley big diroctories/file. Maybe best to start with

cd /var
du -sh *

When one directory there is excessive cd to it and repeat

cd ...
du -sh *

It is a trial and error process.

Ask here when you think you got something. Remark that you are looking for something of > 10 GB.

Your / is ext4. This is basic searching, start using “du -sck *” and drilling down into the big offending directories. Do “ls -la /” and make sure no hidden big files there to start with … sign this guy up for a course in using the linux shell, heh.

Ok, so /usr has 1.2 G for lib, 3.1G for lib64, 4,.5G for share.
/var has 3.0G for tmp, but when i cd to /tmp, it only shows 4K firefox, 3M mozilla, 0 for qtsingleapp-homeva-15d6-3e8-lockfile and 8K skype-2308.

Ok, now goto /var/tmp ad look what those 3GB is. etc., etc., etc.

And do not hesitate to ost what you see. That is much better then trying totell what you see.
Copy/paste the prompt, the command, the output, next prompt between CODE tags in yopur post. You het the CODE tags by clicking on the # button in the tool bar of the post editor.

Example from my 13.1 system:

boven:/var/tmp # du -sh *
1.3M    kdecache-henk
11M     kdecache-kdm
8.0K    systemd-private-4a0e4ac193714dc78801a38211d4185d-apache2.service-BsTiu0
8.0K    systemd-private-4a0e4ac193714dc78801a38211d4185d-rtkit-daemon.service-V4Zb1N
boven:/var/tmp #

And as you see I have not even 2M there. Thus you may have a catch there.

I am afraid i cannot post what i see, as i am trying to fix a different PC than the one i am writing at now. anyway, there are tens of files starting from zypp., tens of files starting from systemd-. each one of them is from 4 to 48k, but if you add some 500+ of them, it accumulates. I guess I need to delete most of them, if not all. But is it safe to do so? And in fact, yday I did delete things in /tmp but when rebooting, i faced the issue of non-graphical envirorment.

Ok, I understand your problem of copy/pasting. We have to live with that.

It seems that those systemd… files are not deleted after usage :(.

I think you delete all older then today. It is of course easier to delete all of them and do a reboot.

You say you have no graphical any more. Do you mean you get no graphical log in screen at all?