[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: solution to / full



On 3/1/23 05:35, lina wrote:
> My / is almost full.
>
> # df -h
> Filesystem      Size  Used Avail Use% Mounted on
> udev            126G     0  126G   0% /dev
> tmpfs            26G  2.3M   26G   1% /run
> /dev/nvme0n1p2   23G   21G  966M  96% /


On 3/1/23 15:03, Felix Miata wrote:
> I limit journal size this way:
> # cat /etc/systemd/journald.conf.d/local.conf
> [Journal]
> Storage=persistent
> SystemMaxFiles=10
> RuntimeMaxFiles=12


On 3/1/23 14:53, Jeffrey Walton wrote:
> You can probably reclaim a couple of GB by trimming systemd logs. It
> should get you some room to work. Something like:
>
>     journalctl --vacuum-time=14d
>
> I need to clear systemd logs on some IoT gadgets on occasion. They use
> SDcards, though. Not the big, juicy disks you have.


On 3/2/23 00:48, lina wrote:
> Hi all,
>
> Thanks for your suggestions,
>
> I take the least risk way, just move the things from /opt away,
>
> I hope I can make it in the next few months, the biggest problem was
> created by the R associated package.
>
> /dev/nvme0n1p2   23G   18G  4.5G  80% /
>
> Thanks again, lina


On 3/2/23 00:53, lina wrote:
> :/usr/lib$ du -sh * | sort -nr | grep -v K  | head
> 981M R
> 591M rstudio
> 591M jvm
> 554M mega
> 538M llvm-11
> 343M modules
> 313M libreoffice


So, your computer has 3911M of apps in /usr/share.


My /usr/share has a somewhat less, but /usr/share is also non-trivial:

2023-03-02 14:27:31 root@laalaa ~
# du -m -d 2 /usr | sort -rn | head
5113	/usr
3158	/usr/lib
1578	/usr/share
970	/usr/lib/x86_64-linux-gnu
664	/usr/lib/modules
334	/usr/share/locale
286	/usr/lib/libreoffice
252	/usr/lib/go-1.15
215	/usr/lib/firefox-esr
206	/usr/share/doc


Looking at my /var:

2023-03-02 14:29:33 root@laalaa ~
# du -m -d 2 /var | sort -rn | head
1317	/var
974	/var/log
945	/var/log/journal
194	/var/lib
123	/var/lib/apt
86	/var/cache
68	/var/cache/apt
61	/var/spool
60	/var/spool/cups
60	/var/lib/dpkg


/var/log/journal is getting big. Following Felix' and Jeffrey's suggestions, and RTFM journald.conf(5) and journalctl(1), I can imagine:

2023-03-02 14:40:48 root@laalaa ~
# cat /etc/systemd/journald.conf.d/local.conf
[Journal]
SystemMaxFileSize=5M
SystemMaxUse=50M
RuntimeMaxFileSize=5M
RuntimeMaxUse=50M


How do I verify the syntax?


How do I make the settings live (other than rebooting, which might hang if there is a syntax error)?


David


Reply to: