Live data from Hacker News

All my servers have an 8 GB empty file on disk

brianschrader.com

601–610 of 715 posts

Re: All my servers have an 8 GB empty file on disk

#601

Earlier quoted context omitted.

This reminds me of the reserve tank toggle on some motorcycles. When you run out of gas, you switch the toggle and drive directly to a gas station.

Motorboat fuel tanks have a reserve as well. It's just a raised area that splits the bottom of the tank into 2 separate concave areas. One of the concave areas contains the end of the fuel line, and the other doesn't. When you run out of gas, you tip the tank up to dump the remaining gas from the other basin into the main one, and then you restart the engine (or keep it from stopping at all if you're quick enough on…

Old SCUBA tanks didn't have gauges, they had a reserve tank with enough air to get you to the surface. You'd realize you were running low (which I'm sure was terrifying) then hit the switch and slowly surface (you don't want to surface quickly when diving).

Re: All my servers have an 8 GB empty file on disk

#602

Earlier quoted context omitted.

I suspect the blog author did not understand this (based on the content) - as a Linode user myself, I just had a look at one of my VMs and they install with the regular 5% reserved space (ext4/Debian).

Funny because I have always tune2fs -m1 or tune2fs -m0 because the reserved space was never supposed to scale linearly with hard drive capacities and is not useful to userspace in anyway. Have never had any issues and been doing it for decades in commercial applications. In some cases, where you probably shouldn't be using ext3/4 anyways, we are talking about reclaiming TBs of reserved space. It's important to note t…

Had anyone succeed in looking up the motivation behind the reserved space idea in ext filesystems, e.g a commit message from the time this feature was introduced? I've tried but failed miserably, got lost in many different git repositories.

One fun fact I learned though - one of the reasons is "for quota file". Since ext stores quota information in an ordinary file, there could be an issue where user fills up a disk but the information about it isn't written in quota file due to lack of space.

Re: All my servers have an 8 GB empty file on disk

#605

Earlier quoted context omitted.

I think a homeless person values an empty house way more than a real estate owner.

not by the way they seem to treat any property I've seen and I have experience of homelessness personally and the prejudices have rational foundation

Living every single day being treated as a literal piece of disposable garbage by everyone around you, all while not having a quiet place to sleep or a little piece of the world to call your own can damage one's mental health to the point where they can no longer function as productive members of society.

You've experienced homelessness, so you shouldn't need me to tell you the consequences of living that way long term.

Re: All my servers have an 8 GB empty file on disk

#606

The author seems to forget that ext-based filesystems keep 5% of disk space available for root at all times by default, known as "reserved blocks".[0] That means if a non-root user uses all of the available space, it wasn't really all of the space -- root still has access to 5% free space within that partition. That's exactly the same as the useless 8GB file but in an officially-supported manner. If you run out of di…

Sure, but one of the most common causes of disks being filled on Linux is either the kernel or some process running as root filling the disk with endless repeating log entries.

Re: All my servers have an 8 GB empty file on disk

#607
post #383

Earlier quoted context omitted.

I think the problem is that you do not need 100% of your budget every year, but getting it back when you do need it is much harder than keeping it in the first place. Definite case of misaligned incentives.

I've never understood this about budgeting. So you allocate. A budget. These are fund YOU ARE PLANNING TO SPEND! So, OK, you DON'T spend them this year. Why the fuck don't you get to SAVE THAT MONEY!? No, instead you are punished for now spending it all and you cannot create a realistic budget for next year - why the hell not!? Sorry, but this frustrates the hell out of me! What am I missing here? What arcane bit of…

Your frustration may come from a good place, believing gov and big orgs want to be efficient. They don't and they don't have to. They are super efficient when it comes to taxes though. At least in my country, every department is trash except the revenue service which is so forward thinking and effective, they put private business to shame.

Re: All my servers have an 8 GB empty file on disk

#608
post #566
post #79

In 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…

At school we had a 800Mb quota for each class (around 90 people). Usually the first year everyone discovered the space problem when trying to get everything done for your first project. When you cannot compile code or generate pdf because there's no space left the witch hunt starts: there's always some people with left-over files from .pdf to .tex conversions. To help some students had put in place a crawler making s…

That's dire, ~8Mb per person. Its an interesting problem though, When the resource is not scarce, allocating 800Mb per class is the correct way to do things. someone who needs 9, 12 or 30Mb would be able to complete the allocation. But as soon as resource contention happens, students with the biggest allocation would need to relinquish alot of data. 800Mb is nothing over a modern connection nowadays but playing this game with petabytes would be a nightmare.

Re: All my servers have an 8 GB empty file on disk

#609

Earlier quoted context omitted.

Of course! But do you put all your trust in your monitoring, 100%? You've never had monitoring fail for any reason at all? You've never had a server fill up before you can respond to the alert? This 8gb file idea isn't to replace monitoring. It's to offer a quick stopgap solution so you can do things in a hurry and give yourself a little extra "out" when things go awry. Because believe me, they WILL go awry. And if y…

> But do you put all your trust in your monitoring, 100%? Yes. If I didn't feel that I can trust it, I would get another solution. > You've never had a server fill up before you can respond to the alert? I have. With the proposed hack in this article: it would fill up even faster: by that amount of time it would take the problem to write 8gb of data. > Because believe me, they WILL go awry. In my experience: not in a…

Ah I see where you are coming from. You see the spacer as a way to prevent a problem that should be prevented by better monitoring. But that's not what it is for. It's for quickly providing a stopgap so that you have time to solve the root cause without enduring more downtime.

If you've had a disk go full on you, what's the first thing you do? For me, I log in and start looking for a log file to truncate to buy me a few megs of space, at least. This spacer file is just a guaranteed way to find the space you need without having to hunt for it.

Also it doesn't HAVE to be 8GB. On most systems I think a 500mb file would be every bit as effective.

Re: All my servers have an 8 GB empty file on disk

#610
post #445
post #398

Earlier quoted context omitted.

Or the modern equivalent, subvolume quotas.

Partitions do far more than enforce quotas.

They also hurt far more than dynamic subvolume allocations, due to their static nature. You still can't repartition an active disk without downtime under Linux FAFAIK, it requires a reboot or unmounting all other partitions on that disk, even for partitions that didn't change.

I'll take lvm/zfs/btrfs subvolumes over static partitions any day.

Post reply on HN