LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 11-29-2010, 07:35 AM   #1
wikapuki
Member
 
Registered: Jun 2009
Distribution: Debian
Posts: 80

Rep: Reputation: 15
Skip e2fsck / fsck at boot if working day - anyone done this?


Hi

Squeeze/Sid
Linux 2.6.32-5-486

I have my drives set to check on 29th mount.
Machine shutdown/reboot daily.

Occasionally I need to to a reboot during the working day and I have noticed over this pas year that during a working day reboot their is a more than 50 50 chance of it wanting to do a disk check which can be a long wait, plus it can be un-nerving when this machine is a remote machine (for me it's remote).

Is there a way I can specify that if the machine is booting between specified hours (10am to 10pm) then fsck is skipped but also ensures the next reboot fsck is done on that drive?

M.
 
Old 11-29-2010, 10:02 AM   #2
jlcasado
LQ Newbie
 
Registered: Oct 2010
Location: Madrid - Spain
Distribution: RHEL
Posts: 26

Rep: Reputation: Disabled
Hi,

I can just thing in a script run when rebooting the server that will check the hour and modify the counter accordingly or better than this, disable fsck on next reboot and just run it when you feel that's needed.

jose
 
Old 11-30-2010, 04:31 AM   #3
cepcasa
LQ Newbie
 
Registered: Feb 2008
Posts: 2

Rep: Reputation: 0
Quote:
Originally Posted by jlcasado View Post
Hi,

I can just thing in a script run when rebooting the server that will check the hour and modify the counter accordingly or better than this, disable fsck on next reboot and just run it when you feel that's needed.

jose
in /etc/e2fsck.conf

# report fsck with ^C
[options]
allow_cancellation = 1
 
Old 11-30-2010, 07:13 AM   #4
wikapuki
Member
 
Registered: Jun 2009
Distribution: Debian
Posts: 80

Original Poster
Rep: Reputation: 15
@jlcasado I was thinking of that too but was hoping it possible within fsck / e2fsck.conf

@cepcasa Unfortunately I will not be at the machine when needing to do the ^C. but I noted on my system that this file doesn't exist so will add and have that option in case I am there.

On reading the rest I saw: defer_check_on_battery

Possible Solution:
No this machine has not got a battery but I was wondering if I could somehow make the machine think it has a battery and when booting within 'working hours' make it think it has a low battery power so that 'defer_check_on_battery = 1' would make skip fsck??

I may try to see if there is a way for requesting such options to be added to /etc/e2fsck.conf

autocancel_timerange = 10:22
10:22 = 10am to 10pm

Added feature request: http://sourceforge.net/tracker/?func...06&atid=352406

Last edited by wikapuki; 11-30-2010 at 07:44 AM.
 
Old 11-30-2010, 07:39 AM   #5
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,578
Blog Entries: 31

Rep: Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208
IDK Debian so have been keeping quiet but no solution has been identified yet so here goes ...

Does Debian support an /etc/fastboot file? If so, it could be time-dependently created or deleted by a boot script running before the fsck activity in the boot order.

Alternatively the boot script that initiates fsck (/etc/init.d/mountall.sh?) could be modified, making that functionality time-dependent.

It is, of course, scary to mess with boot scripts on a remote server ... ... so if you choose to try this approach you might like to simply comment out the fsck code and call another script for the new/clever time-dependent commands so if it doesn't work at least the main script continues.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
fsck (e2fsck) questions JohnE1 Linux - Server 4 08-15-2009 01:27 AM
fsck and e2fsck ygloo Linux - General 8 08-31-2006 02:19 PM
e2fsck and fsck.ext3 kpachopoulos Debian 4 02-09-2006 11:29 AM
how do i skip e2fsck? murrowman789 Slackware 8 07-20-2005 05:25 PM
how to skip fsck at boot time? ItsNotMe SUSE / openSUSE 4 04-28-2005 05:31 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 08:56 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration