Facebook Twitter Instagram
    WiredRevolution.com
    • Home
    • About
    • Contact Us
    • Essential Linux Commands
    • Sitemap
    Facebook Twitter Instagram
    WiredRevolution.com
    system administration

    Free ext3 reserved blocks with tune2fs

    RyanBy RyanNovember 23, 2008Updated:November 25, 20084 Comments2 Mins Read
    Facebook Twitter Pinterest LinkedIn Reddit WhatsApp Email

    As a security measure the ext3 file system reserves 5% of device space for administrative processes. This protects the system by allowing root processes to continue using the disk if a user process runs wild and fills it up. With today’s larger disk capacities, 5% equates into gigabytes of arguably wasted space. Thankfully with the tune2fs command you can reduce this percentage and free most if not all of the reserved space.

    The tune2fs command utility operates exclusively on ext2/ext3 file systems.

    To run these commands you must run the command as root or use sudo.

    You can run tune2fs on the ext3 partition with the ‘-l‘ option to show you all the filesystem details. The important information to focus on are the “Reserved block count” and “Block size” lines. Multiply these lines together to see how many bytes are currently reserved on the filesystem.

    $ tune2fs -l /dev/sda1
    
    ...
    Reserved block count:     1929908
    ...
    Block size:               4096
    ...
    

    That’s more than 7GB of space that is reserved.

    Run the df command to see the current used space on the device before you make any changes.

    $ df -h
    
    Filesystem            Size  Used Avail Use% Mounted on
    /dev/sda1             145G  3.1G  135G   3% /
    

    Run the tune2fs command to change your reserved block percentage. The ‘-m‘ option sets the new reserved percentage.

    In this example I am setting the percentage to 0 and completely removing the reserved space. This will effectively disable the security feature but free the most space. You may choose to reduce the reserved percentage instead in order to preserve the security benefit while still freeing some space.

    $ sudo tune2fs -m 0 /dev/sda1
    

    You can confirm the changes have taken effect by viewing the filesystem details.

    $ tune2fs -l /dev/sda1
    
    ...
    Reserved block count:     0
    ...
    

    You can directly see the changes by looking at your system disk space usage. We now have an additional 7GB available.

    $ df -h
    
    Filesystem            Size  Used Avail Use% Mounted on
    /dev/sda1             145G  3.1G  142G   3% /
    
    Share. Facebook Twitter Pinterest LinkedIn WhatsApp Reddit Email
    Previous ArticleAllow sudo access without passwords in Ubuntu
    Next Article Install the GRUB boot loader to the MBR

    Related Posts

    Install Linux development man pages in Ubuntu

    Setup user login restrictions with SSH

    Skip network filesystems when searching with find

    Most Commented
    March 12, 2009

    Fix blue tinted video in Ubuntu

    September 10, 2010

    Setup SSH access between VirtualBox Host and Guest VMs

    March 8, 2011

    Install GNOME Shell in Ubuntu 10.10 Maverick

    April 4, 2009

    Setup the PS3 Bluetooth Controller on Ubuntu

    October 22, 2008

    How to correctly use LD_LIBRARY_PATH

    Recent Comments
    • Execute command on linux virtual machine (or server) from windows commandline on Setup SSH access between VirtualBox Host and Guest VMs
    • Solved: How to SSH to a VirtualBox guest externally through a host? - Daily Developer Blog on Setup SSH access between VirtualBox Host and Guest VMs
    • How to SSH to a VirtualBox guest externally through a host? [closed] – Code D3 on Setup SSH access between VirtualBox Host and Guest VMs
    • How to copy and paste from VirtualBox? [duplicate] on Setup SSH access between VirtualBox Host and Guest VMs
    • Jackie Laguna on Fix OpenGL: ChoosePixelFormat SketchUp error in WINE
    © 2025 ThemeSphere. Designed by ThemeSphere.

    Type above and press Enter to search. Press Esc to cancel.