#51 [mke2fs] Default value for reserved blocks

open
nobody
None
5
2011-03-27
2011-03-27
Anonymous
No

Rationale: mkfs defaults to reserving 5% for the root user so that critical daemons like syslogd can continue functioning in the event that the disk fills up.

Problem: Feservation for volumes >2TB means sacrificing 100GB of space for the root reserve. Syslogd does not need 100GB of space to continue functioning.

Proposal; mkfs should default to 5% or 10GB, whichever is smaller.

Patch: Behavior; mke2fs defaults to reserving 5% of the volume for the root user.

Problem: 5% of a >2TB volume is 100GB. The rationale for root reservation (syslogd, etc...) does not require 100GB. As volumes get larger, this default makes less and less sense.

Proposal; If the user does not specify their preferred reserve_ratio on the command-line (-m), use the less of 5% or MAX_RSRV_SIZE. I propose 10GiB.

Patch: Attached or http://capsid.brandeis.edu/~elrad/e2fsprog.gitdiff

Tested on RH5 with a 12TB volume:

# /root/e2fsprogs/misc/mke2fs -T ext4 -L scratch /dev/sdd1
[...]
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
732422144 inodes, 2929671159 blocks
2621440 blocks (0.09%) reserved for the super user
[...]

As expected.

Discussion


  • Anonymous
    2011-03-27

    Patch for mke2fs

     
    Attachments

  • Anonymous
    2011-03-27

    Apparently my editing skills suck. Disregard everything above 'Behavior:' (that was a first draft that I apparently didn't delete).

     

  • Anonymous
    2011-03-27

    • summary: Reserved Block Default Fix --> [mke2fs] Default value for reserved blocks