You are not logged in.

#1 2022-09-24 10:41:11

Luxall
Member
Registered: 2022-09-24
Posts: 10

Your root partition is running out of disk space.

Hi people,
I'm a new arch user and today i get this information:
"your root partition is running out of disk space, you have 133 mib remaining (0%)."

I don't know how to give more space to my root partition. Can someone help?

=-=-=-=-=-=

[lux@arch ~]$ lsblk 
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
loop0    7:0    0     4K  1 loop /var/lib/snapd/snap/bare/5
loop1    7:1    0  55.6M  1 loop /var/lib/snapd/snap/core18/2566
loop2    7:2    0 164.8M  1 loop /var/lib/snapd/snap/gnome-3-28-1804/161
loop3    7:3    0 346.3M  1 loop /var/lib/snapd/snap/gnome-3-38-2004/115
loop4    7:4    0  63.2M  1 loop /var/lib/snapd/snap/core20/1623
loop5    7:5    0  91.7M  1 loop /var/lib/snapd/snap/gtk-common-themes/1535
loop6    7:6    0   918M  1 loop /var/lib/snapd/snap/libreoffice/259
loop7    7:7    0    48M  1 loop /var/lib/snapd/snap/snapd/16778
loop8    7:8    0 169.4M  1 loop /var/lib/snapd/snap/spotify/60
loop11   7:11   0    71M  1 loop /var/lib/snapd/snap/tradingview/27
sda      8:0    0 476.9G  0 disk 
├─sda1   8:1    0   511M  0 part /boot
├─sda2   8:2    0  19.5G  0 part /
└─sda3   8:3    0 456.9G  0 part /home
sdb      8:16   0 447.1G  0 disk 
└─sdb1   8:17   0 447.1G  0 part 
zram0  254:0    0     4G  0 disk [SWAP]

=-=-=-=-=-=

[lux@arch ~]$ df -Th
Filesystem     Type      Size  Used Avail Use% Mounted on
dev            devtmpfs  7.7G     0  7.7G   0% /dev
run            tmpfs     7.7G  1.9M  7.7G   1% /run
/dev/sda2      ext4       20G   18G   96M 100% /
tmpfs          tmpfs     7.7G  282M  7.4G   4% /dev/shm
/dev/loop0     squashfs  128K  128K     0 100% /var/lib/snapd/snap/bare/5
/dev/loop1     squashfs   56M   56M     0 100% /var/lib/snapd/snap/core18/2566
/dev/loop5     squashfs   92M   92M     0 100% /var/lib/snapd/snap/gtk-common-themes/1535
/dev/loop8     squashfs  170M  170M     0 100% /var/lib/snapd/snap/spotify/60
/dev/loop4     squashfs   64M   64M     0 100% /var/lib/snapd/snap/core20/1623
/dev/loop3     squashfs  347M  347M     0 100% /var/lib/snapd/snap/gnome-3-38-2004/115
/dev/loop2     squashfs  165M  165M     0 100% /var/lib/snapd/snap/gnome-3-28-1804/161
/dev/loop6     squashfs  918M  918M     0 100% /var/lib/snapd/snap/libreoffice/259
/dev/loop7     squashfs   48M   48M     0 100% /var/lib/snapd/snap/snapd/16778
tmpfs          tmpfs     7.7G   34M  7.7G   1% /tmp
/dev/sda3      ext4      449G   14G  413G   4% /home
/dev/sda1      vfat      510M   72M  439M  15% /boot
tmpfs          tmpfs     1.6G  5.1M  1.6G   1% /run/user/1000
/dev/loop11    squashfs   71M   71M     0 100% /var/lib/snapd/snap/tradingview/27

=-=-=-=-=-=

[root@arch lux]# neofetch 
lux@arch 
OS: Arch Linux x86_64 
Kernel: 5.19.9-arch1-1 
Packages: 1238 (pacman) 
Shell: bash 5.1.16 
DE: Plasma 5.25.5 
WM: kwin 
Terminal: konsole 
CPU: Intel i7-8565U (8) @ 4.600GHz 
GPU: Intel WhiskeyLake-U GT2 [UHD Graphics 620] 
Memory: 3625MiB / 15717MiB 
   

Last edited by Luxall (2022-09-24 14:38:12)

Offline

#2 2022-09-24 11:41:49

d_fajardo
Member
Registered: 2017-07-28
Posts: 1,563

Re: Your root partition is running out of disk space.

Tell us more about your system. Help can only come properly if you provide info for us to asses. How big is your drive? How is your system partitioned? What file system you use? etc.

Offline

#3 2022-09-24 12:57:05

Luxall
Member
Registered: 2022-09-24
Posts: 10

Re: Your root partition is running out of disk space.

I update post with lsblk and df -Th

Is that enough? / If any more information is needed?

Last edited by Luxall (2022-09-24 12:59:27)

Offline

#4 2022-09-24 13:04:50

seth
Member
Registered: 2012-09-03
Posts: 49,992

Re: Your root partition is running out of disk space.

Please use "code" tags, https://bbs.archlinux.org/help.php#bbcode
You've filled up 20GB

# du -hsx /*

Offline

#5 2022-09-24 13:15:30

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,449
Website

Re: Your root partition is running out of disk space.

Please see the related discussion (which includes the relevant diagnostic steps) here.  As described in that thread - in a vast majority of "normal" use cases - 20GB for a root partition should be plenty.  So the correct solution would be to identify what's wrongly eating up that space.  Of course in some special use cases, 20GB may get legitimately used up; in those cases, increasing the partition size would be the way to go.  But in any case, the first step is diagnostics: what's using that space and why.

Last edited by Trilby (2022-09-24 13:16:14)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#6 2022-09-24 14:02:28

Luxall
Member
Registered: 2022-09-24
Posts: 10

Re: Your root partition is running out of disk space.

this is resolute

[root@arch /]# du -hsx /*
0       /bin
72M     /boot
0       /dev
11M     /etc
9.7G    /home
0       /lib
0       /lib64
16K     /lost+found
4.0K    /mnt
583M    /opt
0       /proc
224K    /root
1.8M    /run
0       /sbin
0       /snap
12K     /srv
0       /sys
24K     /tmp
12G     /usr
6.0G    /var

Last edited by Luxall (2022-09-24 14:26:25)

Offline

#7 2022-09-24 14:08:31

seth
Member
Registered: 2012-09-03
Posts: 49,992

Re: Your root partition is running out of disk space.

6.0G    /var

Pacman cache?

pacman -Scc
9.7G    /home

???
You do not seem to be using the /home partition?

findmnt -T ~

Edit: though 9.7GB in /home would also get you above 20GB …

Last edited by seth (2022-09-24 14:09:43)

Offline

#8 2022-09-24 14:13:26

Luxall
Member
Registered: 2022-09-24
Posts: 10

Re: Your root partition is running out of disk space.

[root@arch /]# findmnt -T ~
TARGET SOURCE    FSTYPE OPTIONS
/      /dev/sda2 ext4   rw,relatime

after pacman -Scc:

0       /bin
72M     /boot
0       /dev
11M     /etc
9.7G    /home
0       /lib
0       /lib64
16K     /lost+found
4.0K    /mnt
583M    /opt
0       /proc
224K    /root
1.8M    /run
0       /sbin
0       /snap
12K     /srv
0       /sys
24K     /tmp
12G     /usr
6.0G    /var

Last edited by Luxall (2022-09-24 14:26:01)

Offline

#9 2022-09-24 14:19:13

seth
Member
Registered: 2012-09-03
Posts: 49,992

Re: Your root partition is running out of disk space.

Yeah, as root doesn't help…

findmnt -T ~your_username_here
du -hs /var/*

Also

seth wrote:

I'm not asking again.

Offline

#10 2022-09-24 14:21:02

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: Your root partition is running out of disk space.

Please go back and edit your posts to use [⁣code] [⁣/code] tags around all commands and their outputs, thanks.

CoC - Pasting pictures and code


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#11 2022-09-24 14:24:07

Luxall
Member
Registered: 2022-09-24
Posts: 10

Re: Your root partition is running out of disk space.

[root@arch lux]# findmnt -T ~lux
TARGET SOURCE    FSTYPE OPTIONS
/home  /dev/sda3 ext4   rw,relatime
[root@arch lux]# du -sh /var/*
3.2G    /var/cache
24K     /var/db
4.0K    /var/empty
4.0K    /var/games
8.4G    /var/lib
4.0K    /var/local
0       /var/lock
220M    /var/log
0       /var/mail
4.0K    /var/opt
0       /var/run
2.5M    /var/snap
20K     /var/spool
44K     /var/tmp

Offline

#12 2022-09-24 14:28:36

seth
Member
Registered: 2012-09-03
Posts: 49,992

Re: Your root partition is running out of disk space.

du -hs /var/cache/* /var/lib/*

You can btw. also use https://archlinux.org/packages/community/x86_64/ncdu/

Offline

#13 2022-09-24 14:34:37

Luxall
Member
Registered: 2022-09-24
Posts: 10

Re: Your root partition is running out of disk space.

[root@arch lux]# du -hs /var/cache/* /var/lib/*
4.5M    /var/cache/fontconfig
5.4M    /var/cache/fwupd
152K    /var/cache/ldconfig
8.0K    /var/cache/PackageKit
3.1G    /var/cache/pacman
4.0K    /var/cache/private
4.0K    /var/cache/samba
2.7M    /var/cache/snapd
4.2M    /var/cache/swcatalog
24K     /var/lib/AccountsService
4.0K    /var/lib/apparmor
4.0K    /var/lib/arpd
4.0K    /var/lib/bluetooth
4.0K    /var/lib/boltd
4.0K    /var/lib/dbus
1.1M    /var/lib/fwupd
4.0K    /var/lib/geoclue
20K     /var/lib/iwd
8.0K    /var/lib/krb5kdc
4.0K    /var/lib/machines
4.0K    /var/lib/misc
4.0K    /var/lib/mysql
4.0K    /var/lib/NetworkManager
9.1M    /var/lib/PackageKit
64M     /var/lib/pacman
4.0K    /var/lib/portables
4.0K    /var/lib/private
12K     /var/lib/samba
428K    /var/lib/sddm
8.3G    /var/lib/snapd
1.2M    /var/lib/systemd
12K     /var/lib/tpm2-tss
4.0K    /var/lib/udisks2
776K    /var/lib/upower
8.0K    /var/lib/xkb

Offline

#14 2022-09-24 14:44:09

seth
Member
Registered: 2012-09-03
Posts: 49,992

Re: Your root partition is running out of disk space.

3.1G    /var/cache/pacman

If you ran

pacman -Scc

what was the output?
Did you say "no"??

8.3G    /var/lib/snapd

Let's hope that's on a  different FS

du -hsx /var/lib/*

Offline

#15 2022-09-24 14:50:27

Luxall
Member
Registered: 2022-09-24
Posts: 10

Re: Your root partition is running out of disk space.

[root@arch lux]# pacman -Scc

Cache directory: /var/cache/pacman/pkg/
:: Do you want to remove ALL files from cache? [y/N] y
removing all files from cache...

Database directory: /var/lib/pacman/
:: Do you want to remove unused repositories? [Y/n] 
removing unused sync repositories...
[root@arch lux]# du -hs /var/cache/* /var/lib/*
4.5M    /var/cache/fontconfig
5.4M    /var/cache/fwupd
152K    /var/cache/ldconfig
8.0K    /var/cache/PackageKit
204K    /var/cache/pacman
4.0K    /var/cache/private
4.0K    /var/cache/samba
2.7M    /var/cache/snapd
4.2M    /var/cache/swcatalog
24K     /var/lib/AccountsService
4.0K    /var/lib/apparmor
4.0K    /var/lib/arpd
4.0K    /var/lib/bluetooth
4.0K    /var/lib/boltd
4.0K    /var/lib/dbus
1.1M    /var/lib/fwupd
4.0K    /var/lib/geoclue
20K     /var/lib/iwd
8.0K    /var/lib/krb5kdc
4.0K    /var/lib/machines
4.0K    /var/lib/misc
4.0K    /var/lib/mysql
4.0K    /var/lib/NetworkManager
9.1M    /var/lib/PackageKit
64M     /var/lib/pacman
4.0K    /var/lib/portables
4.0K    /var/lib/private
12K     /var/lib/samba
428K    /var/lib/sddm
8.3G    /var/lib/snapd
1.2M    /var/lib/systemd
12K     /var/lib/tpm2-tss
4.0K    /var/lib/udisks2
776K    /var/lib/upower
8.0K    /var/lib/xkb

Last edited by Luxall (2022-09-24 14:56:22)

Offline

#16 2022-09-24 14:57:12

seth
Member
Registered: 2012-09-03
Posts: 49,992

Re: Your root partition is running out of disk space.

pacman wrote:

:: Do you want to remove ALL files from cache? [y/N]

How about you say "yes"?

Offline

#17 2022-09-24 15:02:46

Luxall
Member
Registered: 2022-09-24
Posts: 10

Re: Your root partition is running out of disk space.

So 2 things:
1. Do i need snapd?
2. How can i add for example 10Gb to root?

edit:
I did 'yes'

Last edited by Luxall (2022-09-24 15:16:11)

Offline

#18 2022-09-24 15:22:17

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,449
Website

Re: Your root partition is running out of disk space.

FWIW (mostly @seth) the -x flag for the du command doesn't seem to do what the man page says it should for me either (my /home on another partition is still listed).  EDIT: the -x flag only prevents the content on other filesystems to be listed in the grand total space used - it does not prevent listing the size of a directory.  So /home's size is listed, but the size of /home is not included in the total for the size of /.

Luxall, only you could decide whether or not you need snapd.  To me the question of whether someone needs snapd sounds like asking whether or not they need an STD.  The answer is most definitely no.  Both are things you end up acquiring when looking for instant gratification without considering the consequences.  Both should be treated promptly.  But apparently some people like living with the cl/snap.

However, if you are not sure you need and plan to keep snap(d), then you're second question is irrelevant.  You shouldn't (yet) be asking about how to add 10GB to your root partition.  Instead you should be removing 10GB or so of unneeded junk from it.  20GB should most likely be more than you'd ever need if your system is running smoothly.  If you system is not running smoothly, adding more space just kicks the can down the road a bit and allows the problem to get worse.

Last edited by Trilby (2022-09-24 16:42:24)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#19 2022-09-24 15:31:52

seth
Member
Registered: 2012-09-03
Posts: 49,992

Re: Your root partition is running out of disk space.

% sudo du -hs /run 
2,5G	/run
% sudo du -hsx /run
900K	/run

We should therefore still see

du -hsx /var/lib/*

(because the last couple of outputs lack the -x)
Since /var was ~6GB but /var/cache was only 3.1GB there're ~3GB unaccounted for and /var/snap is the only contender.

Offline

Board footer

Powered by FluxBB