Hi all,
My Tumbleweed distro has grown to where I am starting to get warnings about low disc space. My partition is 31GB and I only have 2 left. All my files are stored on a separate drive, so this is OS and programs only and I don’t have very many programs installed. I have removed all old kernels but not sure where else to turn. My similar Ubuntu OS on another partition is ~10 GB and Fedora on another is about the same. Any thoughts on how to isolate the problem?
Hi! Install filelight and have a look at your root partition to get a feeling, what’s eating up your disk space
you can use du -sh to get the size of what is inn a directory. Thus start (as the root user) at the root of the file system:
cd /
du -sh *
check which one is specially to large, the cd to it and repeat. In this way you often will find what has grown beyond expectation.
You may wish to check some graphical tools to visualize the usage too:
- Gnome: Disk Usage Analyzer;
- KDE: Filelight;
- console: ncdu.
The obvious places to check are of course /tmp and /var/tmp.
Do you clean them on every boot? When not, there can be many leftovers there.
On 05/23/2017 04:26 AM, hcvv wrote:
>
> you can use du -sh to get the size of what is inn a directory. Thus
> start (as the root user) at the root of the file system:
>
> Code:
> --------------------
> cd /
> du -sh *
> --------------------
>
> check which one is specially to large, the cd to it and repeat. In this
> way you often will find what has grown beyond expectation.
>
>
I use:
Code:
du -hd 1 |sort -n
to end up with a sorted list. Much easier to read, IMO.
–
Ken
linux since 1994
S.u.S.E./openSUSE since 1996
It might pay to check where your /home is actually mounted. Just to be sure copy past the output of this
cat /etc/fstab
When I installed I eventually found that my home was mounted to / rather than some disk / home. Odd thing is that I told the installer to mount home to the disk and it didn’t. I put it down to my /home being on a raid/. There could be other reasons this might happen.
Or df -h to be even more sure.
John
That is a nonsens remark. /home is a directory. It is not mounted anywhere. There may be a file system mounted on /home. But that is completely the other way around.
Again, your home (who is “you”?) is not mounted to /. That would make your system unrunable.
Thanks all! Super helpful!
For the record here is what I found:
- I cleaned /tmp and /var/tmp = maybe 100MB - thanks hvcc!
- Using du -hd 1 |sort -n isolated the issue to /lib/modules - thanks kensch!
- Found a bunch of folders and files with kernel names. I deleted all except for the current and most recent. Cleared up ~11GB of space. Hopefully I didn’t screw anything up. Everything seems to be working fine.
Now for the cause… Is there a “correct” way to remove old kernels as they are upgraded? I simply go to /boot and delete the unused number series files. Apparently that is not catching everything…
I am not running TW, but in Leap removing older kernels (keeping the current and at least one older, but not much more) is the default. I do not know about TW that does not use the patches from the Update-OSS repo.
It may also be that you installed extra kernels yourself.
For cleaning /tmp and /var/tmp at boot:
When there is not already a file /etc/tmpfiles.d/tmp.conf create it as a copy
cp /usr/lib/tmpfiles.d/tmp.conf /etc/tmpfiles.d/tmp.conf
Then change the lines
# Clear tmp directories separately, to make them easier to override
# SUSE policy: we don't clean those directories
d /tmp 1777 root root -
d /var/tmp 1777 root root -
into
# Clear tmp directories separately, to make them easier to override
# My policy: empty /tmp en /var/tmp.
D /tmp 1777 root root 1d
D /var/tmp 1777 root root 1d
See
man 5 tmpfiles.d
On 05/25/2017 01:26 AM, bonesTdog wrote:
>
> Thanks all! Super helpful!
>
>
> For the record here is what I found:
>
>
>
> - I cleaned /tmp and /var/tmp = maybe 100MB - thanks hvcc!
> - Using du -hd 1 |sort -n isolated the issue to /lib/modules - thanks
> kensch!
> - Found a bunch of folders and files with kernel names. I deleted all
> except for the current and most recent. Cleared up ~11GB of space.
> Hopefully I didn’t screw anything up. Everything seems to be working
> fine.
>
> Now for the cause… Is there a “correct” way to remove old kernels as
> they are upgraded? I simply go to /boot and delete the unused number
> series files. Apparently that is not catching everything…
>
>
The only way to remove no longer needed kernels is by using software
management tools. Either use zypper, rpm or YaST->Software Management.
Removing kernel files by simply deleted files in /boot could result in a
corrupt rpm database. In tumbleweed you can also set whether or not to
keep older kernel versions. This can be set in /etc/zypp/zypp.conf. The
conf file is well documented.
–
Ken
linux since 1994
S.u.S.E./openSUSE since 1996