Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 152983

Summary: Optionally run checkfs during shutdown
Product: Gentoo Linux Reporter: Daniel Drake (RETIRED) <dsd>
Component: [OLD] baselayoutAssignee: Gentoo's Team for Core System packages <base-system>
Status: RESOLVED FIXED    
Severity: enhancement    
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: patch for 1.12 branch
patch for trunk
use checkfs conf.d file
backport to 1.12 branch

Description Daniel Drake (RETIRED) gentoo-dev 2006-10-27 07:46:49 UTC
ext2 and ext3 run periodic file system checks every X days and Y mounts. When there is a lot of data, these checks take a long time. In a product scenario, these delays are unacceptable on bootup, but would be acceptable at the end of the day during shutdown.

Here is a patch to make checkfs optionally run during shutdown as well as startup. This is off by default.

Although it might make sense to additionally make /forcefsck trigger these checks during shutdown when the option is enabled, this is not practical as the filesystems have been remounted read-only so removing forcefsck after doing the checks is not realistic. For now, no checks are run on shutdown when /forcefsck is present.
Comment 1 Daniel Drake (RETIRED) gentoo-dev 2006-10-27 07:49:43 UTC
Created attachment 100578 [details, diff]
patch for 1.12 branch
Comment 2 Daniel Drake (RETIRED) gentoo-dev 2006-10-27 07:50:00 UTC
Created attachment 100579 [details, diff]
patch for trunk
Comment 3 SpanKY gentoo-dev 2006-10-29 22:41:56 UTC
perhaps better to put the config option in /etc/conf.d/checkfs
Comment 4 Roy Marples (RETIRED) gentoo-dev 2006-10-31 03:51:27 UTC
Created attachment 100872 [details, diff]
use checkfs conf.d file

Try this patch which uses a conf.d file for the setting.

/etc/conf.d/rc is polluted enough as it is
Comment 5 Daniel Drake (RETIRED) gentoo-dev 2006-10-31 13:45:40 UTC
Having some troubles because checkfs tries to set up already existing dm partitions. Not sure why I didn't see this before. Will continue looking tomorrow.
Comment 6 Daniel Drake (RETIRED) gentoo-dev 2006-11-01 06:40:54 UTC
Works nicely, thanks! The dm-start problem is unrelated to baselayout but I've provided a patch for it in bug #153678
Comment 7 Roy Marples (RETIRED) gentoo-dev 2006-11-01 06:57:22 UTC
Fixed in our svn trunk, will appear in baselayout-1.13.0_alpha5
Comment 8 Daniel Drake (RETIRED) gentoo-dev 2006-11-01 07:48:39 UTC
Created attachment 100967 [details, diff]
backport to 1.12 branch

in case it helps anyone