View previous topic :: View next topic |
Author |
Message |
EricHsu Bodhisattva
Joined: 03 May 2004 Posts: 591 Location: Aragon Consulting Group, Beijing, China
|
Posted: Mon May 31, 2004 1:16 am Post subject: Shutdown uncleanly, how to force fs integrity check? |
|
|
hi all
I've switched from fedora to gentoo for several weeks, love it!
Then I found something a little bit different:
When my system goes down 'uncleanly' for some reason (power off
accidentally, etc.), the fedora/redhat will 'force filesystem integrity check'
automatically on next boot time while gentoo don't. (Instead, I find out that
gentoo checks after 'the filesystem has been mounted for 38(?) times').
Here is my question:
How to make gentoo to force fs integrity check on next boot time after system
uncleanly goes down?
I've beening searching the forum for quite a while with keywords like 'rc-update
add checkfs' 'auto check fs' 'force check fs'.... still no luck
Thanks ahead for the one who's gonna help me out (any grammar error?) _________________ - http://nkbit.com
- http://twitter.com/xuyihua |
|
Back to top |
|
|
ecatmur Advocate
Joined: 20 Oct 2003 Posts: 3595 Location: Edinburgh
|
Posted: Mon May 31, 2004 2:27 am Post subject: |
|
|
touch /forcefsck will tell Gentoo to run a full fsck on next boot. However this is more a manual thing.
Otherwise /etc/init.d/checkfs will run "fsck -C -T -R -A -a" - see the fsck man page. Note this applies to non root filesystems only.
root is checked by /etc/init.d/checkroot; this will run "fsck -C -T -a". _________________ No more cruft
dep: Revdeps that work
Using command-line ACCEPT_KEYWORDS? |
|
Back to top |
|
|
EricHsu Bodhisattva
Joined: 03 May 2004 Posts: 591 Location: Aragon Consulting Group, Beijing, China
|
Posted: Mon May 31, 2004 6:30 am Post subject: |
|
|
ecatmur wrote: | touch /forcefsck will tell Gentoo to run a full fsck on next boot. However this is more a manual thing.
Otherwise /etc/init.d/checkfs will run "fsck -C -T -R -A -a" - see the fsck man page. Note this applies to non root filesystems only.
root is checked by /etc/init.d/checkroot; this will run "fsck -C -T -a". |
Thanks, ecatmur!
I've read the fsck man page, and here's another question:
How does fedora know that my system shutdown uncleanly? Is there a daemon
running like... a database transaction? --
when the system boots, it write something like: BEGIN...
before the system totally goes down, it 'COMMIT' it??
then if the system accidentally shutdown uncleanly, the daemon finds out that
there is no 'COMMIT' matches the latest 'BEGIN', then the 'force fs integrity check' starts?
_________________ - http://nkbit.com
- http://twitter.com/xuyihua |
|
Back to top |
|
|
nephros Advocate
Joined: 07 Feb 2003 Posts: 2139 Location: Graz, Austria (Europe - no kangaroos.)
|
Posted: Mon May 31, 2004 12:17 pm Post subject: |
|
|
EricHsu wrote: |
How does fedora know that my system shutdown uncleanly? Is there a daemon running like... a database transaction? --
| No.
When you mout a filesystem like ext2, it is marked unclean. Only at a correct unmout will this mark be reset to clean. When the system crashes, it cannot do a clean unmount and therefore the fs wil stay marked unclean, until you run fsck on it. _________________ Please put [SOLVED] in your topic if you are a moron. |
|
Back to top |
|
|
EricHsu Bodhisattva
Joined: 03 May 2004 Posts: 591 Location: Aragon Consulting Group, Beijing, China
|
Posted: Tue Jun 01, 2004 1:02 pm Post subject: |
|
|
nephros wrote: | EricHsu wrote: |
How does fedora know that my system shutdown uncleanly? Is there a daemon running like... a database transaction? --
| No.
When you mout a filesystem like ext2, it is marked unclean. Only at a correct unmout will this mark be reset to clean. When the system crashes, it cannot do a clean unmount and therefore the fs wil stay marked unclean, until you run fsck on it. |
yeah~ I clearly understand now:)
and well, the 'mark unclean' still feels like database transaction but without any
'daemon', umm, simple and direct...
Thanks a lot! _________________ - http://nkbit.com
- http://twitter.com/xuyihua |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|