1

How do I create an EXT4 file system with block size 1024 and no reserved blocks?

1 Answer 1

7
mke2fs -b 1024 -m 0 -t ext4 /dev/whatever

or

mkfs.ext4 -b 1024 -m 0 /dev/whatever

-b gives the block size and -m gives you the reserved blocks percentage.

Replace /dev/whatever with the partition you want to format.

2
  • 1
    To anyone reading this, 5% reserved blocks (default on most ext* filesystems) means non-root users cannot use any more disk space once the disk is 95% full - in effect the "disk space" they see is 5% less than actual - but root users can continue to use the remain disk space. This prevents bad things happening with some crucial system services when they can no longer write to disk. You probably don't need any reserved blocks for a partition that is only going to be used for user files. Nov 7, 2014 at 4:54
  • It's also worth pointing out the default of 5% is ridiculously oversized on modern hard drives. On an ancient 500MB drive it'd reserve an appropriate 25MB for any logs or temporary files needed for smooth running. On a modern 500GB SSD that's a whole 25*GB* wasted. Hence setting it to 1% (or 0% for partitions that are not the main system) Mar 3, 2022 at 23:14

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .