I boiled this down into a "universal" command:
I posted further explanation on my web site:Code:sudo tune2fs -c 0 `mount | awk '$3 == "/" {print $1}'`
http://dannyman.toldme.com/2008/11/19/e2fsck-frog-off/
I boiled this down into a "universal" command:
I posted further explanation on my web site:Code:sudo tune2fs -c 0 `mount | awk '$3 == "/" {print $1}'`
http://dannyman.toldme.com/2008/11/19/e2fsck-frog-off/
hi. i run a home server running 24/7 day and night and data is always moving from one hdd to another or some sorts.. is there a way to make it fsck more often? should i just lower the number in the sudo tune2fs -c 50 /dev/hda1 to sudo tune2fs -c 2 /dev/hda1 or something?
oh, edit: i'm using ext3 on the main boot, and on my other drives, jfs...
thanks guys.
Last edited by yangeryanger; February 26th, 2009 at 02:44 AM.
Well, you should not need to run it any more often, especially if you are moving files like that.
Also fsck should not be run on a mounted partition, so it runs at boot.
You should be able to run fsck at next boot if you like :
http://www.cyberciti.biz/faq/linux-f...boot-sequence/
There are two mistakes one can make along the road to truth...not going all the way, and not starting.
--Prince Gautama Siddharta
#ubuntuforums web interface
I don't use the 'c' (for count) between checks, but the 'i' (for interval).
So to set the interval every 2 weeks the command becomes:
Every 10 days becomesCode:sudo tune2fs -i 2w `mount | awk '$3 == "/" {print $1}'`
Every 3 months becomesCode:sudo tune2fs -i 10d `mount | awk '$3 == "/" {print $1}'`
Using the interval allows you to predict more or less when the check will take place (ie every sunday, if you run the command on a sunday with an interval of 7 days)Code:sudo tune2fs -i 3m `mount | awk '$3 == "/" {print $1}'`
Alain J. Baudrez ( My blog )
Laptop 1 : Ubuntu 10.10/32 bit
Laptop 2 : Ubuntu 10.04/64 bit
Nebook : Ubuntu Natty Beta 1 32-bit
Using the solutions already suggested you can do something like this:
You can send that to a file by appending:Code:$ dumpe2fs -h /dev/sda1 2>&1 | grep -i 'mount count' | perl -ne '$i++;chomp;s/.*://;s/\s//g;$arr[$i]=$_;print "Next fsck in " . ($arr[$i] - $arr[1]) . " mounts\n" if($i==2);'
If you have zenity installed, you can have a popup appear by appending this instead:Code:> /path/to/file
I have the last version saved as a shell script which can be set up to run in my startup applications (system|preferences|startup applications|startup programs). Here's that version, which is a bit tidier.Code:| zenity --text-info --title "fsck info"
Code:#!/bin/bash # fsck mount dialogue hack, by ciderpunx# dumpe2fs -h /dev/sda1 2>&1 \ | grep -i 'mount count' \ | perl -ne '$i++; chomp; s/.*://; s/\s//g; $arr[$i]=$_; print "Next fsck in " . ($arr[$i] - $arr[1]) . " mounts\n" if($i==2);' \ | zenity --text-info --title "fsck info"
Thanks. it saved my time a lot![]()
Great thread. I know its but I wanted to bring it back to life
.
Bookmarks