Live data from Hacker News

All my servers have an 8 GB empty file on disk

brianschrader.com

271–280 of 715 posts

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

#271

[flagged]

I still know people that pre-emptively buy toilet paper "because hoarders might buy the rest of it" with absolutely no introspection.

The trick is to do exactly what they tell you not too immediately.

Masks don't protect against covid - jump on Alibaba and buy some.

Don't buy extra toiled paper, there will be no limits on its sale - immediately do a order on amazon prime. Because within a few days there will be price caps on the sale of TP (increased prices would deter hoarding) so everything will sell out right away.

I think people have really learned this by now - as SOON as the announcements come that there is nothing to worry about and they won't do price caps or other things, they will be doing exactly that soon.

Places like Alibaba do seem to continue to function - masks are maybe 50 cents per mask instead of 5, so folks buy a lot less, but you can still get a few for $5. Same with TP, it's not dirt cheap per roll, but you can get a few.

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

#272
post #190

Earlier quoted context omitted.

I still know people that pre-emptively buy toilet paper "because hoarders might buy the rest of it" with absolutely no introspection.

Hoarders will buy the rest of it. During the 2-month lockdown a year ago, I would purchase 4 frozen pizzas at a time when I had a chance to buy them, because I was so upset that I could not buy one when I wanted a single one during the 2 previous weeks, because of hoarders who had been faster than me. People think of toilet papers, but it is not just that. Pasta, rice, flour, yeast, plenty of useful things went missi…

I noticed a weird thing here. All the regular pasta rapidly disappeared. Rice also was gone.

But "Gluten Free"(I am a GFer) pasta - in this case, pasta made from rice - was fine!

I amused myself with the idea that people:"would rather starve to death than eat that GF crap." :-)

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

#273

Earlier quoted context omitted.

Surprised there isn't a mechanism that mechanically switches the petcock over when you put a fuel nozzle up to the port

Most motorcycles are surprisingly manual. This was originally a necessity (like in cars), but remains aesthetically preferable for many riders. OTOH, Honda Goldwings have stereo systems. They might grow an automatic fuel reserve switcher-backer someday too. :)

Many new bikes come with a lot of rider aids for safety (ABS, TCS) as well as all kinds of electronics (fuel maps), so this is changing. But of course manual transmission won't go away until bike are electric.

I am one of those who likes things old school. My bike still has a carburetor, has no fuel light or tachometer, and I have certainly had some practice reaching down to turn the fuel petcock to reserve while sputtering on the highway. If they didn't intend for me to do that, why did they put it on the left side? :)

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

#274
One thing that many Linux/Unix users do not know is that all commonly used filesystems have a "reserved" amount of space to which only "root" can write. The typical format (mkfs) default is to leave 5% of the disk reserved. The reserved space can be modified (by root) any time, and it can be specified as a block count or a percentage.

As long as your application does not have root privileges, it will hit the wall when the free+reserved space runs out. Instead of the clumsy "spacer.img" solution, one could simply (temporarily) reduce the reserved space to quickly recover from a disk full condition.

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

#275
post #260

Earlier quoted context omitted.

Setup proper monitoring and never get to the Real Issue to begin with. These sysadmin hacks are not helpful

"proper monitoring" is extremely broad. And, I would say, almost unreachable goal. You have it mail you when it goes over 80% disk usage (and what if you are on holiday)? Does it mail all colleagues? Who picks it up (I thought Bob picked it up, but Bob thought Anne picked it up. So no one did)? Does it come and wake you in person when it reaches 92%? Will this catch this async job that fails (but should never) in an…

Slack warning/ticket at 75%, page at 85% (to oncall obviously). Don’t let user workload crap into your root partition. I’ve been doing this for over 10 years and managed many thousands of nodes and literally don’t recall full disk problem unless it was in staging somewhere where monitoring was deliberately disabled.

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

#276

[flagged]

I still know people that pre-emptively buy toilet paper "because hoarders might buy the rest of it" with absolutely no introspection.

It's not really irrational or some behavior that they'd change if they did introspect. I suspect a significant portion of these people are internally like "Yeah, I'm part of the problem now, but the problem is not going to go away if I don't join in on it, I'll just get screwed."

In other words, they understand game theory and tragedy of the commons.

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

#277

Earlier quoted context omitted.

Yes because you could just do > save_my_butt.img and now it's 0 bytes.

Would that work? The fs may actually allocate a new file before deleting the exisiting allocation so the risk of it not working is still there I would think?

It might vary by kernel, filesystem, or shell, but in my experience and confirmed with a quick test: shell redirection does not create a new file/inode.

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

#278

This won't work with ZFS, as it may be impossible to delete a file on ZFS when disk is full. The equivalent in ZFS is to create an empty dataset with reserved space.

A way to prevent this is to create a dataset and reserve n amount of space, typically 10-20% and set it read-only.. before the pool gets full. Then when the pool fills up, you can reduce the reservation to be able to clean up files.

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

#280

Dumb idea. Read the man page for tunefs. The file system has some thing called min free which does the same thing. However this does not interfer with wear leveling. Dummy data does.

Not commenting on whether OPs idea is sound or not, however tunefs implies the now less and less used ext4 (many distros are switching to XFS or btrfs :-/). On another note, that limit applies to non-privileged processes only. Some crap running as root will just fill up the disk too.
Post reply on HN