Gentoo Archives: gentoo-user

From: Florian Philipp <lists@××××××××××××××××××.net>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] ext4 reserved space and defragmentation?
Date: Sun, 27 Jun 2010 08:28:19
Message-Id: 4C270B61.7030204@f_philipp.fastmail.net
In Reply to: [gentoo-user] ext4 reserved space and defragmentation? by Shaochun Wang
1 Am 27.06.2010 09:52, schrieb Shaochun Wang:
2 > Hi:
3 >
4 > I want to tune my ext4 filesystem of NAS data partition to free its
5 > reserved space by using "tune2fs -m0 <partition>". By reading the
6 > manual of tune2fs, I observed the following words:
7 >
8 > "Reserving some number of filesystem blocks for use by
9 > privileged processes is done to avoid filesystem
10 > fragmentation"
11 >
12 > It means that filesystem defragmentation need such reserved blocks to
13 > work properly, am I right? If so, can I make the reserved blocks a
14 > little because the default 5% is too much. My NAS filesystem is about
15 > 7x1.5T, then 5% means a lot of space.
16 >
17
18 It's not meant for defragmentation but to avoid fragmentation in the
19 first place. Simply speaking, as long as there is enough free space on
20 the disk, even if it is not accessible by an ordinary user, the system
21 can put new data in any place it seems fit.
22
23 If the disk is really near 100% full, the system has to squeeze new data
24 in every small hole somewhere on the disk. If this is done over a longer
25 time, maybe by deleting files and creating new ones, it massively
26 increases fragmentation.
27
28 Besides, reserving some space for root can save your rear-end in case
29 some user fills up your root partition. As long as root's processes
30 still have a bit of disk space available, he can still log in and clean
31 up the mess.
32
33 I agree with you that reserving 5% of several TB is too much for these
34 purposes. I think reducing it to a few 100MB is sufficient.
35
36 Hope this helps,
37 Florian Philipp

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies

Subject Author
Re: [gentoo-user] ext4 reserved space and defragmentation? Alan McKinnon <alan.mckinnon@×××××.com>