[RndTbl] Best ways to find where disk space is being used?
Scott Toderash
scott at 100percenthelpdesk.com
Sun Feb 5 15:14:27 CST 2023
I never really progressed beyond
du -ms *|sort -nr|head -25
But that works wonders in these situations.
On 2023-02-05 14:56, Chris Audet wrote:
> I've got a fairly long lived CentOS server that stubbornly stopped
> installing updates because the HDD is full.
>
> Can someone share their favourite way to determine where disk space is
> being used up on a system?
>
> For example, on Windows I'd use Wiztree/Treesize/Windirstat. On Linux
> desktop I've been using Gnome Disk Usage Analyzer (aka Baobab) [1].
>
> But I'm not sure what the best solutions are in cases where there's no
> GUI available. I could always mount / over SSH and use Baobab to
> crawl the remote filesystem, but that seems less than optimal 🤔
>
> [root at dogmeat ~]# yum update
> Loaded plugins: fastestmirror, versionlock
> Loading mirror speeds from cached hostfile
> * base: mirror.csclub.uwaterloo.ca [2]
> * epel: ftp.cse.buffalo.edu [3]
> * extras: mirror.xenyth.net [4]
> * updates: mirror.csclub.uwaterloo.ca [2]
> Excluding 5 updates due to versionlock (use "yum versionlock status"
> to show them)
> Resolving Dependencies
> --> Running transaction check
> ---> Package bind-export-libs.x86_64 32:9.11.4-26.P2.el7_9.10 will be
> updated
> ---> Package bind-export-libs.x86_64 32:9.11.4-26.P2.el7_9.13 will be
> an update
> ---> Package bind-libs.x86_64 32:9.11.4-26.P2.el7_9.10 will be updated
> ---> Package bind-libs.x86_64 32:9.11.4-26.P2.el7_9.13 will be an
> update
> ---> Package bind-libs-lite.x86_64 32:9.11.4-26.P2.el7_9.10 will be
> updated
> ---> Package bind-libs-lite.x86_64 32:9.11.4-26.P2.el7_9.13 will be an
> update
> ---> Package bind-license.noarch 32:9.11.4-26.P2.el7_9.10 will be
> updated
> ---> Package bind-license.noarch 32:9.11.4-26.P2.el7_9.13 will be an
> update
> ---> Package bind-utils.x86_64 32:9.11.4-26.P2.el7_9.10 will be
> updated
> ---> Package bind-utils.x86_64 32:9.11.4-26.P2.el7_9.13 will be an
> update
> ---> Package dkms.noarch 0:3.0.9-2.el7 will be updated
> ---> Package dkms.noarch 0:3.0.10-1.el7 will be an update
> ---> Package httpd.x86_64 0:2.4.6-97.el7.centos.5 will be updated
> ---> Package httpd.x86_64 0:2.4.6-98.el7.centos.6 will be an update
> ---> Package httpd-tools.x86_64 0:2.4.6-97.el7.centos.5 will be
> updated
> ---> Package httpd-tools.x86_64 0:2.4.6-98.el7.centos.6 will be an
> update
> ---> Package java-1.8.0-openjdk.x86_64 1:1.8.0.352.b08-2.el7_9 will be
> updated
> ---> Package java-1.8.0-openjdk.x86_64 1:1.8.0.362.b08-1.el7_9 will be
> an update
> ---> Package java-1.8.0-openjdk-headless.x86_64
> 1:1.8.0.352.b08-2.el7_9 will be updated
> ---> Package java-1.8.0-openjdk-headless.x86_64
> 1:1.8.0.362.b08-1.el7_9 will be an update
> ---> Package kernel.x86_64 0:3.10.0-1160.83.1.el7 will be installed
> ---> Package kernel-devel.x86_64 0:3.10.0-1160.83.1.el7 will be
> installed
> ---> Package kernel-headers.x86_64 0:3.10.0-1160.81.1.el7 will be
> updated
> ---> Package kernel-headers.x86_64 0:3.10.0-1160.83.1.el7 will be an
> update
> ---> Package kernel-tools.x86_64 0:3.10.0-1160.81.1.el7 will be
> updated
> ---> Package kernel-tools.x86_64 0:3.10.0-1160.83.1.el7 will be an
> update
> ---> Package kernel-tools-libs.x86_64 0:3.10.0-1160.81.1.el7 will be
> updated
> ---> Package kernel-tools-libs.x86_64 0:3.10.0-1160.83.1.el7 will be
> an update
> ---> Package python-perf.x86_64 0:3.10.0-1160.81.1.el7 will be updated
> ---> Package python-perf.x86_64 0:3.10.0-1160.83.1.el7 will be an
> update
> ---> Package sudo.x86_64 0:1.8.23-10.el7_9.2 will be updated
> ---> Package sudo.x86_64 0:1.8.23-10.el7_9.3 will be an update
> ---> Package xorg-x11-server-Xvfb.x86_64 0:1.20.4-19.el7_9 will be
> updated
> ---> Package xorg-x11-server-Xvfb.x86_64 0:1.20.4-21.el7_9 will be an
> update
> ---> Package xorg-x11-server-common.x86_64 0:1.20.4-19.el7_9 will be
> updated
> ---> Package xorg-x11-server-common.x86_64 0:1.20.4-21.el7_9 will be
> an update
> --> Finished Dependency Resolution
> --> Running transaction check
> ---> Package kernel.x86_64 0:3.10.0-1160.45.1.el7 will be erased
> ---> Package kernel-devel.x86_64 0:3.10.0-1160.45.1.el7 will be erased
> --> Finished Dependency Resolution
>
> Dependencies Resolved
>
> ================================================================================
> Package Arch Version
> Repository
>
> Size
> ================================================================================
> Installing:
> kernel x86_64 3.10.0-1160.83.1.el7
> updates 52 M
> kernel-devel x86_64 3.10.0-1160.83.1.el7
> updates 18 M
> Updating:
> bind-export-libs x86_64 32:9.11.4-26.P2.el7_9.13
> updates 1.1 M
> bind-libs x86_64 32:9.11.4-26.P2.el7_9.13
> updates 158 k
> bind-libs-lite x86_64 32:9.11.4-26.P2.el7_9.13
> updates 1.1 M
> bind-license noarch 32:9.11.4-26.P2.el7_9.13
> updates 92 k
> bind-utils x86_64 32:9.11.4-26.P2.el7_9.13
> updates 262 k
> dkms noarch 3.0.10-1.el7 epel
> 85 k
> httpd x86_64 2.4.6-98.el7.centos.6
> updates 2.7 M
> httpd-tools x86_64 2.4.6-98.el7.centos.6
> updates 94 k
> java-1.8.0-openjdk x86_64 1:1.8.0.362.b08-1.el7_9
> updates 317 k
> java-1.8.0-openjdk-headless x86_64 1:1.8.0.362.b08-1.el7_9
> updates 33 M
> kernel-headers x86_64 3.10.0-1160.83.1.el7
> updates 9.1 M
> kernel-tools x86_64 3.10.0-1160.83.1.el7
> updates 8.2 M
> kernel-tools-libs x86_64 3.10.0-1160.83.1.el7
> updates 8.1 M
> python-perf x86_64 3.10.0-1160.83.1.el7
> updates 8.2 M
> sudo x86_64 1.8.23-10.el7_9.3
> updates 844 k
> xorg-x11-server-Xvfb x86_64 1.20.4-21.el7_9
> updates 857 k
> xorg-x11-server-common x86_64 1.20.4-21.el7_9
> updates 57 k
> Removing:
> kernel x86_64 3.10.0-1160.45.1.el7
> @updates 64 M
> kernel-devel x86_64 3.10.0-1160.45.1.el7
> @updates 38 M
>
> Transaction Summary
> ================================================================================
> Install 2 Packages
> Upgrade 17 Packages
> Remove 2 Packages
>
> Total size: 144 M
> Is this ok [y/d/N]: y
> Downloading packages:
> Running transaction check
> Running transaction test
>
> Transaction check error:
> installing package python-perf-3.10.0-1160.83.1.el7.x86_64 needs
> 23MB on the / filesystem
> installing package sudo-1.8.23-10.el7_9.3.x86_64 needs 26MB on the /
> filesystem
> installing package kernel-3.10.0-1160.83.1.el7.x86_64 needs 106MB on
> the / filesystem
> installing package bind-export-libs-32:9.11.4-26.P2.el7_9.13.x86_64
> needs 109MB on the / filesystem
>
> Error Summary
> -------------
> Disk Requirements:
> At least 109MB more space needed on the / filesystem.
>
> [root at dogmeat ~]# df -h
> Filesystem Size Used Avail Use% Mounted
> on
> devtmpfs 3.8G 0 3.8G 0% /dev
> tmpfs 3.9G 148K 3.9G 1% /dev/shm
> tmpfs 3.9G 11M 3.8G 1% /run
> tmpfs 3.9G 0 3.9G 0%
> /sys/fs/cgroup
> /dev/mapper/centos_ba--bog--v-root 41G 40G 355M 100% /
> /dev/sda1 497M 346M 151M 70% /boot
> /dev/mapper/centos_ba--bog--v-home 20G 99M 20G 1% /home
> tmpfs 779M 0 779M 0%
> /run/user/0
>
>
> Links:
> ------
> [1] https://wiki.gnome.org/Apps/DiskUsageAnalyzer
> [2] http://mirror.csclub.uwaterloo.ca
> [3] http://ftp.cse.buffalo.edu
> [4] http://mirror.xenyth.net
> _______________________________________________
> Roundtable mailing list
> Roundtable at muug.ca
> https://muug.ca/mailman/listinfo/roundtable
More information about the Roundtable
mailing list