Set up mount count after system will be checked by e2fsck

Welcome to Linux Screw! If you're new here, you may want to subscribe our RSS feed.

I think everybody faced automatic filesystem checking invoked after it was mounted some certain number of times. It happens for me after 20 mounts of root filesystem with my Ubuntu Feisty (as well as any other distros that were installed), next time I boot up my laptop e2fsck starts.

It’s not a problem but very important feature and is highly recommended to be enabled in order to keep integrity of your data. But it’s possible to change number of mount times before checking is invoked by tune2fs Unix/Linux utility.

In order to get current state of maximum mount count after filesystem will be checked just execute:

sudo tune2fs -l /dev/sda2

where /dev/sda2 is Linux partition device name root filesystem is mounted at. The output of this command will show a lot of other filesystem information, but we need only line “Maximum mount count” (in my case it’s “Maximum mount count: 20“). To get total number of times filesystem was mounted execute: sudo tune2fs -l /dev/sda2 | grep “Mount count”.

To change maximum mount count to 25 please do: sudo tune2fs -c 25 /dev/sda2

 
 
» You might also be interested in the following articles:
How to create custom linux ISO image?
Ubuntu Linux and your Apple iPod
One more way to count CPUs in Linux
Mount your Flickr account as regular Linux drive
Move linux to another hard drive (dump, restore, backup)



» Want to stay up to date? Subscribe to our E-MAIL or RSS feed!

0 Responses to “Set up mount count after system will be checked by e2fsck”


  1. No Comments

Leave a Reply

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word




Friendly Sites:Who is behind Linux Screw?
Aspiring Sysadmin | GeekyBits³ | Bash Cures Cancer | TOTMS
Linux Operating System | Small Linux Deployments | My SysAd Blog
The Danesh Project | ZEPY | Linux config Wiki | Planet Sysadmin
The Sys Admin | {buhay sysad} | a non-geek's linux notes
Linux HOWTOs, Tutorials & Projects with Adam Palmer | LinuxAlt.Com
My name is Artem Nosulchik (artiomix AT gmail DOT com) and I'm Linux/Unix, Cisco systems engineer. The main idea of Linux Screw is to share relevant knowledge, skills and observations over The Web. Here you can find a lot of information related to different Linux distributions, FreeBSD, IOS as well as a other Open Source around staff. Read more ››