问题原文
原帖链接 · epea · CC BY-SA 4.0
I'm performing a new Ubuntu Server installation, on hardware RAID 10, 6 x 1.72TB SSD, total space to partition is 5.8TB. The server is going to be used for KVM virtualisation.
I've allocated 500MB for /boot ext4
2GB for swap
Leaving 5.8T for / ext4
At 5% reserved blocks for the / partition, this is 290GB of space that I would ideally like to be able to use.
Is 290GB of reserved blocks overkill? I have read up what it's used for, but i'm getting mixed opinions, some say it only needs to be as big as the larges file, others say it's required.
My gut feeling is that the good folks of the linux world know what they're doing and it's set to 5% for a reason, but i'd like to take opinions on this.
已采纳解答
原帖链接 · shodanshok · CC BY-SA 4.0
On ext* based filesystems, the reserved space is used to guarantee privileged processes (ie: syslog) some more space to use. Without this reservation (and not using quotas) an user-level process can immediately reclaim all space without any log to be written (due to lack of free blocks). Forcing some free blocks is also beneficial to reduce fragmentation; however, it has nothing to do with large files handling.
The 5% default reserved space was chosen back in the days when HDDs (and filesystems) were much smaller than today. For example, on a 2 GB HDDs reserving 40 MB (5%) for root/logs/debug was a sensible choice.
Nowadays, with TB-sized filesystems being the norm, it can be safely scaled back to, say, 1%
You can also set a specific, absolute value for the reserved space (expressed in filesystem blocks, generally 4 KB sized) via tune2fs -r
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
