News for hackers. Stuff that matters.
Re:All my servers have an 8 GB empty file on disk by rozap on Thursday March 25, 2021 @04:42PM (#26585130)
Everyone has this kind of alerting set up, but that's not the point. The beauty of this solution is that it's dead simple and will never fail. Alerting can fail or be ignored.

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 by goatinaboat on Thursday March 25, 2021 @04:48PM (#26585180)
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

In scuba diving there used to be "J-valves". When you had 50 bar left in the tank they would cut out. Then you would pull to reenable your air and return to the surface. Unsurprisingly they are no longer popular.

Re:All my servers have an 8 GB empty file on disk by mypalmike on Thursday March 25, 2021 @06:34PM (#26586462)
Same was true of most motorcycles until rather recently, though with motorcycles it was rare that there was a fuel gauge at all. A sputtering engine was how you knew it was low. And I believe that like with motorcycles, the "reserve tank" in an old Beetle is really the same tank - there are two hoses located in the tank at different heights.
Re:All my servers have an 8 GB empty file on disk by copperfoil on Thursday March 25, 2021 @04:53PM (#26585230)
> The beauty of this solution is that it's dead simple and will never fail. Alerting can fail or be ignored.

It's not that straightforward IMO. Would this file be deleted before the space is filled? If so, there is alerting in place, and it assumes there's a way to delete files before space fills up. If this file is deleted after space fills up, how is this different from not having the file, other than making finding files to delete easier? Then what happens after that? If you delete the file and realize there's nothing else to delete, you'd have to solve the problem the same way if you didn't use this method.

Re:All my servers have an 8 GB empty file on disk by vineyardmike on Thursday March 25, 2021 @05:16PM (#26585488)
>you'd have to solve the problem the same way if you didn't use this method.

What if the solution required some amount of free space? (eg. installing a package or swap)

Re:All my servers have an 8 GB empty file on disk by tremon on Thursday March 25, 2021 @08:26PM (#26587463)
ramdisk? It wouldn't be the first time I'd extract a .deb to tmpfs to resolve a temporary issue.

Don't think I've ever encountered a critical issue where "add more swap" would be a serious disaster recovery solution. I've certainly seen situations where swap was nearing 100% full, and although I would have minutes off wall-clock time to formulate a strategy, those minutes have never allowed me to input more than a handful of characters or so.

Re:All my servers have an 8 GB empty file on disk by dmingod666 on Thursday March 25, 2021 @05:06PM (#26585391)
The 'beauty' artificially chokes your HDD and produces the same problems that you are trying to avoid.. not a sane way to proactively manage your disk usage.