I wondered about some missing space on my ext3 partition and, after some googling, found that debian based ubuntu reserves 5% of the size for root.
I also found posts describing how to change that size via tune2fs utility.
Now I've got 2 questions, that I didn't find clear answers for:
-
should I unmount the partition before changing the reserved space. what could happen if I don't?
-
how much space should I reserve for the filesystem, so that it can operate efficiently?
Thank you!
Best Answer
You don't need to unmount the partition prior to doing this. Regarding question two, it depends. As HDDs have grown in size, so has the total amount of disk space that's reserved for root. If you have a 2 TB HDD and it's totally used for /, then I would say you could quite safely tune it down to 1% by doing this:
$ sudo tune2fs -m 1 /dev/sda*X*
A smaller drive in the region of 320 GB I'd probably leave as is.
Keep in mind that drives that are for data storage purposes don't really need all this space reserved for root. In this case you can change the number of reserved blocks like this:
$ sudo tune2fs -r 20000 /dev/sdb*X*
Hope that helps.
EDIT: Regarding fragmentation issues, ext file systems are inherently immune to fragmentation issues. To quote Theodore Ts'o: