All my servers have an 8 GB empty file on disk
111–120 of 715 posts
Re: All my servers have an 8 GB empty file on disk
#112My understanding is this is why one should partition a drive. If you have a data partition, a swap partition, and an OS partition, you can get around issues where a server’s lack of disk space hoses the whole system.
/var is usually where the most data gets added. Logs, database files, caches, and whatever other junk your app spits out. 99% of the time that's what causes the out of space issues. By keeping that separate from root, you've saved your system from being completely hosed when it fills up (which it will).
Obviously there are other places that should get their own mounts, like /home and /usr, but before you know it you've got an OpenBSD install on your hands with 15 partitions :)
Re: All my servers have an 8 GB empty file on disk
#113How is this better than sounding alarms when free disk space drops below 8GB? If you’re going to ignore the alarms, then you’re going to have the same problem after you remove your spacer file and the disk fills up again!
Re: All my servers have an 8 GB empty file on disk
#114In the mid nineties I worked in a research institute. There was a large shared Novell drive which was always on the verge of full. Almost every day we were asked to clean up our files as much as possible. There were no disc quota for some reason. One day I was working with my colleague and when the fileserver was full he went to a project folder and removed a file called balloon.txt which immediately freed up a few p…
Re: All my servers have an 8 GB empty file on disk
#115An alternative approach here... make sure (all) your filesystems are on top of LVM. This reduces the steps needed to grow your free space. Whether you have a 8gb empty file laying around, or an 8gb block device to attach...LVM will happily take them both as pv's, add them to your vg's, and finally expand your lv's. some reading if LVM is new and you want to know more: https://opensource.com/business/16/9/linux-users-…
Re: All my servers have an 8 GB empty file on disk
#116An alternative approach here... make sure (all) your filesystems are on top of LVM. This reduces the steps needed to grow your free space. Whether you have a 8gb empty file laying around, or an 8gb block device to attach...LVM will happily take them both as pv's, add them to your vg's, and finally expand your lv's. some reading if LVM is new and you want to know more: https://opensource.com/business/16/9/linux-users-…
You'd effectively send all block changes through LVM twice (once through the file, then through the underlying block device(s))
Re: All my servers have an 8 GB empty file on disk
#117“To discourage casual use of this advanced feature, there is no English long name for this variable.”
But the language-build flag to enable it has a great name: -DPERL_EMERGENCY_SBRK, obviously inspired by emergency brake.
Re: All my servers have an 8 GB empty file on disk
#118This points to a much more serious problem. This is 2021 and the technology is from the 90s, with a really poor user experience design. Your car warns you when you're low on fuel, but your server doesn't if you're low on critical resources.
It's the same as old VW beetles which had a reserve gas tank. When you ran out of gas you opened a valve and you could limp to a gas station. Less likely to fail versus a 1950's era gauge that is telling you you're low. Also impossible to ignore it.
Re: All my servers have an 8 GB empty file on disk
#119An architect once told me that he always plans for a solid gold block hidden away in the cellar. Once the project invariably goes over budget, he drops the plans for the gold and frees up extra funds. Edit: I think it was a large marble slab. Same thing.
What?!? How does that work? Does he just draw up a blueprint and write "solid gold block goes here" and them some contractor says "yes that gold block will be $NNNNN" and includes it in the budget??
Re: All my servers have an 8 GB empty file on disk
#120By default, only root can use the last 5% of disk space.
That means you can fire up a root shell and know you have a buffer of free space to resolve the issue.