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.
-
1Anecdotally, I never had any problems mounting partitions on 1Tb and 1.5Tb drives. Can you provide some links to "people completely filling their drive and being unable to mount"? – Sergey Aug 17 '12 at 05:13
-
http://ubuntuforums.org/showthread.php?t=1552484 is one thread i saw. A couple of people there. I saw others but i surfed so much i gotta remember my google search terms lol. – JClar Aug 17 '12 at 20:55
2 Answers
Ok, so the question is about filling up the filesystem, not about partitioning the drive. Two things come to mind:
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.
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.
-
OK. I just got paranoid since this is my first big format in ext4. Thanks for all the info. Its nice to hear that problems are the exception and that I don't have to leave a lot free. – JClar Aug 18 '12 at 00:16
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.

- 3,601
-
I choose the other answer, but I found your answer useful also, and marked them both. – JClar Aug 17 '12 at 23:32