Using tune2fs to maintain disks and free up space


Recommended Posts

tune2fs is a useful tool that allows users to adjust ext2/ext3 filesystem options. Chances are that the amount of times Linux does a fsck disk scan on boot is too frequent, or the default %1 reserved space on the file system is amounting to a significant portion of the hard drive. Using tune2fs, you can change these settings and more to better suit your needs.

Before you begin, you should get the names of your hard disks. You can use the command df in the terminal, or you can use System Monitor, shown below:

post-149838-1204575192_thumb.png

Freeing up reserved space

When you format a drive to ext2/ext3, some of that space is reserved automatically. This is a good thing for your root partition because if you fill up the hard drive, Linux will still have space to write to the log file and such. However, if you have say a 350GB hard drive, that 1% amounts to something significant. Additionally, you may not want reserved space on hard drives that are formatted in ext2/3 and are just used for storage.

Set the amount of reserved space to 0%:

tune2fs -m 0 /dev/HARDDRIVE

Set the amount of reserved blocks to 20000, which should be more than sufficient:

tune2fs -r 20000 /dev/HARDDRIVE

Telling tune2fs when to do fsck

If errors are found on the file system, fsck will run no matter what. fsck will also run automatically after 30 mounts by default in Ubuntu. You can use tune2fs to increase the number of mounts and/or have it run after a certain amount of days.

fsck will run after 80 mounts:

tune2fs -c 80 /dev/HARDDRIVE

fsck will disregard the number of mounts:

tune2fs -c 0 /dev/HARDDRIVE

fsck will run after 3 days, 2 months and 1 week

tune2fs -i d3 m2 w1 /dev/HARDDRIVE

Setting a volume label

Want to name your harddrive? You can do that too.

tune2fs -L PORNDRIVE /dev/HARDDRIVE

Edited by Unholy Moley!
  • 5 months later...
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • Free Software Foundation Europe pushes EU to force Google to allow AI uninstalls on Android by Paul Hill Credit: Pexels Users should be able to fully uninstall AI-based features from Android devices and be able to access interoperability functions, free from Google’s verification requirements, the European Commission has heard as part of an Android interoperability consultation under the Digital Markets Act. These measures were proposed by the Free Software Foundation Europe (FSFE) last week when it submitted its documentation. The FSFE noted that Google had started silently installing AI models without telling users. It noted that the EU’s DMA requires companies like Google to allow users to uninstall pre-loaded software from their devices, but in the case of the AI models Google is installing, they reinstall if you delete them, contravening the DMA. To get Google back under control, the FSFE has told the European Commission that there needs to be improvements within the Android Open Source Project (AOSP). First, it said that users should be able to fully remove pre-loaded AI components from their devices, with companies being prohibited from silently reinstalling or reactivating them. Second, access to Android interoperability features should not be contingent on registration, authorization, or contractual relationships with Google. This pertains to Google’s attempt to force developers to register with Google, even to publish apps to alternative app stores like F-Droid. Discussing its submission, Lucas Lasota, FSFE Legal Programme Manager, said: Google is planning to roll out its Android Developer Certification in September 2026. This will force every Android app developer to register with Google before their software can be installed on certified Android devices, but it should affect those who have removed Google Apps from their device. The program is controversial because it entails the signing of contracts and payment of account fees to Google, as well as the handing over of the identities of developers. It said: The FSFE said that if the Commission’s draft measures remain unchanged, then Google will be allowed to make developers verify their identity. The FSFE believes that asking developers to register is contrary to the text and spirit of the law. In summary, the FSFE has told the Commission that no developer should need a Google account, a Play Store presence, or any agreement with Google to access Android’s interoperability features.
    • You could disable this "functionality/feature/whatever" with 2 registry keys, ages ago.
    • My Photos app is version 2026.11050.1001.0 and it remembers the window size and position. My Snipping Tool is version 11.2602.49.0 and it can capture the taskbar.
  • Recent Achievements

    • Conversation Starter
      sumytbe earned a badge
      Conversation Starter
    • One Year In
      B4dM1k3 earned a badge
      One Year In
    • One Year In
      DarkWun earned a badge
      One Year In
    • Dedicated
      Almohandis earned a badge
      Dedicated
    • Dedicated
      JuvenileDelinquent earned a badge
      Dedicated
  • Popular Contributors

    1. 1
      +primortal
      519
    2. 2
      +Edouard
      185
    3. 3
      PsYcHoKiLLa
      87
    4. 4
      Michael Scrip
      81
    5. 5
      Steven P.
      73
  • Tell a friend

    Love Neowin? Tell a friend!