Date: Tue, 26 Jan 2016 11:16:02 +0000 From: Matthew Seaman <matthew@freebsd.org> To: freebsd-questions@freebsd.org Subject: Re: What's taking up all my disk space? Message-ID: <56A75572.2000107@freebsd.org> In-Reply-To: <20160126113908.4bf3d4a9.freebsd@edvax.de> References: <CAH=3fONyAy6CA8kGHzyWiiFGk-qA5=fdQVLjoE20dk9OY-OkrQ@mail.gmail.com> <20160126113908.4bf3d4a9.freebsd@edvax.de>
next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --l4InPGFIjHVdqNAmQsBtO8R24mC0drLgn Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 01/26/16 10:39, Polytropon wrote: > On Tue, 26 Jan 2016 11:21:25 +0100, Murk Fletcher wrote: >> Hi! >> >> Woke up to a nasty surprise this morning: >> >> /: write failed, filesystem is full >> # df -h >> Filesystem Size Used Avail Capacity Mounted on >> /dev/gpt/rootfs 38G 35G -7.4M 100% / >> devfs 1.0K 1.0K 0B 100% /dev >> fdescfs 1.0K 1.0K 0B 100% /dev/fd >> linprocfs 4.0K 4.0K 0B 100% /usr/compat/linux/pr= oc >> >> I have no idea why this is because I'm only using my FreeBSD VPS to ru= n a >> small Rails app in `/usr/home/`: >> >> # du -sh /usr/home >> 8.6G /usr/home >> # du -sh /usr/ >> 12G /usr/ >> # du -sh / >> 34G / >> >> Maybe there's a way to use `du` to show all files larger than 1GB and = then >> pass it on to some other command to sort them by size? >=20 > First determine which top-level directory entry is abnormally > huge: >=20 > # du -hs /* >=20 > Then narrow down the problem. I suspect /var or /tmp... Another good trick is to find large files that have been modified recentl= y: find / -xdev -type f -mtime -1 -size +10M -ls will show you all the files greater than 10MiB modified within the last day on the root partition. Your du(1) and df(1) outputs are in pretty good agreement as to the amount of space used, so you probably aren't suffering from the effects of a process holding an open file descriptor on a file that has been deleted from the filesystem. That still uses disk space, which shows up in the df(1) results, but because it's a file without a filname associated with it, du(1) wouldn't be able to count it. That's something you can frequently get if you use newsyslog to cycle log files but don't signal the right process to re-open all its logfiles. Cheers, Matthew --l4InPGFIjHVdqNAmQsBtO8R24mC0drLgn Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQIcBAEBCgAGBQJWp1V9AAoJEABRPxDgqeTngaEP/A+7UrZXnaClgZxSqYDd5rMS XPIzD/EaIOjvzOJv3DQRhDYaxChauQZvN5llTWH8rbH9+Kvk+3031DeVv6EUcyyz lr2rwhKlE3BBhoZoNZ56O0F39dssvfgb/n1kwvHIrz1pQl9Yt1eyGIdpCIHIUbxs QUNaXd/9uSLx24B4faY+gtbSPidr0Orc5wMTnWi4/BgdtGBAQrXVhri6f7tZoCES WeDQIU8TxkdpNnQOii58omWY3VrB5s8/zhf2OaR7C3vtAcU6bAVctnuZCKR6kw66 /x/McSfFQ7zzn3tewPi3SI+StkAuOmZiCskJeI7tH6md/mjR/3JmdLRj8Cdw7k4g sVpF/jfXp11Wdey1qzl0d1VVoaJF/Daqv+hNbG/w0BnKEuCdJzpdzJ5ozLFjg6bm a0Edew5i7BYiLR+l7FIysqNjCmKvFwh2FcgX+36k+1w3U4AYv0QQXFraaEln2sp0 UF7LTN4lVmByvAOaNhZHGcnaDOfCQfq5nX9V9cys5v9iygBKzSEZF4lizrVCzoKx /50OBX8beicN1rYPv+XwE0zQ78I53HH/gv+H9nf2LeOTs1id9f4TYSlI1bhDX4PZ 4/3ZfoFb8hDDJeHTiPoMW6I15lq/hE22DG2pk0iYxpCkl9zmau8yaD4eDgA9TPtb 8VraXRKHiIgxptemGm3k =o5Ji -----END PGP SIGNATURE----- --l4InPGFIjHVdqNAmQsBtO8R24mC0drLgn--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?56A75572.2000107>