1

While browsing the net about formatting my 1T hard drive as ext4, I read about people completely filling their drive and being unable to mount. How much can I fill it to safely? Even 95% wastes 50 GB! 99% seems too close as percentage. This is not a system drive just storage.

JClar
  • 127

2 Answers2

2

Ok, so the question is about filling up the filesystem, not about partitioning the drive. Two things come to mind:

  1. Accidentally filling up a filesystem should not cause total filesystem corruption. Filesystem code is written by the most skilled developers, tested for years before being included into the kernel and used as the default filesystem in a distribution. Ext4 is used on millions and millions of computers, some of which contain mission-critical data or highly loaded. It it exteremely unlikely that developers simply forgot to add a check for free space before writing data or that a major bug exist which routinely leads to filesystem corruption when the filesystem is full.

  2. By default, when an ext4 filesystem is created, a few percent of disk space is reserved for the superuser, so during the normal operation it is impossible to use up all disk space, unless you're logged in as root.

The latter does waste some considerable space on large drives (5% by default), so some people reduce this number on non-system drives.

In certain situations (repeatedly creating and deleting many files) a nearly-full filesystem may result in excessive fragmentation and some performance loss, however ext4 is better in this respect than ext3.

Sergey
  • 44,353
1

If you use GPT partitioning you need to make a 1MB or so (can actually be much smaller) partition for grub at the very beginning of the disk, if you ever want to boot from it. (GParted can do this)

Otherwise, don't worry about it, you can always mount a overfilled disk, its just that non-root users wont be able to make files, and even then, you can always change this number after creating the filesystem with e2fstune, so don't worry about it.

user72421
  • 3,711