RHEL: Reserved space on a ext2/ext3/ext4 filesystem

# Tested on RHEL 6 & 7

# By default, when creating a new ext2/ext3/ext4 filesystem, five percent of the partition
# is reserved for the superuser, allowing root to carry out administrative tasks on the
# filesystem in the eventuality that F.S. becomes full.

# In the case of large partitions 5% may represent a lot of space so the percentage of
# reserved space may be reduced to the minimum, which is 1%


# We will use 'tune2fs' command with '-m' option, that allows us to modify it on line

#
In this case I'm not saving much space as I'm using a small filesystem of only 1GB !

mkfs.ext3 /dev/rootvg/lv_apps  
# Valid for 'mkfs.ext2' and 'mkfs.ext4' commands too
   [...]
   13107 blocks (5.00%) reserved for the super user

   [...]

tune2fs -l /dev/rootvg/lv_apps | grep -i "block count"
   Block count:              262144
   Reserved block count:     13107

mount /dev/rootvg/lv_apps /apps


df -k /apps
   Filesystem                 1K-blocks  Used Available Use% Mounted on
   /dev/mapper/rootvg-lv_apps    999320  1320    945572   1% /apps


# Let's reduce reserved space to 1%:

tune2fs -m 1 /dev/rootvg/lv_apps
   tune2fs 1.42.9 (28-Dec-2013)
   Setting reserved blocks percentage to 1% (2621 blocks)

tune2fs -l /dev/rootvg/lv_apps | grep -i "block count"
   Block count:              262144
   Reserved block count:     2621

# Note that available space value is higher than before:

df -k /apps
   Filesystem                 1K-blocks  Used Available Use% Mounted on
   /dev/mapper/rootvg-lv_apps    999320  1320    987516   1% /apps
0 (0)
Article Rating (No Votes)
Rate this article
Attachments
There are no attachments for this article.
Comments
There are no comments for this article. Be the first to post a comment.
Full Name
Email Address
Security Code Security Code
Related Articles RSS Feed
10 Linux cryptsetup Examples for LUKS Key Management (How to Add, Remove, Change, Reset LUKS encryption Key)
Viewed 4817 times since Tue, Jul 31, 2018
Jak ustawić LVM, jak robić snapshoty oraz automatycznie powiększać LV, czyli małe howto
Viewed 4213 times since Sun, May 20, 2018
stunnel How To Set Up an SSL Tunnel Using Stunnel on Ubuntu
Viewed 1363 times since Sun, Dec 6, 2020
How to stop and disable auditd on RHEL 7
Viewed 38378 times since Tue, Aug 6, 2019
Epoch & Unix Timestamp Conversion Tools
Viewed 45629 times since Fri, Jun 22, 2018
Linux RedHat How To Create An RPM Package
Viewed 2769 times since Sun, Jan 9, 2022
RHEL: Crash kernel dumps configuration and analysis on RHEL 5
Viewed 6690 times since Sat, Jun 2, 2018
Linux Proxy Server Settings – Set Proxy For Command Line
Viewed 2659 times since Mon, Feb 18, 2019
What is OS Watcher Utility and How to use it for Database Troubleshooting ?
Viewed 29477 times since Thu, Jun 21, 2018
RHCS6: Install a two-node basic cluster
Viewed 3141 times since Sun, Jun 3, 2018